:root { color-scheme: dark; font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif; background: #070707; color: #f5f5f5; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #070707; }
.page { width: min(100% - 2rem, 60rem); margin: 0 auto; }
.reader-page { width: min(100% - 1.5rem, 60rem); margin: 0 auto; }
.page { padding: 4rem 0; }
.hero { padding-bottom: 2rem; }
.eyebrow { margin: 0; color: #c69a45; font: 700 .75rem/1.2 system-ui, sans-serif; letter-spacing: .12em; }
h1 { margin: .45rem 0; font-family: "Palatino Linotype", Palatino, "Iowan Old Style", "Noto Serif", serif; font-size: clamp(2.25rem, 8vw, 4.5rem); line-height: 1; }
.muted { color: #afafa9; }
.search-label { display: block; margin: 2rem 0 .5rem; font: 600 .9rem system-ui, sans-serif; }
input, select { width: 100%; border: 0; border-radius: .25rem; background: #181818; color: inherit; padding: .8rem 1rem; font: inherit; }
.chapter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; padding: 1.5rem 0; }
.chapter-link, .button { border-radius: .25rem; padding: .85rem 1rem; background: #181818; color: #f5f5f5; text-decoration: none; font: 600 .9rem system-ui, sans-serif; border: 0; transition: background .18s ease; }
.chapter-link:hover, .button:hover { background: #282828; }
.search-page-link, .search-home { color: #d8b15d; text-decoration: none; font: 600 .9rem system-ui, sans-serif; }
.search-page-link { display: inline-block; margin-top: .5rem; }
.reader-body { background: #070707; }
.reader-nav { position: sticky; top: .65rem; z-index: 2; display: grid; grid-template-columns: 1fr auto auto auto 1fr; column-gap: .35rem; align-items: center; width: min(calc(100% - 1.3rem), 60rem); margin: .65rem auto; padding: 0; background: transparent; border: 0; box-shadow: none; transition: transform .25s ease, opacity .25s ease; }
.reader-nav.nav-hidden { transform: translateY(-150%); opacity: 0; pointer-events: none; }
.button { white-space: nowrap; padding: .68rem .8rem; background: #c69a45; color: #161109; }
.button.secondary { background: #181818; color: #f5f5f5; }
.reader-nav .button { display: grid; width: 2.8rem; height: 2.8rem; flex: 0 0 2.8rem; place-items: center; padding: 0; border-radius: 50%; box-shadow: 0 .35rem 1.1rem rgb(0 0 0 / .28); }
.reader-nav .index-link { grid-column: 2; }
.reader-nav #previous, .reader-nav #previous-bottom { grid-column: 1; justify-self: start; }
.reader-nav .search-link { grid-column: 3; }
.reader-nav .chapter-list-trigger { grid-column: 4; }
.reader-nav #next, .reader-nav #next-bottom { grid-column: 5; justify-self: end; }
.reader-nav .nav-label { display: none; }
.reader-nav .nav-icon { font-size: 1.25rem; line-height: 1; }
.button[aria-disabled="true"] { pointer-events: none; opacity: .35; }
.reader-page { padding: 2rem 0; }
.chapter-content { min-width: 0; padding: clamp(1rem, 3vw, 2rem); border: 0; border-radius: .25rem; background: #101010; color: #f5f5f5; box-shadow: none; font-family: system-ui, sans-serif; overflow-wrap: anywhere; text-align: center; }
.chapter-content h1 { margin: 0 0 1.8rem; font-size: clamp(1.65rem, 7vw, 2.4rem); line-height: 1.2; text-align: center; }
.chapter-content p { margin: 0 0 1.25em; }
.chapter-content img { max-width: 100%; height: auto; display: block; border-radius: 2px; }
.chapter-content * { max-width: 100%; }
.chapter-content pre, .chapter-content code { white-space: pre-wrap; overflow-wrap: anywhere; }
.bottom-nav { position: static; justify-content: center; border-bottom: 0; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 4; background: rgb(0 0 0 / .6); }
.chapter-drawer { position: fixed; z-index: 5; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(23rem, 100vw); padding: 1rem; border: 0; border-radius: 0; background: #101010; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .55); transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.chapter-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.drawer-header h2 { margin: .2rem 0 0; font-size: 1.6rem; }
.drawer-close { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border: 0; border-radius: .25rem; background: #222; color: #f5f5f5; font: 400 1.7rem/1 system-ui, sans-serif; cursor: pointer; }
.drawer-list { display: grid; gap: .35rem; overflow-y: auto; margin-top: 1rem; padding-right: .15rem; }
.drawer-list a { padding: .75rem .8rem; border-radius: 0; color: #f5f5f5; text-decoration: none; font-size: .92rem; }
.drawer-list a:hover { background: #242424; }
.drawer-list a[aria-current="page"] { background: #34270f; color: #d8b15d; font-weight: 700; }
.search-page { width: min(100% - 2rem, 52rem); margin: 0 auto; padding: 6rem 0; }
.search-page h1 { margin-top: .6rem; font-size: clamp(2.5rem, 8vw, 4.7rem); }
.search-home { display: inline-block; margin-bottom: 3.5rem; }
.novel-search { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin: 2.25rem 0 1rem; }
.novel-search input { min-width: 0; font-size: 1rem; }
.novel-search button { border: 0; border-radius: .25rem; background: #c69a45; color: #161109; padding: .8rem 1rem; font: 700 .9rem system-ui, sans-serif; cursor: pointer; }
.search-results { display: grid; gap: 1rem; margin-top: 2rem; }
.search-result { display: block; padding: 1.1rem 0; color: #f5f5f5; text-decoration: none; }
.search-result:hover strong { color: #d8b15d; }
.search-result strong, .search-result span { display: block; }
.search-result span { margin-top: .45rem; color: #aaa; line-height: 1.55; }
.search-result mark { background: #c69a45; color: #161109; }
.scroll-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 3; display: none; width: 2.85rem; height: 2.85rem; border: 0; border-radius: 50%; background: #c69a45; color: #161109; box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .34); font: 700 1.35rem/1 system-ui, sans-serif; cursor: pointer; }
.scroll-top.is-visible { display: grid; place-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 570px) {
  .page, .reader-page { width: min(100% - 1rem, 60rem); }
  .page { padding: 2rem 0; }
  .reader-nav { top: .45rem; width: calc(100% - .7rem); margin: .45rem auto; }
  .reader-nav .button { width: 2.55rem; height: 2.55rem; flex-basis: 2.55rem; }
  .chapter-content { padding: 1rem 0.5rem; }
  .chapter-content h1 { font-size: 1.65rem; }
  .scroll-top { right: .85rem; bottom: .85rem; }
  .search-page { width: min(100% - 1.5rem, 52rem); padding: 2rem 0; }
  .search-home { margin-bottom: 2.5rem; }
  .novel-search { gap: .35rem; }
}
