/* Webnovel theme — site styles and header layouts (1.65.0; touches split up in 1.67.0).
   Loaded only when a finishing touch other than Classic's, or a header other
   than the top bar, is in use. Colours, fonts and corners come from Site Look; these
   are the finishing touches that make series pages, chapter lists and the
   series list match the homepage of each style. */

/* ═══ Side menu ═══ */
.wn-sidenav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 1002; width: 232px; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 16px; box-sizing: border-box; background: var(--bg-surface); border-right: 1px solid var(--border-subtle); overflow-y: auto; transition: transform .25s ease; }
.wn-sidenav__brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 12px; }
.wn-sidenav__logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-primary); text-decoration: none; font: 800 17px/1.1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.wn-sidenav__logo img { border-radius: calc(8px * var(--wn-round, 1)); flex: none; }
.wn-sidenav__logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wn-sidenav__close { display: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg-hover); color: var(--text-primary); font: 400 22px/1 var(--font-ui); cursor: pointer; }
.wn-sidenav__search { display: none; margin: 0 4px 6px; }
.wn-sidenav__search input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border-card); border-radius: calc(8px * var(--wn-round, 1)); background: var(--bg-input); color: var(--text-primary); font: 500 14px var(--font-ui); }
.wn-sidenav__nav { display: flex; flex-direction: column; gap: 2px; }
.wn-sidenav__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: calc(8px * var(--wn-round, 1)); color: var(--text-secondary); text-decoration: none; font: 600 14px/1.2 var(--font-ui); transition: background .15s, color .15s; }
.wn-sidenav__item:hover { background: var(--bg-hover); color: var(--text-primary); }
.wn-sidenav__item.is-active { background: var(--wn-accent); color: var(--wn-on-accent); }
.wn-sidenav__item svg { flex: none; }
.wn-sidenav__foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 6px; }
.wn-sidenav__foot a { color: var(--text-secondary); font: 600 12.5px var(--font-ui); text-decoration: none; }
.wn-sidenav__foot a:hover { color: var(--text-primary); }
.wn-sidenav__foot p { margin: 8px 0 0; color: var(--text-muted, var(--text-secondary)); font: 500 11.5px var(--font-ui); }
.wn-sidenav__scrim { position: fixed; inset: 0; z-index: 1001; background: rgba(0, 0, 0, .55); }
.wn-sidenav__scrim[hidden] { display: none; }
.wn-sidenav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-right: 6px; flex: none; border: 0; border-radius: calc(8px * var(--wn-round, 1)); background: transparent; color: var(--text-primary); cursor: pointer; }
.wn-sidenav-toggle:hover { background: var(--bg-hover); }
/* Wide screens: beside the page, the top bar keeps search and the account menu */
@media (min-width: 1101px) {
    html:not(.wn-sidenav-overlay) body.wn-header-side { padding-left: 232px; transition: padding-left .25s ease; }
    html:not(.wn-sidenav-overlay) body.wn-header-side .wt-header__brand { display: none; }
    html.wn-sidenav-closed:not(.wn-sidenav-overlay) body.wn-header-side { padding-left: 0; }
    html.wn-sidenav-closed:not(.wn-sidenav-overlay) body.wn-header-side .wt-header__brand { display: flex; }
    html.wn-sidenav-closed:not(.wn-sidenav-overlay) .wn-sidenav { transform: translateX(-100%); }
    body.wn-header-side .wt-nav { display: none !important; }
}
/* Phones, and while reading a chapter: slides in over the page */
@media (max-width: 1100px) {
    .wn-sidenav { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .5); width: min(290px, 86vw); }
    .wn-sidenav__close, .wn-sidenav__search { display: block; }
    body.wn-header-side .wt-mobile-toggle { display: none !important; }
}
html.wn-sidenav-overlay .wn-sidenav { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
html.wn-sidenav-overlay .wn-sidenav__close { display: block; }
html.wn-sidenav-open .wn-sidenav { transform: none; }
html.wn-sidenav-overlay body.wn-header-side .wt-nav { display: none !important; }

/* ═══ Header in the accent colour ═══ */
body.wn-header-bar .wt-header { background: var(--wn-accent); border-bottom-color: transparent; }
body.wn-header-bar .wt-header, body.wn-header-bar .wt-header a:not(.wt-pfp-nav-link):not(.wt-login-panel a), body.wn-header-bar .wt-theme-toggle, body.wn-header-bar .wt-header .wt-site-title-text { color: var(--wn-on-accent); }
body.wn-header-bar .wt-nav__list > li > a { color: var(--wn-on-accent); opacity: .88; }
body.wn-header-bar .wt-nav__list > li > a:hover, body.wn-header-bar .wt-nav__list > li.is-active > a, body.wn-header-bar .wt-nav__list > li.current-menu-item > a { opacity: 1; background: rgba(255, 255, 255, .14); color: var(--wn-on-accent); }
body.wn-header-bar .wt-header-search__input { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: var(--wn-on-accent); }
body.wn-header-bar .wt-header-search__input::placeholder { color: var(--wn-on-accent); opacity: .7; }
body.wn-header-bar .wt-mobile-toggle span { background: var(--wn-on-accent); }
body.wn-header-bar .wt-login-btn { color: var(--wn-on-accent); border-color: rgba(255, 255, 255, .4); }

/* ═══ Finishing touches (1.67.0) ═══
   Each group is its own setting (Customize → Site Look → Finishing touches),
   so they mix: titles from one style, cards from another. A style picks its
   own version of each; "Match the style" keeps following it. Body classes:
   wn-titles-*, wn-cards-*, wn-covers-*, wn-lists-*, wn-buttons-*, wn-labels-*,
   wn-headings-serif, wn-header-noline. */

/* ─── Heading font: book serif ─── */
@font-face { font-family: 'WN Garamond'; src: url('../fonts/reader/garamond-latin-normal.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
.wn-headings-serif .wn-hl__title, .wn-headings-serif .wt-section-title, .wn-headings-serif .wn-hero__title, .wn-headings-serif .wn-hl-cover-card__title, .wn-headings-serif .cn-novel-title, .wn-headings-serif .wn-hl-pick__title, .wn-headings-serif .wtr-arc h1, .wn-headings-serif .cr-chapter-title, .wn-headings-serif .rx-title, .wn-headings-serif .entry-title { font-family: 'WN Garamond', 'EB Garamond', Garamond, Georgia, serif; font-weight: 700; letter-spacing: 0; }

/* ─── Section titles ─── */
body:not(.wn-titles-classic) .wt-section-title { letter-spacing: -.01em; }
.wn-titles-nightfall .wn-hl__title, .wn-titles-nightfall .wt-section-title { font-weight: 800; }
.wn-titles-hive .wn-hl__title, .wn-titles-hive .wt-section-title { font-weight: 700; font-size: clamp(18px, 1.4vw, 21px); }
.wn-titles-hive .wn-hero--banner { border-bottom: 3px solid var(--wn-accent); }
.wn-titles-shelf .wn-hl__title { font-size: clamp(20px, 1.8vw, 25px); display: flex; align-items: center; gap: 10px; }
.wn-titles-shelf .wn-hl__title::before { content: ""; width: 18px; height: 18px; flex: none; border: 2px solid var(--wn-accent); border-radius: 4px; transform: rotate(45deg) scale(.7); }
.wn-titles-clean .wn-hl__title, .wn-titles-clean .wt-section-title { font-weight: 700; font-size: clamp(19px, 1.6vw, 24px); }
.wn-titles-royal .wn-hl__more { color: var(--wn-accent-text); text-decoration: underline; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.wn-titles-planet .wn-hl__title, .wn-titles-planet .wt-section-title { font-size: 17px; font-weight: 700; }
.wn-titles-arena .wn-hl__title, .wn-titles-arena .wt-section-title { font-weight: 800; font-size: clamp(20px, 1.8vw, 26px); }
.wn-titles-arena .wn-hl--ranking .wn-hl__title::before { content: "🔥"; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 10px; border-radius: calc(8px * var(--wn-round, 1)); background: linear-gradient(135deg, #f97316, #ef4444); font-size: 16px; vertical-align: middle; }
.wn-titles-portal .wn-hl__title, .wn-titles-portal .wt-section-title { text-transform: uppercase; letter-spacing: .06em; font-size: clamp(16px, 1.4vw, 19px); }
.wn-titles-portal .wn-hl--updates .wn-hl__title::before { content: "◷ "; color: var(--wn-accent-text); }
.wn-titles-mono .wn-hl__title, .wn-titles-mono .wt-section-title { font-size: 15px; font-weight: 700; }
.wn-titles-mono .wn-hl__more { font-size: 12px; }
.wn-titles-neon .wn-hl__title, .wn-titles-neon .wt-section-title { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.wn-titles-neon .wn-hl__title::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--wn-accent); }
.wn-titles-neon .wn-hl__more { color: var(--wn-accent-text); }

/* ─── Cards ─── */
.wn-cards-nightfall .wn-hl-ucard, .wn-cards-nightfall .wn-hl-col, .wn-cards-nightfall .cn-series-card, .wn-cards-nightfall .wtr-arc-card { box-shadow: 0 0 0 1px rgba(var(--wn-accent-rgb), .08), 0 10px 30px rgba(0, 0, 0, .25); }
.wn-cards-nightfall .wn-hl-ucard:hover, .wn-cards-nightfall .wtr-arc-card:hover { box-shadow: 0 0 0 1px rgba(var(--wn-accent-rgb), .35), 0 14px 34px rgba(var(--wn-accent-rgb), .12); }
.wn-cards-planet .wn-hl-ucard, .wn-cards-planet .wn-hl-rank, .wn-cards-planet .cn-series-card, .wn-cards-planet .wtr-arc-card { background: color-mix(in srgb, var(--bg-card) 92%, #fff 8%); }
.wn-cards-planet .wn-hl-ucard__cover { width: 92px; }
.wn-cards-planet .wn-hero--card .wn-hero__eyebrow { color: var(--wn-accent-text); }
.wn-cards-arena .wn-hl-ucard { background: linear-gradient(180deg, rgba(var(--wn-accent-rgb), .06), transparent 60%), var(--bg-card); }
.wn-cards-arena .wn-hl-pick { background: var(--bg-card); }
.wn-cards-portal .wn-hl-ucard { background: var(--bg-card); border-color: transparent; }
.wn-cards-portal .wn-hl-cc { border-left: 3px solid var(--wn-accent); }

/* ─── Cover tiles ─── */
.wn-covers-hive .wn-hl-cover-card__title, .wn-covers-hive .wtr-arc-card__title { text-align: center; }
.wn-covers-shelf .wn-hl-cover-card__title { font-size: 16px; }
.wn-covers-shelf .wn-hl-cover-card { background: var(--bg-card); border-radius: calc(8px * var(--wn-round, 1)); padding: 0 0 8px; overflow: hidden; }
.wn-covers-shelf .wn-hl-cover-card .wn-hl-chs { padding: 0 10px; }
.wn-covers-shelf .wn-hl-cover-card__cover { border-radius: 0; }
.wn-covers-clean .wn-hl-tile__cover { box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.wn-covers-clean .wn-hl-grid .wn-hl-tile { padding: 10px; background: var(--bg-card); border-radius: calc(10px * var(--wn-round, 1)); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.wn-covers-royal .wn-hl-grid .wn-hl-tile { background: var(--bg-card); border-radius: calc(8px * var(--wn-round, 1)); overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.wn-covers-royal .wn-hl-grid .wn-hl-tile__cover { border-radius: 0; }
.wn-covers-royal .wn-hl-grid .wn-hl-tile__title, .wn-covers-royal .wn-hl-grid .wn-hl-tile__sub { padding: 0 12px; }
.wn-covers-royal .wn-hl-grid .wn-hl-tile__sub { padding-bottom: 12px; }
.wn-covers-royal .wn-hl-tile__cover .wn-hl-status { top: 0; right: 0; border-radius: 0 0 0 calc(8px * var(--wn-round, 1)); padding: 6px 10px; background: #38bdf8; color: #0b1220; }
.wn-covers-royal .wn-hl-tile__cover .wn-hl-status--completed { background: #34d399; }
.wn-covers-mono .wn-hl-tile__title { font-weight: 600; font-size: 13px; }
.wn-covers-mono .wn-hl-tile__cover, .wn-covers-neon .wn-hl-tile__cover { border-radius: calc(6px * var(--wn-round, 1)); }
.wn-covers-neon .wn-hl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ─── Update rows and chapter lists ─── */
.wn-lists-nightfall .cn-chapter-row:hover { background: rgba(var(--wn-accent-rgb), .07); }
.wn-lists-hive .wn-hl-ch__time { color: var(--text-secondary); }
.wn-lists-hive .cn-chapter-row { border-radius: 0; border-left: 2px solid transparent; }
.wn-lists-hive .cn-chapter-row:hover { border-left-color: var(--wn-accent); background: var(--bg-hover); }
.wn-lists-clean .wn-hl-row { border-bottom: 0; padding: 12px; border-radius: calc(10px * var(--wn-round, 1)); }
.wn-lists-clean .wn-hl-row:hover { background: var(--bg-hover); }
.wn-lists-clean .wn-hl-row__title { font-size: 16px; }
.wn-lists-royal .wn-hl-updates--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wn-lists-royal .wn-hl-row__blurb { display: none; }
.wn-lists-royal .wn-hl-row__cover { width: 84px; }
.wn-lists-royal .wn-hl-row { border-bottom: 0; }

/* ─── Buttons ─── */
.wn-buttons-gradient .cn-btn-start-reading, .wn-buttons-gradient .wn-hl-btn:not(.wn-hl-btn--ghost) { background: linear-gradient(135deg, var(--wn-accent), var(--wn-accent-strong)); }

/* ─── Labels ─── */
.wn-labels-arena .wn-hl-ch.is-locked .wn-hl-ch__name, .wn-labels-arena .wn-hl-lock { color: #f59e0b; }
.wn-labels-portal .wn-hl-new, .wn-labels-portal .cn-chapter-row .rx-tag { background: #facc15; color: #1a1205; }

/* ─── Header line ─── */
.wn-header-noline .wt-header { border-bottom-color: transparent; }

@media (max-width: 760px) {
    .wn-lists-royal .wn-hl-updates--compact { grid-template-columns: minmax(0, 1fr); }
    .wn-covers-neon .wn-hl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
