@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --ink: #000000;
  --paper: #f5f0e8;
  --aged: #e8dfc8;
  --light-dust: #c8bfad;
}

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

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans KR', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
}

.page {
  max-width: 740px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

/* ── Header ── */
.series-label {
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.title-block {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--light-dust);
  padding: 20px 0 18px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

h1 {
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ep-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 10px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.ep-number {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.ep-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

/* ── Scene divider ── */
.scene-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 52px 0 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.scene-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--ink);
  white-space: nowrap;
}

.scene-line {
  flex: 1;
  height: 1px;
  background: var(--light-dust);
}

.scene-loc {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Stage direction ── */
.direction {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.9;
  margin: 16px 0;
  padding-left: 20px;
  border-left: 2px solid var(--aged);
  font-style: italic;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

/* ── Narration ── */
.narration {
  font-size: 17px;
  line-height: 2.1;
  margin: 18px 0;
  padding: 18px 24px;
  background: var(--aged);
  border-radius: 2px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.narration em {
  font-style: normal;
  color: var(--ink);
}

/* ── Dialogue ── */
.dialogue-block {
  margin: 14px 0;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.speaker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin-bottom: 4px;
}

.line {
  font-size: 18px;
  line-height: 1.95;
  padding-left: 16px;
  border-left: 3px solid var(--ink);
}

.line.inner {
  border-left-color: var(--light-dust);
  color: var(--ink);
  font-size: 16px;
}

/* ── Inner monologue ── */
.thought {
  margin: 24px 0;
  padding: 20px 28px;
  border: 1px solid var(--light-dust);
  border-left: 3px solid var(--ink);
  background: rgba(0, 0, 0, 0.02);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.thought-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-bottom: 10px;
  opacity: 0.6;
}

.thought p {
  font-size: 17px;
  line-height: 2.05;
  color: var(--ink);
}

/* ── Prose paragraph ── */
p.prose {
  font-size: 17.5px;
  line-height: 2.1;
  margin: 14px 0;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

/* ── Flashback / cut divider (EP_04) ── */
.cut-back {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ink);
  opacity: 0;
  text-align: center;
  margin: 44px 0 0;
  animation: fadeUp 0.6s ease forwards;
}

/* ── End mark ── */
.end-mark {
  text-align: center;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--light-dust);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.end-mark span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--ink);
}

/* ── Stagger delays ── */
.s1  { animation-delay: 0.8s; }
.s2  { animation-delay: 1.0s; }
.s3  { animation-delay: 1.1s; }
.s4  { animation-delay: 1.2s; }
.s5  { animation-delay: 1.3s; }
.s6  { animation-delay: 1.4s; }
.s7  { animation-delay: 1.5s; }
.s8  { animation-delay: 1.6s; }
.s9  { animation-delay: 1.7s; }
.s10 { animation-delay: 1.8s; }
.s11 { animation-delay: 1.9s; }
.s12 { animation-delay: 2.0s; }
.s13 { animation-delay: 2.1s; }
.s14 { animation-delay: 2.2s; }
.s15 { animation-delay: 2.3s; }
.s16 { animation-delay: 2.4s; }
.s17 { animation-delay: 2.5s; }
.s18 { animation-delay: 2.6s; }
.s19 { animation-delay: 2.7s; }
.s20 { animation-delay: 2.8s; }
.s21 { animation-delay: 2.9s; }
.s22 { animation-delay: 3.0s; }
.s23 { animation-delay: 3.1s; }
.s24 { animation-delay: 3.2s; }
.s25 { animation-delay: 3.3s; }
.s26 { animation-delay: 3.4s; }
.s27 { animation-delay: 3.5s; }
.s28 { animation-delay: 3.6s; }
.s29 { animation-delay: 3.7s; }
.s30 { animation-delay: 3.8s; }
.s31 { animation-delay: 3.9s; }
.s32 { animation-delay: 4.0s; }
.s33 { animation-delay: 4.1s; }
.s34 { animation-delay: 4.2s; }
.s35 { animation-delay: 4.3s; }
.s36 { animation-delay: 4.4s; }
.s37 { animation-delay: 4.5s; }
.s38 { animation-delay: 4.6s; }
.s39 { animation-delay: 4.7s; }
.s40 { animation-delay: 4.8s; }
.s41 { animation-delay: 4.9s; }
.s42 { animation-delay: 5.0s; }
.s43 { animation-delay: 5.1s; }
.s44 { animation-delay: 5.2s; }
.s45 { animation-delay: 5.3s; }
.s46 { animation-delay: 5.4s; }
.s47 { animation-delay: 5.5s; }
.s48 { animation-delay: 5.6s; }

/* ── Animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .page { padding: 48px 24px 80px; }
}

/* ── 저작권 ── */
.site-copyright {
  text-align: center;
  padding: 28px 0 36px;
  font-size: 11px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: #aaa;
}

.site-copyright a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-copyright a:hover {
  color: #333;
}

/* ── 목록으로 돌아가기 ── */
.back-top,
.back-bottom {
  position: fixed;
  z-index: 200;
  text-decoration: none;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #666;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 20px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.back-top {
  top: 36px;
  left: 40px;
}

.back-bottom {
  bottom: 40px;
  right: 44px;
}

.back-top:hover,
.back-bottom:hover {
  color: #000;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .back-top    { top: 20px; left: 20px; }
  .back-bottom { bottom: 24px; right: 20px; }
}
