:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #24211e;
  --muted: #6f6860;
  --line: #e5e5e5;
  --accent: #9f3f2f;
  --accent-strong: #7d3025;
  --ink: #253746;
  --soft-blue: #ffffff;
  --soft-gold: #ffffff;
  --shadow: 0 20px 60px rgba(55, 45, 35, 0.12);
  --radius: 8px;
  --header-height: 64px;
  --anchor-gap: 20px;
  --anchor-offset: 40px;
  --toc-width: 260px;
  --layout-gap: 32px;
  font-family:
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: #ffffff;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-top: var(--header-height);
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.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: var(--header-height);
}

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

.brand span:not(.brand-mark) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.menu-toggle,
.menu-close {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  gap: 4px;
  padding: 10px;
}

.menu-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle:hover,
.menu-close:hover {
  background: rgba(231, 238, 242, 0.68);
  color: var(--accent-strong);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(36, 33, 30, 0.34);
  opacity: 0;
  transition: opacity 180ms ease;
}

.menu-backdrop.is-open {
  opacity: 1;
}

.menu-backdrop[hidden],
.site-menu[hidden] {
  display: none;
}

.site-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100% - 80px));
  height: 100dvh;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

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

.site-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.site-menu-header p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.menu-close {
  width: 36px;
  height: 36px;
  font-size: 1.55rem;
  line-height: 1;
}

.site-menu a {
  padding: 13px 8px;
  border-bottom: 1px solid rgba(222, 215, 205, 0.72);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

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

.hero {
  background: #ffffff;
}

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

@media (min-width: 641px) {
  .hero-inner {
    display: grid;
    grid-template-columns: var(--toc-width) minmax(0, 1fr);
    column-gap: var(--layout-gap);
  }

  .hero-inner > h1,
  .hero-inner > .lead,
  .hero-inner > .summary-panel {
    grid-column: 1 / -1;
  }

  .hero-inner > .meta-list {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(980px, 100%);
    max-width: 980px;
  }
}

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;
  overflow-wrap: anywhere;
}

.summary-panel {
  min-width: 0;
  max-width: 980px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.summary-panel h2 {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.summary-grid article {
  min-width: 0;
  min-height: auto;
  padding: 0;
  background: var(--surface-strong);
}

.summary-grid h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.summary-grid h3 a {
  color: var(--ink);
  text-decoration: none;
}

.summary-grid h3 a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.summary-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.meta-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(360px, 100%);
  max-width: 360px;
  margin: 32px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
}

.meta-list div {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 14px 16px;
  background: #ffffff;
}

.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: var(--toc-width) minmax(0, 1fr);
  gap: var(--layout-gap);
  width: min(1120px, calc(100% - 32px));
  max-width: 100%;
  margin: 40px auto 72px;
  align-items: start;
}

.home-layout {
  width: min(960px, calc(100% - 32px));
  max-width: 100%;
  margin: 40px auto 72px;
}

.toc {
  min-width: 0;
  position: relative;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.toc.is-fixed {
  position: fixed;
  top: calc(var(--header-height) + 24px);
  left: var(--toc-fixed-left, max(16px, calc((100vw - 1120px) / 2)));
  z-index: 5;
  width: var(--toc-fixed-width, var(--toc-width));
}

.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 {
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.terms-section {
  min-width: 0;
  max-width: 100%;
  padding: 34px 42px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  scroll-margin-top: var(--anchor-offset);
}

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

.terms-section ol,
.terms-section ul {
  max-width: 100%;
  padding-left: 1.3rem;
}

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

.subsection-title {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

.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: #ffffff;
  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;
  min-width: 0;
  max-width: 100%;
  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;
}

.effective-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: right;
}

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

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

.footer-inner p {
  margin: 0;
}

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

  .toc {
    position: static;
    width: auto;
    max-height: none;
    overflow-y: visible;
  }

  .toc.is-fixed {
    position: static;
    width: auto;
  }

  .terms-card {
    grid-column: auto;
  }

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

@media (max-width: 640px) {
  :root {
    --header-height: 56px;
    --anchor-offset: 68px;
  }

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

  .header-inner {
    min-height: 56px;
    padding: 7px 0;
  }

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

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

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

  .summary-panel {
    padding: 18px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

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

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

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

  .policy-table {
    min-width: 620px;
  }
}

@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;
  }
}
