.header {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  padding: clamp(20px, 4vw, 32px) 20px clamp(16px, 3vw, 24px);
  box-sizing: border-box;
  text-align: center;
}

body {
  margin: 0;
}

/* ロゴ：ヘッダー上部に中央配置 */
.logo {
  margin: 0 0 clamp(14px, 3vw, 24px);
}

.logo img {
  height: clamp(50px, 7vw, 90px);
}

.line{
  border: none;        /* デフォルトの線を消す */
  height: 1.5px;         /* 太さ */
  background-color: #333; /* 線の色 */
  width: calc(100% + 40px); /* .headerの左右padding(20px)分をはみ出させて端まで届かせる */
  margin-left: -20px;
  margin-right: -20px;
}

/* ハンバーガーボタン（モバイル用） */
.menu-btn,
.menu-close {
  display: none;
  background: none;
  border: none;
  font-size: 12px;
  letter-spacing: 0.15em;
  cursor: pointer;
}

/* ナビ全体：ロゴ下に横並びで中央配置 */
nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 各リンク */
nav a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* 委託販売：虹色の「黄」 */
nav a:hover {
  color: #e0b400;
}

/* HOME：どのページからでも虹色のグラデーションで表示 */
nav a[href="main.html"]:hover {
  background-image: linear-gradient(90deg, #e5484d, #c9a179, #e0b400, #7fad8f, #3f7fd1, #4a4e9e, #8e5fc4);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 区切り線 */
nav .separator {
  color: #ccc;
  font-size: 21px;
  font-weight: 300;
  line-height: 1;
}

/* モバイル：ハンバーガーメニューに切り替え */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
    position: absolute;
    top: clamp(20px, 4vw, 32px);
    right: 24px;
  }

  .menu-body {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .menu-body.is-open {
    transform: translateX(0);
  }

  .menu-close {
    display: block;
    position: absolute;
    top: 24px;
    right: 24px;
  }

  nav ul {
    flex-direction: column;
    gap: 28px;
  }

  .separator {
    display: none;
  }
}

/* ==== 委託販売規約・申込 ==== */
.terms-page {
  max-width: 860px;
  margin: 0 auto 60px;
  padding: 0 20px;
  box-sizing: border-box;
}

.terms-hero {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
  padding-top: 14px;
  border-top: 3px solid #e0b400;
}

.terms-title {
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: 0.08em;
  margin: 0;
}

.terms-notice {
  background: #f4f9f6;
  border: 1px solid #d9ecdf;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #444;
  margin: 0 0 32px;
}

.terms-body {
  border-top: 1px solid #ddd;
  padding-top: 28px;
}

.terms-heading {
  font-size: 19px;
  color: #333;
  margin: 0 0 14px;
}

.terms-body > p {
  line-height: 1.8;
  color: #444;
  margin: 0 0 20px;
}

.terms-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.terms-list li {
  border-top: 1px solid #eee;
  padding: 18px 0;
}

.terms-list h4 {
  font-size: 15px;
  color: #333;
  margin: 0 0 8px;
  border-left: 3px solid #7fad8f;
  padding-left: 10px;
}

.terms-list p {
  line-height: 1.8;
  color: #444;
  margin: 0 0 6px;
  font-size: 14px;
}

.terms-sublist {
  margin: 0 0 8px;
  padding-left: 1.4em;
  line-height: 1.9;
  font-size: 14px;
  color: #444;
}

.terms-example {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  background: #f7f7f5;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 8px;
  font-size: 14px;
  width: fit-content;
}

.terms-example dt {
  color: #666;
}

.terms-example dd {
  margin: 0;
  font-weight: 600;
}

/* ==== 申込フォーム ==== */
.apply-section {
  border-top: 1px solid #ddd;
  margin-top: 20px;
  padding-top: 32px;
}

.apply-heading {
  font-size: 19px;
  color: #333;
  margin: 0 0 20px;
}

.apply-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}

.apply-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: #555;
}

.apply-form input[type="text"],
.apply-form input[type="tel"],
.apply-form input[type="email"],
.apply-form input[type="date"] {
  font: inherit;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.apply-terms-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  background: #f7f7f5;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 6px 0;
  font-size: 14px;
}

.apply-terms-summary dt {
  color: #666;
  white-space: nowrap;
}

.apply-terms-summary dd {
  margin: 0;
  font-weight: 600;
}

.apply-agree {
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 14px !important;
  color: #333 !important;
}

.apply-agree input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.apply-submit {
  grid-column: 1 / -1;
  justify-self: start;
  border: none;
  border-radius: 4px;
  background: #2e8b57;
  color: #fff;
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.apply-submit:hover {
  opacity: 0.85;
}

.apply-message {
  grid-column: 1 / -1;
  color: #2e6f45;
  background: #eef7f1;
  border: 1px solid #cfe7d8;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.apply-message.is-error {
  color: #b51a1a;
  background: #fbecec;
  border-color: #f0caca;
}

.apply-signature {
  text-align: center;
  color: #777;
  letter-spacing: 0.1em;
  margin-top: 36px;
}

@media (max-width: 600px) {
  .apply-form {
    grid-template-columns: 1fr;
  }
}

/* ==== フッター ==== */
.footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid #eee;
  color: #999;
  font-size: 12px;
}

.footer p {
  margin: 0;
}
