/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "游明朝", "Yu Mincho", "Hiragino Mincho ProN", "HG明朝E",
    serif;
  line-height: 1.9;
  color: #333;
  background-color: #faf9f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #4a6741;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Header ===== */
.site-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-bottom: 1px solid #e0ddd5;
}

.site-title {
  font-size: 1.5rem;
  font-weight: normal;
  color: #333;
  letter-spacing: 0.15em;
}

.site-title:hover {
  text-decoration: none;
  color: #555;
}

/* ===== Main ===== */
main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid #e0ddd5;
  font-size: 0.85rem;
  color: #999;
}

/* ===== Novel List (Top Page) ===== */
.list-heading {
  font-size: 1.2rem;
  font-weight: normal;
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  color: #555;
}

.novel-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.novel-card a {
  display: block;
  background: #fff;
  border: 1px solid #e8e6e0;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  color: inherit;
}

.novel-card a:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.novel-card-thumbnail img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.novel-card-info {
  padding: 0.8rem 1rem;
}

.novel-card-title {
  font-size: 1rem;
  line-height: 1.5;
}

/* ===== Novel Detail Page ===== */
.novel-header {
  margin-bottom: 2rem;
  text-align: center;
}

.novel-title {
  font-size: 1.6rem;
  font-weight: normal;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.novel-meta {
  font-size: 0.85rem;
  color: #888;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.novel-thumbnail {
  margin-bottom: 2rem;
  text-align: center;
}

.novel-thumbnail img {
  max-width: 100%;
  border-radius: 4px;
  margin: 0 auto;
}

.novel-body {
  margin-bottom: 3rem;
}

.novel-body p {
  margin-bottom: 1em;
  text-indent: 1em;
}

.novel-body h2,
.novel-body h3,
.novel-body h4 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: normal;
}

.novel-body h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid #e0ddd5;
  padding-bottom: 0.3rem;
}

.novel-body h3 {
  font-size: 1.15rem;
}

.novel-body blockquote {
  border-left: 3px solid #d0cdc5;
  padding-left: 1em;
  margin: 1.5em 0;
  color: #666;
}

.novel-body hr {
  border: none;
  border-top: 1px solid #e0ddd5;
  margin: 2em 0;
}

/* ===== Notes ===== */
.novel-notes {
  background: #f5f4f0;
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.novel-notes h2 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.6rem;
  color: #666;
}

.novel-notes-content ul {
  padding-left: 1.2em;
}

.novel-notes-content li {
  margin-bottom: 0.3em;
}

.novel-notes-content p {
  margin-bottom: 0.5em;
}

/* ===== Back Link ===== */
.novel-back {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #e0ddd5;
}

.novel-back a {
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .novel-cards {
    grid-template-columns: 1fr;
  }

  .novel-meta {
    flex-direction: column;
    gap: 0.3rem;
  }

  .novel-title {
    font-size: 1.4rem;
  }
}
