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

:root {
  color-scheme: dark;
  --bg: #101719;
  --ink: #e9ece8;
  --muted: #a1afaf;
  --line: #364446;
  --accent: #d0a784;
  --reader-width: 760px;
  --serif: 'Noto Serif KR', Batang, serif;
  --sans: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.75 var(--sans); }
main, article, section, header, footer { min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -100px; left: 16px; background: var(--bg); padding: 12px; z-index: 100; }
.skip:focus { top: 10px; }
.site-header { height: 82px; max-width: 1440px; margin: auto; padding: 0 56px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.wordmark { font: 600 20px var(--serif); letter-spacing: -.06em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.edition { font-size: 10px; letter-spacing: .2em; border-left: 1px solid var(--line); padding-left: 22px; color: var(--muted); }
nav { margin-left: auto; display: flex; gap: 30px; font-size: 13px; }
nav a { padding: 10px 0; white-space: nowrap; }
.novel-link { color: var(--accent); }
.hero { height: min(760px, calc(100svh - 82px)); min-height: 620px; max-width: 1440px; margin: auto; position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0; background: url('assets/cover.png') center center / cover no-repeat; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,16,19,.96) 0%, rgba(8,16,19,.6) 38%, rgba(8,16,19,.08) 75%), linear-gradient(0deg, var(--bg), transparent 35%); }
.hero-content { position: relative; z-index: 1; padding: 65px 7.2% 80px; max-width: 650px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; color: var(--muted); margin: 0 0 20px; }
.hero h1 { font: 500 clamp(70px, 7.7vw, 108px)/1.12 var(--serif); letter-spacing: -.095em; margin: 24px 0; }
.hero h1 span { color: var(--accent); }
.hero-line { font: 400 19px/1.95 var(--serif); margin: 28px 0; color: #cbd3d0; }
.read-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 55px; min-height: 52px; max-width: 100%; padding: 12px 25px; background: var(--accent); color: #172123; font-weight: 600; font-size: 14px; border: 1px solid var(--accent); transition: background .2s; }
.read-button:hover { background: #e4bd9b; }
.read-button span { font-size: 21px; }
.resume { display: block; margin-top: 18px; font-size: 12px; color: var(--muted); }
.hero-bottom { position: absolute; bottom: 23px; left: 7.2%; right: 7.2%; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.episodes { max-width: 1150px; margin: auto; padding: 75px 48px 100px; }
.section-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.section-head h2 { font-size: 17px; font-weight: 500; margin: 0; }
.section-head p { font-size: 12px; color: var(--muted); margin: 0; }
.episode-row { display: grid; grid-template-columns: 230px minmax(0, 1fr) 50px; align-items: center; gap: 35px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.episode-thumb { height: 150px; background: url('assets/thumb.png') center center / cover no-repeat; }
.episode-no { font-size: 10px; letter-spacing: .2em; color: var(--accent); }
.episode-info h3 { font: 500 27px var(--serif); margin: 8px 0 12px; letter-spacing: -.04em; }
.episode-info p { color: var(--muted); font-size: 13px; margin: 0 0 13px; }
.episode-meta { font-size: 10px; color: var(--muted); }
.row-arrow { text-align: right; font-size: 30px; color: var(--accent); transition: transform .2s; }
.episode-row:hover .row-arrow { transform: translate(5px, -5px); }
.original { border-top: 1px solid var(--line); max-width: 1440px; margin: auto; text-align: center; padding: 75px 24px 95px; background: #151e20; }
.original h2 { font: 400 30px/1.65 var(--serif); letter-spacing: -.05em; }
.original p { color: var(--muted); font-size: 13px; }
.original > a { display: inline-block; color: var(--accent); font-size: 13px; margin-top: 24px; padding-bottom: 7px; border-bottom: 1px solid var(--accent); }
footer { max-width: 1328px; margin: auto; padding: 36px 32px; display: flex; gap: 35px; align-items: center; font-size: 11px; color: var(--muted); }
footer .wordmark { font-size: 16px; }
footer p { margin: 0; }
footer > a:last-child { margin-left: auto; }

/* Every reader section shares the same centered column, including the ending. */
#reader { display: block; width: 100%; margin: 0; padding: 0; float: none; }
.reader-bar { position: sticky; top: 0; z-index: 20; height: 62px; width: 100%; background: rgba(16,23,25,.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100% - 960px) / 2)); font-size: 12px; gap: 12px; }
.reader-bar span { color: var(--muted); }
.reader-bar a, .reader-bar button { flex-shrink: 0; }
.reader-bar button { border: 0; background: none; padding: 10px 0; font-size: 12px; }
.progress-track { height: 2px; width: 100%; position: sticky; top: 62px; z-index: 21; background: #253133; }
#progress { height: 100%; width: 0; background: var(--accent); }
.chapter-heading, .comic, .chapter-end, .reader-status { display: block; width: min(100%, var(--reader-width)); max-width: var(--reader-width); margin-inline: auto; float: none; clear: both; }
.chapter-heading { text-align: center; padding: 70px 20px 64px; background: var(--bg); }
.chapter-heading h1 { font: 500 42px/1.5 var(--serif); letter-spacing: -.06em; margin: 18px 0 0; }
.chapter-heading h1:focus { outline: none; }
.chapter-heading .eyebrow { margin: 0; }
.comic { padding: 0; background: var(--bg); }
.comic-page { position: static; display: block; width: 100%; max-width: 100%; height: auto; margin: 0; padding: 0; border: 0; object-fit: contain; }
.reader-status { text-align: center; padding: 32px 24px; color: var(--muted); }
.reader-status p { margin: 0; }
.reader-status button { margin-top: 20px; padding: 10px 20px; border: 1px solid var(--line); background: var(--bg); }
.chapter-end { text-align: center; padding: 42px 24px 60px; background: var(--bg); }
.end-label { color: var(--muted); font-size: 12px; letter-spacing: .1em; margin: 0 0 30px; }
.back-list { display: block; width: fit-content; margin: 22px auto 0; color: var(--muted); font-size: 12px; }
.reader-mode { background: #0b1113; }
.reader-mode .site-header { display: none; }
.reader-mode footer { border-top: 1px solid var(--line); }

@media (max-width: 700px) {
  .site-header { height: 70px; padding: 0 22px; gap: 14px; }
  .wordmark { font-size: 17px; }
  .edition { font-size: 9px; padding-left: 14px; }
  nav { gap: 18px; font-size: 11px; }
  nav > a:first-child { display: none; }
  .hero { height: 700px; min-height: 0; max-height: calc(100svh - 70px); }
  .hero-art { background-position: 22% center; }
  .hero-shade { background: linear-gradient(90deg, #0a151bcc, #0a151b22), linear-gradient(0deg, var(--bg), transparent 80%); }
  .hero-content { padding: 56px 28px 80px; }
  .hero h1 { font-size: 78px; margin: 25px 0; }
  .hero .eyebrow { font-size: 9px; letter-spacing: .09em; }
  .hero-line { font-size: 16px; margin: 25px 0; }
  .hero-bottom { left: 28px; right: 28px; font-size: 9px; }
  .hero-bottom span:last-child { display: none; }
  .read-button { font-size: 12px; gap: 40px; min-height: 48px; }
  .episodes { padding: 45px 24px 65px; }
  .episode-row { grid-template-columns: 110px minmax(0, 1fr) 18px; gap: 16px; }
  .episode-thumb { height: 100px; }
  .episode-no { font-size: 8px; }
  .episode-info h3 { font-size: 20px; margin: 7px 0; }
  .episode-info p { display: none; }
  .episode-meta { font-size: 9px; }
  .row-arrow { font-size: 22px; }
  .original { padding: 55px 24px 70px; }
  .original h2 { font-size: 26px; }
  footer { padding: 30px 24px; gap: 14px; flex-wrap: wrap; }
  footer p { order: 3; width: 100%; font-size: 10px; }
  footer > a:last-child { font-size: 10px; }
  .reader-bar { height: 56px; padding: 0 16px; font-size: 10px; }
  .reader-bar button { font-size: 10px; }
  .progress-track { top: 56px; }
  .chapter-heading { padding: 50px 20px; }
  .chapter-heading h1 { font-size: 33px; }
  .chapter-heading .eyebrow { font-size: 9px; }
  .chapter-end { padding: 34px 24px 48px; }
}
@media (max-width: 360px) {
  .edition { display: none; }
  .episode-row { grid-template-columns: 90px minmax(0, 1fr) 16px; gap: 12px; }
  .reader-bar { gap: 8px; padding-inline: 12px; }
  .reader-bar > span { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
