:root {
  color-scheme: light;
  --ink: #222b26;
  --muted: #66736b;
  --green: #4f946b;
  --green-deep: #2f6f55;
  --green-soft: #ddebdc;
  --yellow: #f2c75c;
  --yellow-soft: #fff1c7;
  --surface: #ffffff;
  --surface-warm: #fffdf8;
  --app-bg: #faf7f0;
  --line: #e8ded2;
  --line-strong: #d7cabb;
  --quiet: #96a099;
  --container: 1180px;
  --shadow: 0 12px 36px rgb(34 43 38 / 8%);
}

* { box-sizing: border-box; }
html { background: var(--app-bg); }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--app-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.85;
}

a { color: var(--green-deep); text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--green-deep);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid rgb(232 222 210 / 72%);
  background: rgb(250 247 240 / 88%);
  backdrop-filter: blur(18px) saturate(1.2);
}
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; color: var(--ink); }
.brand img { width: 40px; height: 40px; object-fit: cover; border-radius: 11px; }
.brand > span { display: grid; gap: 3px; line-height: 1; }
.brand strong { font-size: 17px; font-weight: 800; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .035em; }
.nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 13px; font-weight: 650; }
.nav a { transition: color 180ms ease; }
.nav a:hover { color: var(--green-deep); }
.menu-button { width: 44px; height: 44px; display: none; place-content: center; gap: 6px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menu-button span { width: 21px; height: 2px; display: block; background: var(--ink); transition: transform 180ms ease; }

.legal-shell {
  width: min(calc(100% - 48px), 820px);
  margin: 0 auto;
  padding: 146px 0 110px;
}
h1 {
  margin: 0 0 42px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.25;
  letter-spacing: -.04em;
}
.legal-content {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-warm);
  box-shadow: var(--shadow);
}
.legal-content h2 {
  margin: 38px 0 10px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
  color: var(--green-deep);
  font-size: 20px;
  line-height: 1.45;
}
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-content p { margin: 0 0 12px; color: #46534c; font-size: 14px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-table-wrap { overflow-x: auto; margin: 25px 0 0; }
.legal-content table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 13px; }
.legal-content th,
.legal-content td { padding: 13px 15px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.legal-content th { color: var(--green-deep); background: var(--green-soft); font-weight: 700; }
.legal-content td:first-child { width: 28%; color: var(--ink); font-weight: 700; background: rgb(221 235 220 / 28%); }

.footer { padding: 60px 0 42px; color: rgb(255 255 255 / 65%); background: #183a2e; }
.footer .brand strong { color: white; }
.footer .brand small { color: rgb(255 255 255 / 42%); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .85fr 1.35fr; align-items: start; gap: 54px; }
.footer-grid > div { display: grid; align-content: start; gap: 12px; font-size: 12px; line-height: 1.5; }
.footer-intro p { max-width: 360px; color: rgb(255 255 255 / 58%); font-size: 12px; line-height: 1.75; }
.footer-group h3 { margin: 0 0 5px; color: white; font-size: 12px; }
.footer-grid a { color: inherit; }
.footer-grid a:hover { color: white; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 54px; padding-top: 28px; border-top: 1px solid rgb(255 255 255 / 12%); color: rgb(255 255 255 / 46%); font-size: 10px; line-height: 1.7; }
.footer-bottom p { max-width: 650px; margin: 0; text-align: right; }

@media (max-width: 820px) {
  body.menu-open { overflow: hidden; }
  .container { width: calc(100% - 36px); max-width: var(--container); min-width: 0; }
  .header-inner { min-height: 64px; }
  .brand img { width: 38px; height: 38px; border-radius: 11px; }
  .brand small { display: none; }
  .menu-button { display: grid; }
  .nav { position: fixed; inset: 64px 0 auto; display: grid; gap: 0; padding: 12px 18px 20px; border-bottom: 1px solid var(--line); background: rgb(250 247 240 / 98%); opacity: 0; pointer-events: none; transform: translateY(-12px); transition: opacity 180ms ease, transform 180ms ease; }
  .nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav a { min-height: 52px; display: flex; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); }
  .legal-shell { width: min(calc(100% - 36px), 820px); padding: 118px 0 82px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-intro, .legal-group { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
  .footer-bottom p { text-align: left; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .legal-shell { width: min(calc(100% - 28px), 820px); padding: 98px 0 70px; }
  .legal-content { padding: 22px 18px; border-radius: 16px; }
  .legal-content p { font-size: 13px; }
  .legal-table-wrap { overflow: visible; margin: 20px 0 0; }
  .legal-content table { min-width: 0; display: block; font-size: 13px; }
  .legal-content thead { display: none; }
  .legal-content tbody { display: grid; gap: 14px; }
  .legal-content tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .legal-content td { display: grid; grid-template-columns: minmax(6.5em, 34%) minmax(0, 1fr); gap: 12px; padding: 12px 13px; border: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; word-break: break-word; }
  .legal-content td::before { content: attr(data-label); color: var(--green-deep); font-size: 11px; font-weight: 700; line-height: 1.55; }
  .legal-content td:last-child { border-bottom: 0; }
  .legal-content td:first-child { width: auto; }
  .legal-content .legal-definition-table td,
  .legal-content .legal-record-table td:first-child { display: block; }
  .legal-content .legal-definition-table td::before,
  .legal-content .legal-record-table td:first-child::before { display: none; content: none; }
  .legal-content .legal-definition-table td:first-child,
  .legal-content .legal-record-table td:first-child { padding: 13px; color: var(--ink); font-weight: 700; background: var(--green-soft); }
  .legal-content .legal-definition-table td:nth-child(2) { padding: 13px; }
  .legal-content .legal-definition-table tbody { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .legal-content .legal-definition-table tr { border: 0; border-radius: 0; background: transparent; }
  .legal-content .legal-definition-table tr + tr { border-top: 1px solid var(--line); }
  .legal-content .legal-definition-table td:first-child { padding: 12px 16px 0; color: var(--muted); font-size: 11px; font-weight: 700; background: transparent; }
  .legal-content .legal-definition-table td:nth-child(2) { padding: 3px 16px 13px; color: var(--ink); font-size: 13px; font-weight: 400; }
  .legal-content.legal-content-definition { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .legal-content.legal-content-definition .legal-definition-table tbody { border: 0; border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px rgb(47 52 48 / 6%); }
  .legal-content.legal-content-definition .legal-definition-table tr { position: relative; border: 0; border-radius: 0; }
  .legal-content.legal-content-definition .legal-definition-table tr + tr { border-top: 0; }
  .legal-content.legal-content-definition .legal-definition-table tr + tr::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: 1px solid var(--line); }
  .legal-content.legal-content-definition .legal-definition-table td { border: 0; }
  .legal-content.legal-content-definition .legal-definition-table td:first-child { padding: 12px 16px 0; color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 500; }
  .legal-content.legal-content-definition .legal-definition-table td:nth-child(2) { padding: 8px 16px 12px; color: var(--ink); font-size: 15px; line-height: 22px; font-weight: 400; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-intro, .legal-group { grid-column: auto; }
}
