:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #59636e;
  --border: #d8dee4;
  --accent: #2f6f9f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --surface: #1e2227;
    --text: #e6e8eb;
    --text-muted: #a0a8b2;
    --border: #353b42;
    --accent: #7fb5dc;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  line-break: strict;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.policy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 48px;
}

.policy-header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

h2 {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  font-size: 1.15rem;
  line-height: 1.5;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  margin-bottom: 8px;
}

section {
  margin-top: 36px;
}

/* 事業者情報 */
.info {
  margin: 0 0 12px;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
}

.info dt {
  font-weight: 600;
}

.info dd {
  margin: 0;
}

/* 条項（1. 2. …）と号（(1) (2) …） */
.clauses,
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.clauses > li,
.items > li {
  display: flex;
  gap: 0.5em;
}

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

.items {
  margin: 4px 0 12px;
}

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

.num {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.clauses > li > .num {
  min-width: 1.5em;
}

.items > li > .num {
  min-width: 2em;
}

.clause-body {
  flex: 1;
  min-width: 0;
}

.clause-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.policy-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  text-align: right;
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.8;
  }

  .container {
    padding: 16px 12px 40px;
  }

  .policy {
    padding: 24px 18px;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.05rem;
  }

  section {
    margin-top: 28px;
  }

  .policy-footer {
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .policy {
    border: none;
    padding: 0;
  }
}

a {
  color: var(--accent);
  word-break: break-all;
}
