/* ===== 日本書紀 現代語訳サイト ===== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  color: #2c2c2c;
  background-color: #f9f6f0;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.site-header {
  background: linear-gradient(135deg, #3a2e28 0%, #5c4a3a 100%);
  color: #e8e0d4;
  padding: 2rem 1rem;
  text-align: center;
}

.site-header h1 {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  margin-bottom: 0.3rem;
}

.site-header .subtitle {
  font-size: 0.95rem;
  color: #c4b8a8;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* --- Top Page --- */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #d6cfc4;
  margin-bottom: 2.5rem;
}

.hero h2 {
  font-size: 1.3rem;
  font-weight: 400;
  color: #5c4a3a;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 0.95rem;
  color: #7a6e62;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Table of Contents --- */
.toc {
  margin-bottom: 3rem;
}

.toc h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #3a2e28;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #5c4a3a;
  letter-spacing: 0.05em;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  border-bottom: 1px solid #e8e0d4;
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0.5rem;
  color: #2c2c2c;
  text-decoration: none;
  transition: background 0.2s, padding-left 0.2s;
  border-radius: 4px;
}

.toc-list a:hover {
  background: #efe9df;
  padding-left: 1rem;
}

.toc-list .vol-num {
  font-size: 0.85rem;
  color: #8a7e72;
  min-width: 4em;
}

.toc-list .vol-title {
  flex: 1;
  font-size: 1.02rem;
}

.toc-list .vol-status {
  font-size: 0.8rem;
  color: #b0a696;
  margin-left: 1rem;
}

.toc-list .vol-status.ready {
  color: #6a8f5c;
}

/* --- Volume Page --- */
.vol-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid #d6cfc4;
  margin-bottom: 2.5rem;
}

.vol-header .vol-label {
  font-size: 0.9rem;
  color: #8a7e72;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.vol-header h2 {
  font-size: 1.6rem;
  font-weight: 400;
  color: #3a2e28;
  letter-spacing: 0.1em;
}

.vol-header .vol-desc {
  font-size: 0.9rem;
  color: #7a6e62;
  margin-top: 0.8rem;
}

/* --- Sections --- */
.section {
  margin-bottom: 3rem;
}

.section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #3a2e28;
  margin-bottom: 1.2rem;
  padding-left: 0.8rem;
  border-left: 3px solid #8a7e72;
}

.section p {
  font-size: 1.02rem;
  margin-bottom: 1rem;
  text-indent: 1em;
}

.section p.no-indent {
  text-indent: 0;
}

/* --- Alternative Accounts (一書) --- */
.alt-account {
  background: #f0ebe3;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 3px solid #c4b8a8;
}

.alt-account .alt-label {
  font-size: 0.85rem;
  color: #8a7e72;
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.alt-account p {
  font-size: 0.95rem;
  color: #4a4038;
}

/* --- God Names --- */
.god-name {
  font-weight: 600;
  color: #5c4a3a;
}

.place-name {
  font-weight: 600;
  color: #4a6858;
}

/* --- Section Navigation --- */
.section-nav {
  margin-bottom: 2rem;
  background: #f0ebe3;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
}

.section-nav summary {
  font-size: 0.95rem;
  color: #5c4a3a;
  cursor: pointer;
  font-weight: 600;
}

.section-nav ul {
  list-style: none;
  margin-top: 0.8rem;
  columns: 2;
  column-gap: 1rem;
}

.section-nav li {
  margin-bottom: 0.4rem;
}

.section-nav a {
  font-size: 0.9rem;
  color: #5c4a3a;
  text-decoration: none;
  border-bottom: 1px dotted #c4b8a8;
}

.section-nav a:hover {
  color: #3a2e28;
  border-bottom-color: #3a2e28;
}

/* --- Separator --- */
.section-sep {
  border: none;
  border-top: 1px solid #d6cfc4;
  margin: 2.5rem auto;
  width: 40%;
}

/* --- Page Navigation --- */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid #d6cfc4;
  margin-top: 3rem;
}

.page-nav a {
  font-size: 0.95rem;
  color: #5c4a3a;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #d6cfc4;
  border-radius: 4px;
  transition: background 0.2s;
}

.page-nav a:hover {
  background: #efe9df;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #8a7e72;
  font-size: 0.85rem;
  border-top: 1px solid #e8e0d4;
}

.site-footer a {
  color: #5c4a3a;
  text-decoration: none;
}

/* --- Note / Commentary --- */
.note {
  font-size: 0.9rem;
  color: #7a6e62;
  background: #faf7f2;
  border: 1px dashed #d6cfc4;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}

.note::before {
  content: "\1F4DD ";
}

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

  .site-header h1 {
    font-size: 1.4rem;
  }

  .container {
    padding: 1.5rem 1rem 3rem;
  }

  .section-nav ul {
    columns: 1;
  }

  .page-nav {
    flex-direction: column;
    gap: 0.8rem;
  }

  .page-nav a {
    width: 100%;
    text-align: center;
  }
}

/* --- Volume Illustration --- */
.vol-illustration {
  width: 100%;
  max-width: 780px;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(58, 46, 40, 0.1);
}

.vol-illustration img {
  width: 100%;
  height: auto;
  display: block;
}
