:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #eef7f4;
  --ink: #1f2933;
  --muted: #637083;
  --line: #ded8ec;
  --primary: #8b49e2;
  --primary-dark: #6531b0;
  --primary-soft: #f0e8fb;
  --accent: #c2841a;
  --danger: #c2413a;
  --shadow: 0 14px 34px rgba(31, 41, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(139, 73, 226, 0.07), transparent 260px),
    linear-gradient(90deg, rgba(194, 132, 26, 0.05), transparent 420px);
  pointer-events: none;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(31, 41, 51, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 108px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 12px rgba(139, 73, 226, 0.16));
}

.brand h1,
.hero h2,
.manual-section h2,
.task h3,
.info-box h3 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

.brand h1 {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.search {
  width: min(420px, 40vw);
}

.page-switch,
.side-switch {
  display: flex;
  gap: 6px;
}

.page-switch {
  flex: 0 0 auto;
  align-items: center;
}

.page-switch a,
.side-switch a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.page-switch a:hover,
.side-switch a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.page-switch a.current,
.side-switch a.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(139, 73, 226, 0.2);
}

.search label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search input:focus {
  outline: 3px solid rgba(139, 73, 226, 0.18);
  border-color: var(--primary);
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}

.sidebar {
  position: sticky;
  top: 92px;
  height: calc(100vh - 116px);
  padding: 14px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.05);
}

.side-switch {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.side-switch a {
  flex: 1 1 0;
  padding-inline: 8px;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.landing-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 28px;
}

.hero,
.manual-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  padding: 30px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--primary);
}

.hero-copy h2 {
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 30px;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.quick-grid {
  display: grid;
  gap: 12px;
}

.quick-card {
  display: grid;
  gap: 3px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: #fcfefd;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quick-card:hover {
  border-left-color: var(--accent);
  box-shadow: 0 12px 26px rgba(31, 41, 51, 0.08);
  transform: translateY(-1px);
}

.quick-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.quick-card span:last-child {
  color: var(--muted);
  font-size: 15px;
}

.manual-section {
  padding: 26px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.manual-section:hover {
  border-color: rgba(139, 73, 226, 0.24);
  box-shadow: 0 16px 38px rgba(31, 41, 51, 0.08);
}

.manual-section h2 {
  margin-bottom: 0;
  font-size: 23px;
}

.manual-section {
  overflow: hidden;
}

.section-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 23px;
  font-weight: 820;
  line-height: 1.35;
  text-align: left;
}

.section-toggle:focus-visible {
  outline: 3px solid rgba(139, 73, 226, 0.18);
  outline-offset: 4px;
  border-radius: 6px;
}

.section-toggle:hover {
  color: var(--primary-dark);
}

.section-toggle::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-right: 12px;
  border-right: 2px solid var(--primary-dark);
  border-bottom: 2px solid var(--primary-dark);
  transform: rotate(45deg);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.section-toggle:hover::after {
  border-color: var(--primary);
}

.manual-section.is-open .section-toggle::after {
  border-color: var(--accent);
  transform: rotate(-135deg);
}

.section-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 360ms ease,
    opacity 240ms ease;
}

.manual-section.is-open .section-body {
  max-height: none;
  overflow: visible;
  opacity: 1;
}

.section-body-inner {
  padding-top: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-box,
.procedure,
.task {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task,
.procedure,
.info-box,
details,
.timeline div {
  box-shadow: 0 4px 14px rgba(31, 41, 51, 0.035);
}

.info-box,
.procedure,
.task {
  padding: 18px;
}

.task + .task {
  margin-top: 16px;
}

.task h3,
.info-box h3 {
  margin-bottom: 9px;
  color: var(--primary-dark);
  font-size: 19px;
}


.where {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

ol,
ul {
  margin: 0;
  padding-left: 1.4em;
}

li + li {
  margin-top: 6px;
}

.note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff8e8;
  color: #5d4215;
  font-size: 16px;
}

.placeholder-guide p {
  margin: 0;
}

.placeholder-guide ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  margin: 10px 0;
}

.placeholder-guide li + li {
  margin-top: 0;
}

@media (max-width: 720px) {
  .placeholder-guide ul {
    grid-template-columns: 1fr;
  }
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.timeline p {
  margin: 0;
}

.faq {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
}

.faq details {
  padding: 16px 18px;
}

.faq summary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0;
  cursor: default;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q";
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.faq details p {
  display: flex;
  gap: 10px;
  padding: 10px 0 0;
  color: var(--muted);
}

.faq details p::before {
  content: "A";
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff8e8;
  color: #6b4b16;
  font-size: 12px;
  font-weight: 900;
}

/* ===== 画面図 / フロー図 ===== */
.figure {
  display: block;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbf9ff, #fff);
  box-shadow: 0 4px 14px rgba(31, 41, 51, 0.05);
  overflow: hidden;
}

.figure:not(.captured) {
  min-height: 112px;
  padding: 34px 22px;
  border: 2px dashed #b9a7d8;
  background: #faf8fd;
  color: #5c467b;
  text-align: center;
}

.figure:not(.captured)::before {
  content: "画像作成予定（実画面キャプチャを準備中です）";
  font-size: 14px;
  font-weight: 800;
}

.figure:not(.captured) > * {
  display: none;
}

.figure.captured.form-shot {
  max-width: 920px;
}

.figure.captured.mobile-shot {
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.image-pending {
  margin-top: 16px;
}

.figure .image-link {
  display: block;
  max-width: 100%;
  cursor: zoom-in;
}

.figure .image-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.figure > img {
  display: block;
  width: 100%;
  height: auto;
  padding: 16px 16px 4px;
  background: #f7f4fc;
}

.figure .image-link > img {
  display: block;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: auto;
  padding: 16px 16px 4px;
  background: #f7f4fc;
  margin-inline: auto;
}

.figure figcaption {
  padding: 14px 16px 16px;
}

.figure .cap-title {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
}

.cap-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cap-legend li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.cap-num {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  background: #e2231a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.figure.flow > img {
  background: #fff;
}

/* 実スクリーンショット + 番号注釈オーバーレイ */
.shot {
  position: relative;
  display: block;
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #eef0f2;
}

.shot > img {
  display: block;
  width: 100%;
  height: auto;
}

.shot .pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(31, 41, 51, 0.4);
}

/* 強調枠（任意で使う） */
.shot .box {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(194, 132, 26, 0.18);
}

.backtop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: none;
  width: 56px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.backtop.visible {
  display: block;
}

.hidden-by-search {
  display: none;
}

.no-results {
  padding: 24px;
  border: 1px dashed var(--danger);
  border-radius: 8px;
  background: #fff;
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    display: grid;
  }

  .search {
    width: 100%;
  }

  .page-switch {
    flex-wrap: wrap;
  }

  .layout {
    display: block;
    padding: 16px;
  }

  .sidebar {
    position: static;
    height: auto;
    margin-bottom: 16px;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  .topbar {
    padding: 16px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand img {
    width: 90px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .manual-section {
    padding: 20px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

}

/* ===== v2 追加: 初めての人向けの部品 ===== */
.fill-in {
  display: inline-block;
  padding: 0 6px;
  border: 2px dashed #e2231a;
  border-radius: 6px;
  background: #fff1f0;
  color: #b3160f;
  font-weight: 800;
}

.warn {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 2px solid #e2231a;
  border-radius: 10px;
  background: #fff5f4;
  color: #6e1410;
  font-size: 16px;
}

.warn strong:first-child {
  display: block;
  margin-bottom: 4px;
  color: #b3160f;
  font-size: 17px;
}

.tip {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid #1a9e6a;
  border-radius: 8px;
  background: #eefaf4;
  color: #12503a;
  font-size: 16px;
}

.ui {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid #c9bde0;
  border-radius: 6px;
  background: #f6f2fc;
  color: #4a2491;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}

.plain {
  color: var(--muted);
  font-size: 0.92em;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: chk;
}

.checklist li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  counter-increment: chk;
}

.checklist li::before {
  content: counter(chk);
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.checklist li strong {
  display: block;
  color: var(--primary-dark);
}

.checklist li a {
  color: var(--primary-dark);
  font-weight: 700;
}

.phase-label {
  display: inline-block;
  margin: 18px 0 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.legend-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 16px;
}

.legend-table th,
.legend-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legend-table th {
  width: 34%;
  background: #faf8fd;
  font-weight: 800;
}

.chip {
  display: inline-block;
  min-width: 52px;
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
}

.chip-over { color: #d27a00; background: #fff6e6; }
.chip-ok { color: #1f2933; background: #e8e9ec; }
.chip-short { color: #e2231a; background: #fff0ef; }
.chip-work { color: #fff; background: #06a96d; }
.chip-off { color: #fff; background: #ff5a5f; }

.mark-warn {
  color: #e2231a;
  font-weight: 900;
}

.subhead {
  margin: 30px 0 4px;
  padding-top: 18px;
  border-top: 2px dashed var(--line);
  color: var(--primary-dark);
  font-size: 20px;
}

.subhead small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.glossary div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.glossary dt {
  color: var(--primary-dark);
  font-weight: 900;
}

.glossary dd {
  margin: 2px 0 0;
  font-size: 15px;
}

.example-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.example-box > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}

.example-box b {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

.os-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.os-tabs > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.os-tabs h4 {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 16px;
}

.os-tabs ol {
  font-size: 15px;
}

.proto-banner {
  padding: 8px 16px;
  background: #fff1f0;
  border-bottom: 1px solid #f3c2bf;
  color: #8a1d16;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 720px) {
  .example-box,
  .os-tabs {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 目次から飛んだとき、上の固定ヘッダーに隠れないように */
.task[id],
.manual-section[id] {
  scroll-margin-top: 112px;
}

@media (max-width: 980px) {
  .task[id],
  .manual-section[id] {
    scroll-margin-top: 12px;
  }
}
