:root {
  color-scheme: light;
  --ink: #082c3b;
  --body: #344d4a;
  --muted: #667773;
  --line: #dce2dd;
  --paper: #fff;
  --bg: #f7f7f3;
  --teal: #008f8b;
  --teal-soft: #e9f7f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
}
a { color: var(--teal); text-underline-offset: .18em; }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(22px, calc((100vw - 940px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 243, .96);
  backdrop-filter: blur(12px);
}
.legal-header img { display: block; width: 152px; }
.back { color: var(--teal); font-size: .84rem; font-weight: 800; text-decoration: none; }

main { width: min(940px, calc(100% - 36px)); margin: 0 auto 72px; }
.legal-hero { padding: 58px 0 34px; }
.legal-hero p, .label { margin: 0; color: var(--teal); font-size: .71rem; font-weight: 900; letter-spacing: .16em; }
.legal-hero h1 { margin: 8px 0 9px; font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.22; letter-spacing: -.045em; }
.legal-hero span { color: var(--muted); font-size: .83rem; }

.legal-tabs {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.legal-tabs a {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}
.legal-tabs a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }

article {
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 16px 44px rgba(15, 37, 34, .05);
}
article > h2 { margin: 5px 0 12px; font-size: clamp(1.55rem, 4vw, 2.1rem); letter-spacing: -.035em; }
article > .lead { margin: 0 0 18px; font-size: .95rem; }
article section { scroll-margin-top: 88px; padding: 22px 0; border-top: 1px solid var(--line); }
article section:first-of-type { margin-top: 18px; }
article h3 { margin: 0 0 9px; font-size: 1.02rem; line-height: 1.55; }
article p, article li, article dd, article dt { color: var(--body); font-size: .9rem; }
article p { margin: .55em 0 0; }
article ol, article ul { margin: .55em 0 0; padding-left: 1.45rem; }
article li + li { margin-top: .5em; }
article strong { color: var(--ink); }
.document-end { margin: 22px 0 0; text-align: right; color: var(--muted); }
.source-note { padding: 14px 16px; border-radius: 12px; background: var(--teal-soft); }

.legal-definition, .retention-table, .provider-table, .commerce-list { margin: 0; }
.legal-definition > div, .retention-table > div, .provider-table > div, .commerce-list > div {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.legal-definition > div:first-child, .retention-table > div:first-child, .provider-table > div:first-child, .commerce-list > div:first-child { border-top: 0; }
.legal-definition dt, .retention-table dt, .provider-table dt, .commerce-list dt { font-weight: 800; color: var(--ink); }
.legal-definition dd, .retention-table dd, .provider-table dd, .commerce-list dd { margin: 0; }
.commerce-list > div { grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr); padding: 18px 0; }
.commerce-list dd > strong { display: block; margin-top: 8px; }
.commerce-list dd > strong:first-child { margin-top: 0; }
.commerce-list small { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.commerce-list ul { margin-top: 4px; }

.document-list { display: grid; gap: 10px; margin-top: 24px; }
.document-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.document-list a:hover { border-color: #9ecbc5; background: #f8fcfb; }
.document-list span { display: grid; gap: 2px; }
.document-list strong { font-size: .95rem; }
.document-list small { color: var(--muted); font-size: .78rem; }
.document-list b { color: var(--teal); font-size: 1rem; }

footer { padding: 30px; text-align: center; color: var(--muted); font-size: .75rem; }

@media (max-width: 620px) {
  .legal-header { height: 62px; padding: 0 18px; }
  .legal-header img { width: 132px; }
  main { width: min(100% - 24px, 940px); }
  .legal-hero { padding: 36px 2px 25px; }
  .legal-hero h1 { font-size: 1.78rem; }
  .legal-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    margin-inline: 0;
  }
  .legal-tabs a {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 12px;
    text-align: center;
    line-height: 1.35;
  }
  article { padding: 24px 19px; border-radius: 17px; }
  article p, article li, article dd, article dt { font-size: .86rem; }
  .legal-definition > div, .retention-table > div, .provider-table > div, .commerce-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 14px 0;
  }
  .document-list a { padding: 15px; }
}
