/* 利用規約・プライバシーポリシー（style.css の後に読み込む） */

html[lang="en"] {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Header ---------- */

.legal-page .site-header {
  background: rgba(250, 251, 254, .9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.legal-header-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.legal-header-links a:not(.btn) {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.legal-header-links a:not(.btn):hover,
.legal-header-links a[aria-current="page"] {
  color: var(--blue-700);
}

/* ---------- Hero ---------- */

.legal-hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 48px;
  overflow: hidden;
  background: #E3EBFC;
}

.legal-hero .container {
  position: relative;
}

.legal-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-500);
}

.legal-title {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.legal-lang {
  margin-top: 12px;
  font-size: 14px;
}

.legal-lang a {
  color: var(--blue-700);
  font-weight: 600;
}

.legal-caps {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: .01em;
}

/* ---------- Layout ---------- */

.legal-body {
  padding: 48px 0 96px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.legal-toc-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--blue-700);
}

/* ---------- Article ---------- */

.legal-article {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
  word-break: normal;
  overflow-wrap: anywhere;
}

.legal-article > p,
.legal-article section > p {
  margin-top: 12px;
}

.legal-intro {
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.legal-article section {
  margin-top: 44px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.legal-article h2 {
  padding-left: 14px;
  border-left: 4px solid var(--blue-500);
  font-size: 19px;
  font-weight: 800;
}

.legal-article h3 {
  margin-top: 24px;
  font-size: 16px;
  font-weight: 700;
}

.legal-article a {
  color: var(--blue-700);
}

.legal-article strong {
  font-weight: 700;
}

/* 項（1. 2. 3.） */
.clauses {
  margin-top: 12px;
  padding: 0;
  list-style: none;
  counter-reset: clause;
}

.clauses > li {
  position: relative;
  padding-left: 1.8em;
  counter-increment: clause;
}

.clauses > li + li {
  margin-top: 8px;
}

.clauses > li::before {
  content: counter(clause) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--blue-700);
}

/* 号（(1) (2) (3)） */
.items {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.items > li {
  position: relative;
  padding-left: 2.4em;
  counter-increment: item;
}

.items > li + li {
  margin-top: 4px;
}

.items > li::before {
  content: "(" counter(item) ")";
  position: absolute;
  left: 0;
  color: var(--ink-soft);
}

.bullets {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.bullets > li {
  position: relative;
  padding-left: 1.2em;
}

.bullets > li + li {
  margin-top: 4px;
}

.bullets > li::before {
  content: "";
  position: absolute;
  left: .2em;
  top: .85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-300);
}

.note {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--bg-tint);
  font-size: 14px;
  color: var(--ink-soft);
}

/* 外部サービスの一覧 */
.service-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.75;
}

.service-table th,
.service-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.service-table thead th {
  font-size: 13px;
  color: var(--muted);
  border-bottom-width: 2px;
}

.service-table tbody th {
  width: 30%;
  font-weight: 700;
}

.service-table small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.contact-box {
  margin-top: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.contact-box dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  margin: 0;
}

.contact-box dt {
  font-weight: 700;
  color: var(--ink-soft);
}

.contact-box dd {
  margin: 0;
}

.legal-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.legal-layout-single .legal-article {
  margin-inline: auto;
  width: 100%;
}

/* 特定商取引法に基づく表示 */
.law-list {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.law-list dt,
.law-list dd {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.law-list dt {
  padding-right: 20px;
  font-weight: 700;
  color: var(--ink-soft);
}

.law-list dd > p {
  margin: 0;
}

.law-list dd > * + * {
  margin-top: 8px;
}

.law-list .bullets {
  margin-bottom: 0;
}

/* お問い合わせフォーム */
.contact-form {
  margin-top: 32px;
}

.contact-form .field + .field {
  margin-top: 22px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.contact-form .required,
.contact-form .optional {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.contact-form .required {
  color: #fff;
  background: var(--blue-500);
}

.contact-form .optional {
  color: var(--muted);
  background: var(--bg-tint);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, .18);
}

.contact-form .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  color: var(--ink);
}

.contact-form .checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 5px;
  flex-shrink: 0;
}

.field-help {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field-count {
  text-align: right;
}

/* ボット用の罠。人には見せない */
.field-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FDECEC;
  color: #B42318;
  font-size: 14px;
}

.contact-form button[type="submit"] {
  margin-top: 28px;
  min-width: 200px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button[type="submit"]:disabled {
  opacity: .6;
  cursor: default;
  transform: none;
}

.contact-form ~ .note {
  margin-top: 40px;
}

.contact-done {
  margin-top: 32px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.contact-done h2 {
  padding-left: 0;
  border-left: 0;
}

.contact-done p {
  margin-top: 10px;
}

.legal-end {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: right;
  color: var(--ink-soft);
}

/* 差し替えが必要な箇所 */
.ph {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(244, 174, 133, .28);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-toc {
    position: static;
    max-height: none;
  }

  .legal-toc ol {
    columns: 2;
    column-gap: 24px;
  }

  .legal-toc li {
    break-inside: avoid;
  }

  .legal-article {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .legal-header-links .legal-header-text {
    display: none;
  }

  .legal-hero {
    padding: calc(var(--header-h) + 36px) 0 32px;
  }

  .legal-body {
    padding: 32px 0 64px;
  }

  .legal-toc ol {
    columns: 1;
  }

  .legal-article section {
    margin-top: 36px;
  }

  .legal-article h2 {
    font-size: 17px;
  }

  .service-table thead {
    display: none;
  }

  .service-table,
  .service-table tbody,
  .service-table tr,
  .service-table tbody th,
  .service-table td {
    display: block;
    width: auto;
  }

  .service-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .service-table tbody th,
  .service-table td {
    padding: 2px 0;
    border: 0;
  }

  .service-table td {
    margin-top: 4px;
  }

  .contact-box dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-box dd + dt {
    margin-top: 8px;
  }

  .law-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .law-list dt {
    padding: 16px 0 0;
    border-bottom: 0;
  }

  .law-list dd {
    padding-top: 4px;
  }
}

/* ---------- 埋め込み表示（?embed=1） ---------- */

html.embed {
  --ink: #11181C;
  --ink-soft: #3F4A57;
  --muted: #687076;
  --line: #E5E5E5;
  --bg: #FFFFFF;
  --bg-tint: #F4F5F7;
  --card: #FFFFFF;
  --blue-500: #007AFF;
  --blue-700: #007AFF;
  --blue-300: #8AB8F0;
  color-scheme: light;
  scroll-padding-top: 12px;
}

html.embed body {
  background: var(--bg);
}

html.embed .skip-link,
html.embed .site-header,
html.embed .site-footer {
  display: none;
}

html.embed .legal-hero {
  padding: 20px 0 0;
  background: none;
}

html.embed .legal-eyebrow,
html.embed .legal-lang {
  display: none;
}

html.embed .legal-title {
  margin: 0;
  font-size: 22px;
}

html.embed .legal-dates {
  margin-top: 6px;
  font-size: 13px;
}

html.embed .container {
  width: auto;
  margin-inline: 20px;
}

html.embed .legal-body {
  padding: 20px 0 48px;
}

html.embed .legal-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

html.embed .legal-toc {
  position: static;
  max-height: none;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-tint);
  border: 0;
}

html.embed .legal-toc ol {
  columns: 1;
}

html.embed .legal-article {
  max-width: none;
}

html.embed .legal-article section {
  margin-top: 32px;
  scroll-margin-top: 12px;
}

html.embed .legal-article h2 {
  font-size: 17px;
}

html.embed .legal-intro,
html.embed .note {
  border-radius: 12px;
}

html.embed.theme-dark {
  --ink: #ECEDEE;
  --ink-soft: #C3C7CD;
  --muted: #9BA1A6;
  --line: #38383A;
  --bg: #000000;
  --bg-tint: #1C1C1E;
  --card: #1C1C1E;
  --blue-500: #0A84FF;
  --blue-700: #4DA3FF;
  --blue-300: #2C6FC4;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html.embed:not(.theme-light) {
    --ink: #ECEDEE;
    --ink-soft: #C3C7CD;
    --muted: #9BA1A6;
    --line: #38383A;
    --bg: #000000;
    --bg-tint: #1C1C1E;
    --card: #1C1C1E;
    --blue-500: #0A84FF;
    --blue-700: #4DA3FF;
    --blue-300: #2C6FC4;
    color-scheme: dark;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .legal-toc,
  .skip-link {
    display: none;
  }

  .legal-hero {
    padding: 0 0 16px;
    background: none;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .ph {
    background: none;
  }
}
