:root {
  color-scheme: light dark;
  --bg: #f8f4ec;
  --surface: #fffdf8;
  --surface-muted: #efe7da;
  --text: #1f1b18;
  --text-muted: #5f554c;
  --border: #e2d8c8;
  --accent: #a8321a;
  --door-a: #b83b1d;
  --door-b: #18588f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #231e1b;
    --surface-muted: #2d2622;
    --text: #f4ede2;
    --text-muted: #c2b6a8;
    --border: #3a312b;
    --accent: #f0825a;
    --door-a: #b83b1d;
    --door-b: #18588f;
  }
}

* { box-sizing: border-box; }

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", sans-serif;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 0.18em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { left: 8px; top: 8px; z-index: 10; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand-mark { display: inline-flex; gap: 3px; }
.brand-mark span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 28px;
  border-radius: 11px 11px 3px 3px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.brand-mark .a { background: var(--door-a); }
.brand-mark .b { background: var(--door-b); }

.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.92rem; }
.site-header nav a { color: var(--text-muted); text-decoration: none; padding: 6px 0; }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.site-header nav a:hover { color: var(--accent); }

main { padding-top: 28px; padding-bottom: 56px; }

h1 { font-size: 1.65rem; line-height: 1.4; margin: 0.2em 0 0.4em; }
h2 {
  font-size: 1.22rem;
  line-height: 1.5;
  margin: 2.2em 0 0.6em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 1rem; margin: 1.5em 0 0.3em; }

.intro { font-size: 1.05rem; }
.meta { color: var(--text-muted); font-size: 0.9rem; }

.note {
  margin: 1.4em 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-muted);
}

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 10px; vertical-align: top; text-align: left; }
th { width: 9.5em; background: var(--surface-muted); font-weight: 700; }

@media (max-width: 520px) {
  th, td { display: block; width: auto; }
  td { border-top: 0; }
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.site-footer .wrap { padding-top: 18px; padding-bottom: 28px; }
