:root {
  --pine: #2f5d46;
  --pine-dark: #22463a;
  --pine-soft: #dfe7dc;
  --hanji: #f5f0e3;
  --hanji-2: #ebe4d2;
  --ink: #2a2a25;
  --ink-soft: #5d5a4e;
  --line: #d6cdb6;
  --max: 800px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hanji);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 20px;
  line-height: 1.6;
  word-break: keep-all;
}
a { color: inherit; }

/* 첫 화면 */
.hero {
  background: var(--pine);
  color: #fbf8ef;
  text-align: center;
  padding: 44px 20px 36px;
}
.work-title { margin: 0; font-size: 44px; letter-spacing: 0.08em; font-weight: 800; }
.tagline { margin: 12px auto 0; max-width: 30em; font-size: 19px; opacity: 0.92; }
.home { max-width: var(--max); margin: 0 auto; padding: 24px 16px 40px; }
.actions { display: grid; gap: 12px; margin-bottom: 28px; }
.list-head { font-size: 24px; margin: 0 0 12px; color: var(--pine-dark); }
.eplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ep {
  display: flex; align-items: center; gap: 16px;
  min-height: 96px; padding: 12px;
  background: #fffdf6; border: 2px solid var(--line); border-radius: 14px;
  text-decoration: none;
}
a.ep:active, a.ep:hover { border-color: var(--pine); }
.ep img, .thumb-soon {
  flex: 0 0 auto; width: 132px; height: auto; aspect-ratio: 16 / 9;
  border-radius: 8px; object-fit: cover; background: var(--hanji-2);
}
.thumb-soon {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 18px;
}
.ep-text { display: flex; flex-direction: column; min-width: 0; }
.ep-name { font-size: 23px; font-weight: 700; }
.ep-meta { font-size: 18px; color: var(--ink-soft); }
.ep-read { color: var(--pine); font-weight: 700; }
.ep.soon { opacity: 0.65; }
.foot { text-align: center; color: var(--ink-soft); font-size: 16px; padding: 8px 0 32px; }

/* 버튼 */
.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 10px 18px;
  border-radius: 14px; border: 2px solid var(--pine);
  background: #fffdf6; color: var(--pine-dark);
  font-size: 21px; font-weight: 700; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--pine); color: #fbf8ef; }
.btn.off { border-color: var(--line); color: var(--ink-soft); background: var(--hanji-2); font-weight: 500; }
.btn.wide { width: 100%; }
.btn[hidden] { display: none; }

/* 화 보기 */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 0 8px; padding-top: env(safe-area-inset-top);
  background: var(--pine); color: #fbf8ef;
  transition: transform 0.25s;
}
.bar.hide { transform: translateY(-100%); }
.bar-back {
  display: flex; align-items: center; min-height: 52px; padding: 0 14px;
  font-size: 21px; font-weight: 700; text-decoration: none; border-radius: 10px;
}
.bar-back:active { background: var(--pine-dark); }
.bar-title { margin: 0; font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader { max-width: var(--max); margin: 0 auto; background: #fff; padding: 16px 16px 0; }
.cut { display: block; width: 100%; height: auto; margin: 0 0 16px; background: var(--hanji-2); }
.endnav {
  max-width: var(--max); margin: 0 auto;
  padding: 28px 16px calc(40px + env(safe-area-inset-bottom));
  display: grid; gap: 14px;
}
.end-msg { margin: 0; text-align: center; font-size: 22px; color: var(--pine-dark); font-weight: 700; }
.endnav-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (min-width: 840px) {
  .bar { padding-left: calc(50% - var(--max) / 2); padding-right: calc(50% - var(--max) / 2); }
}
