:root {
  --bg: #0a0a0f;
  --bg-elev: #11111a;
  --fg: #cfcfd6;
  --fg-dim: #8b8b96;
  --neon: #5dffe2;
  --magenta: #ff5dc8;
  --max: 800px;
  --pad: 32px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
        "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.ep-head {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px var(--pad) 24px;
  border-bottom: 1px solid #1f1f2a;
  position: relative;
}
.ep-head .series {
  margin: 0 0 8px;
  color: var(--neon);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ep-head h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f4f4f8;
}
.ep-head .logline {
  margin: 0 0 24px;
  color: var(--fg-dim);
  font-size: 15px;
}
#progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  border: 0;
  background: #15151f;
  position: sticky;
  top: 0;
  z-index: 50;
}
#progress::-webkit-progress-bar { background: #15151f; }
#progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--neon), var(--magenta));
  transition: width 80ms linear;
}
#progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--neon), var(--magenta));
}
.viewer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  background: #050508;
}
.viewer figure {
  margin: 0;
  padding: 0;
  cursor: zoom-in;
  position: relative;
}
.viewer figure::after {
  content: attr(data-page);
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  background: rgba(10, 10, 15, 0.6);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms;
}
.viewer figure:hover::after { opacity: 1; }
.viewer img {
  display: block;
  width: 100%;
  height: auto;
}
.ep-foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--pad) 96px;
  color: var(--fg-dim);
  font-size: 13px;
  border-top: 1px solid #1f1f2a;
}
.ep-foot p { margin: 4px 0; }
.ep-foot .credits { color: #aaa; }
.ep-foot .meta {
  margin-top: 8px;
  color: #666;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.ep-foot .meta .ver {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #777;
}
.ep-foot .meta .dot { margin: 0 6px; opacity: 0.5; }
.ep-foot .next {
  color: var(--neon);
  font-size: 14px;
  margin-top: 16px;
  letter-spacing: 0.06em;
}
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 16px;
  cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
@media (max-width: 480px) {
  .ep-head { padding: 40px 20px 20px; }
  .ep-foot { padding: 28px 20px 80px; }
}
