:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-nav: #0f0f0f;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #c8c8c8;
  --border: #2a2a2a;
  --page-max: 720px;
  --font: system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ─────────────────────────────────── */

.site-header {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}

.site-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── MAIN ────────────────────────────────────── */

main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── EPISODE LIST ────────────────────────────── */

.episode-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  gap: 0;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.episode-card:hover {
  border-color: #555;
}

.episode-thumb {
  width: 96px;
  min-width: 96px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
}

.episode-thumb-placeholder {
  font-size: 2rem;
  opacity: 0.15;
  user-select: none;
}

.episode-info {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.episode-num {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.episode-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.episode-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.episode-synopsis {
  font-size: 0.75rem;
  color: #aaa;
  line-height: 1.5;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── SECTION HEADINGS ────────────────────────── */

.section-heading {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── EPISODE READER ──────────────────────────── */

.reader-meta {
  text-align: center;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.reader-meta .episode-num {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.reader-meta h1 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.reader-meta .episode-date {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── NAVIGATION ──────────────────────────────── */

.reader-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 8px;
}

.reader-nav a,
.reader-nav span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  min-width: 80px;
  text-align: center;
  display: inline-block;
}

.reader-nav a:hover {
  border-color: #555;
  color: var(--text);
}

.reader-nav .nav-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.reader-nav .nav-home {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── MANGA PAGES ─────────────────────────────── */

.manga-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #000;
  margin: 0 -16px;
  padding: 0;
}

.manga-page {
  width: 100%;
  max-width: var(--page-max);
  display: block;
  position: relative;
}

.manga-page img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.05);
}

.manga-page-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #333;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.manga-page-placeholder .page-num {
  font-size: 2rem;
  font-weight: 700;
  color: #1e1e1e;
}

/* ── FOOTER ──────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 2;
}

/* ── RESPONSIVE (375px) ──────────────────────── */

@media (max-width: 480px) {
  .site-title { font-size: 0.9rem; }
  .episode-thumb { width: 80px; min-width: 80px; }
  .episode-title { font-size: 0.875rem; }
  .reader-meta h1 { font-size: 1.05rem; }
}

/* ── UTILITY ─────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
