
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  color: #333;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; border-bottom: 2px solid #333; padding-bottom: 0.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 1rem 0; }

pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

code {
  font-family: "Source Code Pro", Consolas, monospace;
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
}

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

blockquote {
  border-left: 4px solid #ddd;
  margin: 1rem 0;
  padding-left: 1rem;
  color: #666;
}

ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

hr.chapter-break {
  margin: 4rem 0;
  border-top: 3px double #333;
}

/* Navigation */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 2rem;
}

.chapter-nav:last-of-type {
  border-bottom: none;
  border-top: 1px solid #ddd;
  margin-top: 2rem;
  margin-bottom: 0;
}

.chapter-nav a {
  color: #0066cc;
  text-decoration: none;
}

.chapter-nav a:hover {
  text-decoration: underline;
}

.chapter-nav .prev,
.chapter-nav .next {
  flex: 1;
}

.chapter-nav .next {
  text-align: right;
}

.chapter-nav .toc {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 4px;
}

/* Book header */
.book-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #333;
}

.book-header h1 {
  border: none;
  font-size: 2.5rem;
}

.book-header .author {
  font-size: 1.2rem;
  color: #666;
}

.book-header .description {
  margin-top: 1rem;
  color: #666;
}

/* Book navigation */
.book-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.book-nav a {
  padding: 0.75rem 1.5rem;
  background: #0066cc;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.book-nav a:hover {
  background: #0052a3;
}

.book-nav .epub-link {
  background: #28a745;
}

.book-nav .epub-link:hover {
  background: #218838;
}

/* TOC */
.toc {
  list-style: decimal;
  padding-left: 2rem;
}

.toc li {
  margin: 0.5rem 0;
}

.toc a {
  color: #0066cc;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #666;
}

/* Article */
article {
  margin-bottom: 2rem;
}
