.hanbai-main {
  width: min(1180px, calc(100% - 32px));
}

.page-back-home {
  margin: 0 0 14px;
}

.page-back-home a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #ffffff;
  color: #123053;
  font-weight: 800;
}

.page-back-home a:hover,
.page-back-home a:focus-visible {
  color: #123053;
  text-decoration: none;
}

.hanbai-intro-body,
.support-body {
  line-height: 1.85;
}

.hanbai-intro-body > :first-child,
.support-body > :first-child {
  margin-top: 0;
}

.hanbai-intro-body > :last-child,
.support-body > :last-child {
  margin-bottom: 0;
}

.hanbai-lead {
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 800;
}

.legal-section {
  margin-top: 20px;
}

.legal-table-wrap {
  overflow: hidden;
  padding: 0;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.legal-table th,
.legal-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.75;
  text-align: left;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table th {
  width: 250px;
  background: #f2f6fa;
  color: #123053;
  font-weight: 800;
}

.legal-table td {
  background: #ffffff;
}

.legal-inline-list,
.legal-cost-list,
.legal-service-list {
  margin: 10px 0 0;
  padding-left: 1.35em;
}

.legal-cost-list,
.legal-service-list {
  margin-top: 0;
}

.legal-inline-list li + li,
.legal-cost-list li + li,
.legal-service-list li + li {
  margin-top: 5px;
}

.legal-subnote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.mail-address-image {
  display: block;
  width: 101px;
  height: 15px;
}

.support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 20px;
}

.support-button:hover,
.support-button:focus-visible {
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: var(--blue);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.28);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 760px) {
  .hanbai-main {
    width: min(100% - 22px, 1180px);
  }

  .page-back-home a {
    width: 100%;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    border-bottom: 1px solid var(--line);
  }

  .legal-table tr:last-child {
    border-bottom: 0;
  }

  .legal-table th,
  .legal-table td {
    border-bottom: 0;
  }

  .legal-table th {
    padding: 13px 16px;
  }

  .legal-table td {
    padding: 15px 16px 18px;
  }

  .support-button {
    width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 54px;
    min-height: 46px;
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
