@charset "UTF-8";

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333333;
  line-height: 1.65;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, footer {
  background: #18475F;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1.4em 0;
}

header .head_in, footer .foot_in {
  max-width: 1080px;
  width: 90%;
  display: flex;
  margin: 0 auto;
  justify-content: center;
}

header a, footer a {
  color: #fff;
  text-decoration: none;
  margin-right: 2.5em;
  text-align: center;
  transition: color 0.3s ease, opacity 0.3s ease;
}

header a:hover, footer a:hover {
  color: #b3d7ff;
  opacity: 0.8;
}

header a:last-child, footer a:last-child {
  margin-right: 0;
}

footer a {
  font-weight: normal;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 24px;
}

.guide-card {
  background: #ffffff;
  max-width: 1080px;
  width: 100%;
  padding: 36px 50px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 5px solid #18475F;
}

.page-header {
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 14px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-icon {
  width: 32px;
  height: 32px;
  background-color: #18475F;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
  flex-shrink: 0;
}

.page-title {
  font-size: 1.45rem;
  color: #18475F;
  font-weight: bold;
  line-height: 1.35;
}

.toc {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #f4f7f9;
  border: 1px solid #d3e0e7;
  border-bottom: 2px solid #18475F;
  padding: 10px 20px;
  border-radius: 6px;
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  box-shadow: 0 3px 10px rgba(24, 71, 95, 0.08);
}

.toc a {
  color: #18475F;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.toc a::before {
  content: "▼";
  font-size: 0.75rem;
  margin-right: 6px;
}

.toc a:hover {
  text-decoration: underline;
}

.guide-section {
  margin-bottom: 46px;
  scroll-margin-top: 72px;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section > *:last-child {
  margin-bottom: 0;
}

.section-title {
  position: relative;
  font-size: 1.3rem;
  color: #18475F;
  font-weight: bold;
  padding: 4px 4px 8px;
  margin-bottom: 16px;
  border-bottom: 3px solid #d3e0e7;
  letter-spacing: 0.03em;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 80px;
  height: 3px;
  background-color: #18475F;
  border-right: 16px solid #E6B800;
}

.guide-body {
  font-size: 1rem;
  color: #444444;
}

.guide-body p {
  margin-top: 0;
  margin-bottom: 14px;
}

.guide-body p:last-child {
  margin-bottom: 0;
}

.guide-body > p {
  margin-bottom: 28px;
}


.eligibility-list {
  list-style-type: disc;
  padding-left: 22px;
  margin-top: 0;
  margin-bottom: 14px;
}

.eligibility-list li {
  margin-bottom: 5px;
}

.eligibility-list li:last-child {
  margin-bottom: 0;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 0;
  margin-bottom: 14px;
}

.loan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 550px;
  font-size: 0.95rem;
}

.loan-table th, .loan-table td {
  border: 1px solid #dee2e6;
  padding: 10px 14px;
  text-align: center;
}

.loan-table th {
  background-color: #18475F;
  color: #ffffff;
  font-weight: bold;
}

.loan-table td:first-child {
  font-weight: bold;
  background-color: #f8f9fa;
  color: #18475F;
  text-align: left;
}

.loan-table tr:nth-child(even) td:not(:first-child) {
  background-color: #fcfdfe;
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 0;
  margin-bottom: 14px;
}

.procedure-card {
  background-color: #fcfdfe;
  border: 1px solid #dee2e6;
  border-top: 3px solid #18475F;
  border-radius: 6px;
  padding: 16px 20px;
}

.procedure-card h3 {
  font-size: 1.05rem;
  color: #18475F;
  line-height: 1.4;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e9ecef;
}

.procedure-card p {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.procedure-card p:last-child {
  margin-bottom: 0;
}

.procedure-card .sub-text {
  font-size: 0.88rem;
  color: #555555;
}

.step-list {
  list-style: none;
  margin-top: 0;
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e9ecef;
}

.step-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.step-badge {
  background-color: #18475F;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 3px 11px;
  border-radius: 4px;
  height: fit-content;
  white-space: nowrap;
  margin-top: 2px;
}

.step-content h3,
.step-content h4 {
  font-size: 1.05rem;
  color: #18475F;
  line-height: 1.4;
  margin-bottom: 4px;
}

.step-content p {
  margin-bottom: 8px;
}

.step-content p:last-child {
  margin-bottom: 0;
}

.note-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-left: 4px solid #18475F;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 0.92rem;
  margin-top: 0;
  margin-bottom: 14px;
}

.note-box ul {
  padding-left: 20px;
  margin-top: 6px;
  margin-bottom: 0;
}

.note-box li {
  margin-bottom: 4px;
}

.note-box li:last-child {
  margin-bottom: 0;
}

.text-link {
  color: #18475F;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.text-link:hover {
  color: #0056b3;
  opacity: 0.7;
  text-decoration: none;
}

.visitor-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 14px;
}

.info-panel {
  background-color: #ffffff;
  border: 1px solid #d3e0e7;
  border-left: 5px solid #18475F;
  border-radius: 6px;
  padding: 15px 22px;
  margin-top: 0;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(24, 71, 95, 0.04);
}

.visitor-stack .info-panel {
  margin-bottom: 0;
}

.info-panel.is-highlight {
  background-color: #f4f7f9;
  border-left-color: #E6B800;
}

.info-panel > h3 {
  font-size: 1.06rem;
  color: #18475F;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8ed;
}

.info-panel .eligibility-list {
  margin-bottom: 6px;
}

.info-panel .eligibility-list:last-child {
  margin-bottom: 0;
}

.info-panel p {
  font-size: 0.96rem;
  margin-bottom: 6px;
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.info-panel .sub-text {
  font-size: 0.9rem;
  color: #555555;
}

.simple-def-list {
  margin-top: 10px;
  border-top: 1px solid #e9ecef;
}

.def-row {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  align-items: baseline;
}

.def-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.def-row dt {
  width: 115px;
  flex-shrink: 0;
  font-weight: bold;
  color: #18475F;
  background-color: #f4f7f9;
  padding: 2px 10px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.def-row dd {
  flex: 1;
  font-size: 0.95rem;
  color: #444444;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  background-color: #18475F;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  background-color: #256385;
  transform: translateY(-3px);
}

@media screen and (max-width: 768px) {
  main {
    padding: 20px 15px;
  }

  .guide-card {
    padding: 22px 18px;
  }

  .page-title {
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 1.1rem;
    padding: 6px 4px;
  }

  .guide-body {
    font-size: 0.95rem;
  }

  .guide-section {
    margin-bottom: 34px;
    scroll-margin-top: 90px;
  }

  .procedure-grid {
    grid-template-columns: 1fr;
  }

  .step-item {
    flex-direction: column;
    gap: 6px;
  }

  .step-badge {
    width: fit-content;
  }

  .info-panel {
    padding: 14px 16px;
  }

  .def-row {
    flex-direction: column;
    gap: 4px;
  }

  .def-row dt {
    width: fit-content;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .toc {
    padding: 8px 14px;
    gap: 6px 14px;
  }

  .toc a {
    font-size: 0.88rem;
  }
}