:root {
  --bg: #fafafa;
  --fg: #222;
  --muted: #666;
  --line: #ddd;
  --link: #0645ad;
  --code-bg: #f1f1f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 18px 56px;
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

a {
  color: var(--link);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.8rem;
  line-height: 1.3;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

code,
pre {
  font-family: Consolas, "Courier New", monospace;
}

code {
  padding: 0.1em 0.3em;
  background: var(--code-bg);
  border-radius: 4px;
}

pre {
  overflow-x: auto;
  padding: 12px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

pre code {
  padding: 0;
  background: transparent;
}

.hero {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.hero__seal {
  display: none;
}

.eyebrow,
.section-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  color: #333;
  font-size: 1.05rem;
}

.hero__meta,
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.toc {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.toc a {
  text-decoration: none;
}

.panel {
  margin-bottom: 34px;
}

.statement {
  display: grid;
  gap: 18px;
}

.mission-list {
  padding-left: 1.4rem;
}

.section-note,
.notice {
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 18px;
}

.card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.card summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.card summary::-webkit-details-marker {
  display: none;
}

.card summary::after {
  margin-left: auto;
  color: var(--muted);
  content: "開く";
  font-size: 0.85rem;
}

.card[open] summary {
  margin-bottom: 12px;
}

.card[open] summary::after {
  content: "閉じる";
}

.card summary h3 {
  margin-bottom: 0;
}

.card__number {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.card summary .card__number {
  margin-bottom: 0;
}

.book-gallery {
  margin-top: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.game-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.spoiler {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

.spoiler summary {
  cursor: pointer;
}

.spoiler p {
  margin: 10px 0 0;
  color: var(--muted);
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #eee;
  border: 1px solid var(--line);
}

figure.is-missing::before {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  content: "image pending";
  color: var(--muted);
  background: #eee;
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.closing {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  body {
    padding: 22px 14px 44px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .card summary {
    align-items: flex-start;
  }

  .game-images {
    grid-template-columns: 1fr;
  }
}
