/* === Legal page layout === */
.legal-hero {
  padding: 140px 0 60px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.legal-hero-eyebrow {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.legal-hero h1 {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0;
}

.legal-section {
  padding: 64px 0 96px;
}

.legal-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.terms-box {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
}

.terms-box:first-child {
  padding-top: 0;
}

.terms-box:last-child {
  border-bottom: none;
}

.terms-box > p:first-child:not(:only-child) {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.95;
}

.terms-box h5.h5-sm,
.terms-box h5 {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.terms-box p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.95;
  margin-bottom: 10px;
}

.terms-box p:last-child { margin-bottom: 0; }

.terms-box ol,
.terms-box ul {
  padding-left: 22px;
  margin: 8px 0 4px;
}

.terms-box li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.95;
  margin-bottom: 6px;
}

.terms-box li:last-child { margin-bottom: 0; }

.terms-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.terms-box table th,
.terms-box table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
  color: var(--text-secondary);
}

.terms-box table th {
  background: var(--bg-section);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.terms-box table tr:last-child th,
.terms-box table tr:last-child td {
  border-bottom: none;
}

.terms-box a {
  color: var(--primary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.terms-box a:hover {
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .legal-hero { padding: 110px 0 48px; }
  .legal-section { padding: 48px 0 72px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}

/* === Legal hero lead === */
.legal-hero-lead {
  margin: 14px auto 0;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* === Security Policy Detail — 旧LPの構成を踏襲しつつ新LPトーンで再現 ===
   - 旧: 章タイトル (帯) → 取り組み 2〜3つ (画像+テキスト 左右2カラム、交互反転)
   - 新: 旧の構成をそのまま、色/タイポ/余白のみ新LPトーンに
=================================================================== */

/* 章タイトル帯 */
.sec-chapter {
  background: var(--bg-section);
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.sec-chapter-title {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
}

/* 章内の取り組み群 */
.sec-row-group {
  padding: 64px 0;
}

.sec-row-group > .container {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* 取り組み: 画像 + テキスト の左右2カラム */
.sec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.sec-row-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sec-row-title {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.sec-row-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.95;
  margin: 0;
}

@media (max-width: 840px) {
  .sec-row-group { padding: 48px 0; }
  .sec-row-group > .container { gap: 48px; }
  .sec-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* SP では常に画像 → テキストの順に */
  .sec-row .sec-row-img { order: 1; }
  .sec-row .sec-row-text { order: 2; }

  .sec-chapter { padding: 32px 0; }
}

/* === security-policy-detail.html 固有: トップページと同じトーンへ調整 === */
.security-detail-page .legal-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 68px;
  border-bottom: none;
  background:
    radial-gradient(circle at 78% 22%, rgba(219, 234, 254, 0.82) 0, rgba(219, 234, 254, 0) 28%),
    radial-gradient(circle at 12% 88%, rgba(207, 250, 254, 0.52) 0, rgba(207, 250, 254, 0) 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.security-detail-page .legal-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 115, 199, 0.22), transparent);
}

.security-detail-page .legal-hero-eyebrow {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  letter-spacing: 0;
  margin-bottom: 20px;
}

.security-detail-page .legal-hero h1 {
  max-width: 980px;
  margin: 0 auto 18px;
  font-size: 46px;
  line-height: 1.26;
  letter-spacing: 0;
  text-wrap: balance;
}

.security-detail-page .legal-hero-lead {
  max-width: 760px;
  font-size: 16px;
}

.security-detail-page main {
  background:
    radial-gradient(circle at 90% 2%, rgba(219, 234, 254, 0.42) 0, rgba(219, 234, 254, 0) 28%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.security-detail-page .sec-chapter {
  padding: 78px 0 24px;
  border: none;
  background: transparent;
  text-align: center;
}

.security-detail-page .sec-chapter-title {
  max-width: 900px;
  margin: 0 auto;
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: 0;
  text-wrap: balance;
}

.security-detail-page .sec-chapter-title::before {
  content: '';
  display: block;
  width: 46px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--primary-gradient);
}

.security-detail-page .sec-row-group {
  padding: 0 0 72px;
  background: transparent;
}

.security-detail-page .sec-row-group > .container {
  gap: 28px;
}

.security-detail-page .sec-row {
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
  gap: 42px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(82, 115, 199, 0.07);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.security-detail-page .sec-row:hover {
  transform: translateY(-3px);
  border-color: #D7E3F4;
  box-shadow: 0 18px 42px rgba(82, 115, 199, 0.11);
}

.security-detail-page .sec-row-text {
  min-width: 0;
}

.security-detail-page .sec-row-title {
  font-size: 24px;
  line-height: 1.48;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.security-detail-page .sec-row-title::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
  vertical-align: 2px;
}

.security-detail-page .sec-row-body {
  font-size: 15.5px;
  line-height: 1.95;
}

.security-detail-page .sec-row-body br {
  display: none;
}

.security-detail-page .sec-row-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-light);
}

.security-detail-page .sec-row-img img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

@media (max-width: 840px) {
  .security-detail-page .legal-hero {
    padding: 110px 0 52px;
  }

  .security-detail-page .legal-hero h1 {
    font-size: 32px;
    line-height: 1.4;
  }

  .security-detail-page .sec-chapter {
    padding: 58px 0 20px;
  }

  .security-detail-page .sec-chapter-title {
    font-size: 26px;
  }

  .security-detail-page .sec-row-group {
    padding-bottom: 54px;
  }

  .security-detail-page .sec-row-group > .container {
    gap: 22px;
  }

  .security-detail-page .sec-row {
    gap: 22px;
    padding: 22px;
  }

  .security-detail-page .sec-row-title {
    font-size: 21px;
  }
}

/* === security-policy.html 固有: トップページと同じトーンへ調整 === */
.security-policy-page .legal-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 68px;
  border-bottom: none;
  background:
    radial-gradient(circle at 78% 22%, rgba(219, 234, 254, 0.82) 0, rgba(219, 234, 254, 0) 28%),
    radial-gradient(circle at 12% 88%, rgba(207, 250, 254, 0.52) 0, rgba(207, 250, 254, 0) 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.security-policy-page .legal-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 115, 199, 0.22), transparent);
}

.security-policy-page .legal-hero-eyebrow {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  letter-spacing: 0;
  margin-bottom: 20px;
}

.security-policy-page .legal-hero h1 {
  font-size: 46px;
  line-height: 1.26;
  letter-spacing: 0;
}

.security-policy-page .legal-section {
  padding: 76px 0 96px;
  background:
    radial-gradient(circle at 90% 8%, rgba(219, 234, 254, 0.48) 0, rgba(219, 234, 254, 0) 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.security-policy-page .legal-container {
  max-width: 940px;
  display: grid;
  gap: 20px;
}

.security-policy-page .terms-box {
  padding: 26px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(82, 115, 199, 0.07);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.security-policy-page .terms-box:first-child {
  padding-top: 26px;
}

.security-policy-page .terms-box:last-child {
  border: 1px solid var(--border);
}

.security-policy-page .terms-box:hover {
  transform: translateY(-3px);
  border-color: #D7E3F4;
  box-shadow: 0 18px 42px rgba(82, 115, 199, 0.11);
}

.security-policy-page .terms-box h5.h5-sm,
.security-policy-page .terms-box h5 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.security-policy-page .terms-box h5.h5-sm::before,
.security-policy-page .terms-box h5::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.security-policy-page .terms-box p {
  font-size: 15.5px;
  line-height: 1.95;
}

.security-policy-page .terms-box p br {
  display: none;
}

.security-policy-page .terms-box.author {
  text-align: right;
  background:
    radial-gradient(circle at 12% 100%, rgba(207, 250, 254, 0.42), transparent 34%),
    linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

@media (max-width: 768px) {
  .security-policy-page .legal-hero {
    padding: 110px 0 52px;
  }

  .security-policy-page .legal-hero h1 {
    font-size: 32px;
    line-height: 1.4;
  }

  .security-policy-page .legal-section {
    padding: 58px 0 72px;
  }

  .security-policy-page .legal-container {
    gap: 16px;
  }

  .security-policy-page .terms-box,
  .security-policy-page .terms-box:first-child {
    padding: 22px;
  }

  .security-policy-page .terms-box h5.h5-sm,
  .security-policy-page .terms-box h5 {
    font-size: 20px;
  }
}

/* === terms.html / privacy-policy.html 固有: 法務テキストを読みやすいカードへ === */
.legal-card-page .legal-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 68px;
  border-bottom: none;
  background:
    radial-gradient(circle at 78% 22%, rgba(219, 234, 254, 0.82) 0, rgba(219, 234, 254, 0) 28%),
    radial-gradient(circle at 12% 88%, rgba(207, 250, 254, 0.52) 0, rgba(207, 250, 254, 0) 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.legal-card-page .legal-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 115, 199, 0.22), transparent);
}

.legal-card-page .legal-hero-eyebrow {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  letter-spacing: 0;
  margin-bottom: 20px;
}

.legal-card-page .legal-hero h1 {
  font-size: 46px;
  line-height: 1.26;
  letter-spacing: 0;
}

.legal-card-page .legal-section {
  padding: 76px 0 96px;
  background:
    radial-gradient(circle at 90% 8%, rgba(219, 234, 254, 0.48) 0, rgba(219, 234, 254, 0) 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.legal-card-page .legal-container {
  max-width: 940px;
  display: grid;
  gap: 20px;
}

.legal-card-page .terms-box {
  padding: 26px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(82, 115, 199, 0.07);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.legal-card-page .terms-box:first-child {
  padding-top: 26px;
}

.legal-card-page .terms-box:last-child {
  border: 1px solid var(--border);
}

.legal-card-page .terms-box:hover {
  transform: translateY(-3px);
  border-color: #D7E3F4;
  box-shadow: 0 18px 42px rgba(82, 115, 199, 0.11);
}

.legal-card-page .terms-box h5.h5-sm,
.legal-card-page .terms-box h5 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.legal-card-page .terms-box h5.h5-sm::before,
.legal-card-page .terms-box h5::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.legal-card-page .terms-box p,
.legal-card-page .terms-box li {
  font-size: 15.5px;
  line-height: 1.95;
}

.legal-card-page .terms-box p br {
  display: none;
}

.legal-card-page .terms-box ol,
.legal-card-page .terms-box ul {
  padding-left: 24px;
  margin: 10px 0 4px;
}

.legal-card-page .terms-box ul[style],
.legal-card-page .terms-box ol[style] {
  margin-left: 0 !important;
}

.legal-card-page .terms-box ul ul,
.legal-card-page .terms-box ol ol,
.legal-card-page .terms-box ul ol,
.legal-card-page .terms-box ol ul {
  margin-top: 6px;
}

.legal-card-page .terms-box a {
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card-page .terms-box table {
  border-color: #D7E3F4;
  border-radius: var(--radius-md);
}

.legal-card-page .terms-box table th {
  background: #F8FBFF;
  color: var(--primary);
}

@media (max-width: 768px) {
  .legal-card-page .legal-hero {
    padding: 110px 0 52px;
  }

  .legal-card-page .legal-hero h1 {
    font-size: 32px;
    line-height: 1.4;
  }

  .legal-card-page .legal-section {
    padding: 58px 0 72px;
  }

  .legal-card-page .legal-container {
    gap: 16px;
  }

  .legal-card-page .terms-box,
  .legal-card-page .terms-box:first-child {
    padding: 22px;
  }

  .legal-card-page .terms-box h5.h5-sm,
  .legal-card-page .terms-box h5 {
    font-size: 20px;
  }
}
