:root {
  color-scheme: light;
  --text: #2a2620;
  --muted: #6b6355;
  --bg: #e3f0fa;
  --accent: #a6432f;
  --border: #e2dccc;
  --max-width: 42rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Noto Serif", "Times New Roman", serif;
  line-height: 1.65;
  font-size: 1.125rem;
}

h1, h2 {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin: 1.25rem 0 0.25rem;
}

.hero .author {
  font-size: 1.2rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.hero .subtitle,
.hero .imprint {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.original-link {
  margin-top: 2rem;
  font-size: 0.95rem;
}

.illust {
  margin: 2rem auto;
}

.illust img {
  margin: 0 auto;
  border-radius: 2px;
}

.illust.cover img {
  max-width: 380px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.35);
}

.illust.cover.small img {
  max-width: 180px;
}

.illust.story img {
  max-width: 480px;
}

.toc {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 1.25rem 1.25rem 0.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.toc h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.toc ol {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.25rem;
  margin: 0 0 0.75rem;
}

.toc li {
  break-inside: avoid;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.chapter {
  padding-top: 2.5rem;
  scroll-margin-top: 1rem;
}

.chapter + .chapter {
  border-top: 1px solid var(--border);
}

.chapter h2 {
  font-size: 1.5rem;
  color: var(--accent);
}

.chapter p {
  margin: 0 0 1.1rem;
}

p.chatlog {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  background: #f1ece0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  line-height: 1.5;
}

blockquote.excerpt {
  margin: 1.25rem 0 1.5rem;
  padding: 0.1rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}

blockquote.excerpt p {
  margin: 0 0 0.9rem;
}

blockquote.excerpt p:last-child {
  margin-bottom: 0;
}

p.verse {
  margin: 1.25rem 0 1.5rem;
  line-height: 1.5;
}

p.aside {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.5rem 0;
}

hr.scenebreak {
  border: none;
  text-align: center;
  margin: 2rem 0;
  color: var(--muted);
}

hr.scenebreak::before {
  content: "***";
  letter-spacing: 0.4em;
}

.illust.closing {
  margin-top: 3rem;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

footer p {
  margin: 0.35rem 0;
}

.review-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.review-page h1 {
  font-size: 1.6rem;
  margin: 1.5rem 0 0.25rem;
  text-align: center;
}

.byline {
  text-align: center;
  color: var(--muted);
  margin: 0 0 2rem;
}

.back-link {
  display: inline-block;
  margin: 0.5rem 0;
  font-size: 0.95rem;
  text-decoration: none;
}

@media (max-width: 600px) {
  body { font-size: 1.05rem; }
  .hero h1 { font-size: 1.9rem; }
  .toc ol { columns: 1; }
}
