:root {
  color-scheme: light dark;
  --background: #f0f9ff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #bae6fd;
  --brand: #0369a1;
  --brand-strong: #075985;
  --shadow: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #ffffff;
  background: var(--brand-strong);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 32px), 760px);
  margin: 0 auto;
  padding: 40px 0 56px;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.35;
  text-align: center;
}

.app-name {
  margin: 8px 0 32px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.card {
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 8px var(--shadow);
}

h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.5;
}

p {
  margin: 0 0 12px;
}

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

ul,
ol {
  margin: 8px 0 12px;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-strong);
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--border);
  outline-offset: 3px;
}

.lead {
  max-width: 42rem;
  margin: 8px auto 32px;
  color: var(--muted);
  text-align: center;
}

.legal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-links li {
  margin: 0;
}

.legal-links a {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--background);
  font-weight: 700;
  text-align: center;
}

.notice {
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--brand);
  border-radius: 0.6rem;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  width: 30%;
  font-weight: 700;
}

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

.updated {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .container {
    width: min(calc(100% - 24px), 760px);
    padding-top: 28px;
  }

  .card {
    padding: 22px 18px;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  th {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  td {
    padding-top: 2px;
  }

  .legal-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #082f49;
    --surface: #0f172a;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: #0c4a6e;
    --brand: #7dd3fc;
    --brand-strong: #bae6fd;
    --shadow: rgba(0, 0, 0, 0.24);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  :root {
    --background: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #334155;
    --border: #cbd5e1;
    --shadow: transparent;
  }

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

  .card {
    break-inside: avoid;
  }

  .footer-nav,
  .skip-link {
    display: none;
  }
}
