@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: #333333;
  background-color: #f0f4fb;
  line-height: 1.8;
  font-size: 15px;
}

a {
  color: #053f8f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  background-color: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}

.header__logo-link {
  display: flex;
  align-items: center;
  height: 100%;
}

.header__logo {
  height: 36px;
  width: auto;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav__link {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #053f8f;
  transition: background-color 0.15s;
}

.nav__link:hover {
  background-color: #e6eef6;
  text-decoration: none;
}

.nav__link--active {
  background-color: #053f8f;
  color: #ffffff;
}

.nav__link--active:hover {
  background-color: #032d6b;
}

/* Layout */
.layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.sidebar {
  display: none;
}

/* Main */
.main {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.layout .main {
  margin: 0;
  padding: 32px 0 64px;
}

/* Page title */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #053f8f;
  padding-bottom: 12px;
  border-bottom: 2px solid #053f8f;
  margin-bottom: 32px;
}

/* TOC */
.toc {
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 20px 16px 12px;
}

.toc__heading {
  font-size: 13px;
  font-weight: 700;
  color: #999999;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-left: 4px;
}

.toc__list {
  list-style: none;
  counter-reset: toc;
}

.toc__list li {
  counter-increment: toc;
}

.toc__link {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s;
}

.toc__link::before {
  content: counter(toc) ". ";
  color: #053f8f;
  font-weight: 700;
  font-family: monospace;
}

.toc__link:hover {
  background-color: #e6eef6;
  text-decoration: none;
}

.toc__link:focus-visible {
  outline: 2px solid #053f8f;
  outline-offset: -2px;
  background-color: #e6eef6;
  text-decoration: none;
}

.toc__link--active {
  background-color: #e6eef6;
  color: #053f8f;
  font-weight: 700;
}

/* Section */
.section {
  scroll-margin-top: 72px;
  margin-bottom: 36px;
}

.section__title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  background-color: #053f8f;
  padding: 8px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

/* Q&A */
.qa-item {
  padding: 16px 0;
  border-bottom: 1px solid #e6e6e6;
}

.qa-item:last-child {
  border-bottom: none;
}

.qa-question {
  display: flex;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 8px;
}

.qa-question::before {
  content: 'Q.';
  color: #053f8f;
  font-weight: 700;
  flex-shrink: 0;
  font-family: monospace;
}

.qa-answer {
  display: flex;
  gap: 8px;
  color: #4d4d4d;
}

.qa-answer::before {
  content: 'A.';
  color: #053f8f;
  font-weight: 700;
  flex-shrink: 0;
  font-family: monospace;
}

.qa-answer__body p {
  margin-bottom: 4px;
}

.qa-answer__body ul {
  list-style: none;
  padding-left: 0;
}

.qa-answer__body ul li::before {
  content: '・';
}

/* Help list (index) */
.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-list__link {
  display: block;
  padding: 20px 24px;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.help-list__link:hover {
  border-color: #053f8f;
  box-shadow: 0 2px 8px rgba(5, 63, 143, 0.1);
  text-decoration: none;
}

.help-list__title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #053f8f;
  margin-bottom: 4px;
}

.help-list__desc {
  display: block;
  font-size: 14px;
  color: #666666;
}

/* Terms */
.terms-article {
  margin-bottom: 28px;
}

.terms-article__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: #053f8f;
}

.terms-article__body {
  padding-left: 8px;
}

.terms-article__body p {
  margin-bottom: 6px;
}

.terms-article__body .indent {
  padding-left: 1.2em;
}

/* Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  border: 1px solid #e6e6e6;
  padding: 8px 12px;
  text-align: left;
}

.spec-table th {
  background-color: #e6eef6;
  font-weight: 500;
  color: #053f8f;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #999999;
  border-top: 1px solid #e6e6e6;
  background-color: #ffffff;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: #053f8f;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #032d6b;
}

.back-to-top:focus-visible {
  outline: 2px solid #053f8f;
  outline-offset: 2px;
}

/* PC/Tablet: sidebar layout */
@media (min-width: 768px) {
  .sidebar {
    display: block;
    width: 220px;
    flex-shrink: 0;
    padding-top: 32px;
    margin-right: 32px;
  }

  .toc {
    position: sticky;
    top: 72px;
  }
}

/* Responsive: mobile TOC inline */
@media (max-width: 767px) {
  .main {
    padding: 32px 0 64px;
  }

  .main > .page-title {
    margin-bottom: 0;
  }

  .sidebar {
    display: block;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    padding: 20px 0 0;
  }

  .toc {
    margin-bottom: 24px;
  }

  .toc__list {
    display: flex;
    flex-wrap: wrap;
  }

  .toc__list li {
    width: 50%;
  }
}

/* Guide */
.guide-img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  margin: 12px 0 16px;
}

.guide-text {
  margin-bottom: 16px;
  line-height: 1.8;
}

.guide-text p {
  margin-bottom: 8px;
}

.guide-subsection {
  margin-bottom: 20px;
}

.guide-subsection ul {
  list-style-position: inside;
  padding-left: 0;
}

.guide-subsection__title {
  font-size: 15px;
  font-weight: 700;
  color: #053f8f;
  border-left: 3px solid #053f8f;
  padding-left: 10px;
  margin-bottom: 8px;
}

.guide-dl {
  margin: 8px 0 16px;
}

.guide-dl dt {
  font-weight: 700;
  color: #053f8f;
  margin-bottom: 2px;
}

.guide-dl dd {
  margin-left: 1.5em;
  margin-bottom: 10px;
}

.guide-dl dd ul {
  list-style: disc;
  padding-left: 1.2em;
  margin-top: 4px;
}

.guide-dl dd ul li {
  margin-bottom: 2px;
}

/* Responsive: small mobile */
@media (max-width: 576px) {
  .header {
    position: static;
    padding: 0 8px;
  }

  .header__logo {
    height: 34px;
  }

  .nav {
    gap: 2px;
  }

  .nav__link {
    padding: 6px 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  .main {
    padding: 20px 16px 48px;
  }

  .page-title {
    font-size: 19px;
  }

  .section__title {
    font-size: 15px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }

  .toc__list li {
    width: 100%;
  }

  .toc__link {
    padding: 12px;
  }
}
