:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --text: #24211e;
  --muted: #6f6860;
  --line: #ded7cd;
  --accent: #9f3f2f;
  --accent-strong: #7d3025;
  --ink: #253746;
  --soft-blue: #e7eef2;
  --soft-gold: #f5ead1;
  --shadow: 0 20px 60px rgba(55, 45, 35, 0.12);
  --radius: 8px;
  font-family:
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(231, 238, 242, 0.72), rgba(247, 245, 239, 0) 360px),
    var(--bg);
  color: var(--text);
  line-height: 1.8;
  letter-spacing: 0;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(222, 215, 205, 0.82);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  gap: 20px;
}

.header-inner {
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fffdfa;
  font-size: 0.95rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
}

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  font-weight: 800;
}

h2 {
  font-size: 1.35rem;
  color: var(--ink);
}

.lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: #413b35;
  font-size: 1.05rem;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 840px;
  margin: 32px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.meta-list div {
  padding: 14px 16px;
  background: rgba(255, 253, 250, 0.88);
}

.meta-list dt,
.meta-list dd {
  margin: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.meta-list dd {
  color: var(--text);
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  width: min(1120px, calc(100% - 32px));
  margin: 40px auto 72px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.78);
}

.toc-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.toc ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-strong);
}

.terms-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.terms-section {
  padding: 34px 42px;
  border-bottom: 1px solid var(--line);
}

.terms-section p,
.terms-section ol {
  margin: 14px 0 0;
}

.terms-section ol {
  padding-left: 1.3rem;
}

.terms-section li + li {
  margin-top: 8px;
}

.table-wrap {
  max-width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.policy-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.policy-table thead th {
  background: var(--ink);
  color: #fffdfa;
  font-weight: 700;
}

.policy-table tbody th {
  width: 24%;
  background: rgba(231, 238, 242, 0.6);
  color: var(--ink);
  font-weight: 800;
}

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

.check-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 1.2rem;
}

.note {
  padding: 14px 16px;
  border-left: 4px solid #b38b2d;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--soft-gold);
  color: #4d3d18;
}

.contact-box {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  font-style: normal;
}

.template-note {
  margin: 0;
  padding: 30px 42px 34px;
  background: var(--soft-blue);
}

.template-note h2 {
  font-size: 1.05rem;
}

.template-note p {
  margin: 10px 0 0;
  color: #334653;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 76px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .header-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .hero-inner {
    width: min(100% - 24px, 1120px);
    padding: 48px 0 32px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .layout {
    width: min(100% - 24px, 1120px);
    margin: 24px auto 48px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .terms-section,
  .template-note {
    padding: 26px 20px;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .hero-inner,
  .layout {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .layout {
    display: block;
  }

  .terms-card {
    border: 0;
    box-shadow: none;
  }

  .terms-section,
  .template-note {
    break-inside: avoid;
    padding: 18px 0;
  }
}
