:root {
  --m-bg: #faf8f3;
  --m-bg2: #fff;
  --m-bg3: #f5f0e6;
  --m-fg: #1a1a1a;
  --m-fg2: #4a4a4a;
  --m-fg3: #8a7a62;
  --m-accent: #b07840;
  --m-red: #c41e3a;
  --m-border: #d4cbb8;
  --m-shadow: rgba(0,0,0,0.08);
}

body.fullpage {
  background: var(--m-bg);
  color: var(--m-fg);
}

.site-header {
  background: var(--m-bg2);
  border-bottom: 1px solid var(--m-border);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  gap: 1rem;
}

.logo-image { height: 36px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-item {
  color: var(--m-fg2);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--m-accent);
  background: var(--m-bg3);
}

.nav-sep {
  color: var(--m-border);
  font-size: 0.7rem;
}

.nav-highlight {
  background: var(--m-accent);
  color: #fff !important;
  font-weight: 600;
}

.nav-highlight:hover {
  background: var(--m-red) !important;
}

.site-footer {
  background: var(--m-bg2);
  border-top: 1px solid var(--m-border);
  padding: 3rem 1rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-logo { height: 32px; margin-bottom: 0.2rem; }

.footer-brand p {
  font-size: 0.9rem;
  color: var(--m-fg2);
  font-weight: 600;
}

.footer-brand-desc {
  font-size: 0.8rem;
  color: var(--m-fg3);
  line-height: 1.6;
  max-width: 280px;
}

.footer-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--m-fg);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--m-fg3);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--m-accent); }

.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--m-border);
  padding-top: 1.5rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy-left p {
  font-size: 0.75rem;
  color: var(--m-fg3);
  margin-bottom: 0.3rem;
}

.footer-copy-left a {
  color: var(--m-fg3);
  text-decoration: none;
  font-size: 0.75rem;
}

.footer-copy-left a:hover { color: var(--m-accent); }

.footer-copy-right {
  display: flex;
  gap: 1.5rem;
}

.footer-copy-right a {
  color: var(--m-fg3);
  text-decoration: none;
  font-size: 0.75rem;
}

.footer-copy-right a:hover { color: var(--m-accent); }

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-copy {
    flex-direction: column;
    text-align: center;
  }
  .footer-copy-right { justify-content: center; }
}

.manga-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.manga-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header-tag {
  display: inline-block;
  background: var(--m-red);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.manga-header h1 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--m-fg);
  letter-spacing: 0.05em;
}

.manga-header .subtitle {
  font-size: 0.85rem;
  color: var(--m-fg3);
  margin-top: 0.3rem;
}

.manga-series-block {
  margin-bottom: 3rem;
}

.series-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--m-bg2);
  border: 1px solid var(--m-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px var(--m-shadow);
}

.series-cover {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.series-info {
  flex: 1;
  min-width: 0;
}

.series-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--m-fg);
  margin-bottom: 0.5rem;
}

.series-desc {
  font-size: 0.85rem;
  color: var(--m-fg2);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.series-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--m-fg2);
}

.series-stats span {
  background: var(--m-bg3);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.chapters-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--m-fg);
  margin-bottom: 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--m-accent);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.chapter-item {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  background: var(--m-bg2);
  border: 1px solid var(--m-border);
  border-radius: 6px;
  padding: 0.8rem;
  text-decoration: none;
  color: var(--m-fg);
  transition: all 0.2s;
}

.chapter-item:hover {
  border-color: var(--m-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--m-shadow);
}

.chapter-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.chapter-info { flex: 1; min-width: 0; }

.chapter-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--m-fg);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-pages {
  font-size: 0.75rem;
  color: var(--m-fg2);
}

.chapter-num {
  width: 28px;
  height: 28px;
  background: var(--m-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .series-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .series-cover {
    width: 120px;
    height: 160px;
  }

  .series-stats {
    justify-content: center;
  }

  .chapters-grid {
    grid-template-columns: 1fr;
  }
}