:root {
  --bg: #f5f6f7;
  --bg-elev: #ffffff;
  --bg-soft: #eceef1;
  --paper: #ffffff;
  --ink: #181a1f;
  --ink-strong: #08090b;
  --text: #1b1d22;
  --text-dim: #626771;
  --text-faint: #656c77;
  --line: #e1e4e8;
  --line-strong: #c9ced5;
  --accent: #c64b42;
  --accent-strong: #a83a33;
  --accent-soft: #fbe9e6;
  --on-accent: #ffffff;
  --shadow: 0 6px 22px rgba(21, 27, 38, .07);
  --shadow-lg: 0 20px 55px rgba(21, 27, 38, .15);
  --radius: 14px;
  --radius-lg: 20px;
  --font-ui: "Golos Text", system-ui, -apple-system, sans-serif;
  --font-display: "Golos Text", system-ui, sans-serif;
  --font-brand: "Unbounded", "Golos Text", sans-serif;
  --font-serif: "Noto Serif", Georgia, serif;
  color-scheme: light dark;
}

html.dark {
  --bg: #121315;
  --bg-elev: #1b1d20;
  --bg-soft: #272a2f;
  --paper: #1b1d20;
  --ink: #f1f2f4;
  --ink-strong: #ffffff;
  --text: #edeef0;
  --text-dim: #b0b5bf;
  --text-faint: #a1a8b3;
  --line: #31353b;
  --line-strong: #474d56;
  --accent: #f0786c;
  --accent-strong: #ff968b;
  --accent-soft: #422724;
  --on-accent: #17191c;
  --shadow: 0 6px 22px rgba(0, 0, 0, .3);
  --shadow-lg: 0 20px 55px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; margin: 0; overscroll-behavior: none; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; transition: background-color .2s ease, color .2s ease; }
body.filters-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, [role="button"] { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button:active, a:active { opacity: .76; }
button:disabled { cursor: not-allowed; opacity: .42; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
::selection { background: var(--accent-soft); color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
input, textarea { caret-color: var(--accent); }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--accent); }
select { color-scheme: light; }
html.dark select { color-scheme: dark; }
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.topbar { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elev) 94%, transparent); backdrop-filter: blur(16px); }
.topbar__inner { display: flex; align-items: center; gap: 26px; width: min(1360px, 100%); min-height: 76px; margin: 0 auto; padding: 12px 30px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-family: var(--font-brand); font-size: 17px; font-weight: 700; box-shadow: 0 5px 15px rgba(223, 91, 79, .22); }
.logo__text { color: var(--ink); font-family: var(--font-brand); font-size: 17px; font-weight: 650; letter-spacing: -.035em; }
.desktop-nav { display: flex; align-items: center; gap: 23px; }
.desktop-nav a { position: relative; padding: 25px 0 23px; color: var(--text-dim); font-size: 14px; font-weight: 600; }
.desktop-nav a.active { color: var(--ink); }
.desktop-nav a.active::after { content: ""; position: absolute; right: 0; bottom: 14px; left: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.search { display: flex; align-items: center; gap: 9px; flex: 1 1 320px; max-width: 430px; min-width: 160px; height: 44px; margin-left: auto; padding: 4px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text-faint); transition: border-color .15s, background-color .15s; }
.search:focus-within { border-color: var(--ink); background: var(--bg-elev); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--text-faint); opacity: 1; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--text-faint); font-family: var(--font-ui); font-size: 11px; }
.topbar__nav { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--text-dim); transition: background-color .15s, color .15s, border-color .15s; }
.icon-button.active { border-color: var(--line); background: var(--bg-soft); color: var(--ink); }
.profile-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elev); color: var(--text); font-size: 13px; font-weight: 600; }
.profile-link .icon { width: 18px; height: 18px; }
.profile-link { border-color: var(--ink); background: var(--ink); color: var(--bg-elev); }
.profile-link.active { background: var(--ink-strong); color: var(--bg-elev); }

.view { width: min(1360px, 100%); min-height: calc(100vh - 230px); margin: 0 auto; padding: 34px 30px 70px; }
.primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px; border-radius: 11px; font-size: 13.5px; font-weight: 650; line-height: 1.2; transition: transform .15s, background-color .15s, border-color .15s, box-shadow .15s; }
.primary { border: 1px solid var(--ink); background: var(--ink); color: var(--bg-elev); box-shadow: 0 5px 14px rgba(21, 27, 38, .12); }
.primary .icon, .btn-secondary .icon { width: 18px; height: 18px; }
.btn-secondary { border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 4px 0; border: 0; background: transparent; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.text-button .icon { width: 17px; height: 17px; }
.text-button.danger { color: var(--accent); }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; }
.select { width: 100%; height: 42px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); color: var(--text); font-size: 13px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-head h2 { margin: 0 0 3px; font-size: 23px; font-weight: 750; letter-spacing: -.025em; }
.section-head p { margin: 0; color: var(--text-dim); font-size: 13px; }
.section-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.section-link .icon { width: 17px; height: 17px; }
.continue-section { margin-bottom: 40px; }
.continue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.continue-card { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow); }
.continue-card__cover { flex: 0 0 64px; }
.continue-card__cover .cover { border-radius: 9px; box-shadow: none; }
.continue-card__cover .cover__art { border-radius: 9px; }
.continue-card__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.continue-card__title { overflow: hidden; margin-bottom: 4px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.continue-card__chapter { overflow: hidden; color: var(--text-dim); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.reading-line { width: 100%; height: 4px; margin: 12px 0 5px; overflow: hidden; border-radius: 3px; background: var(--bg-soft); }
.reading-line span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.continue-card__progress { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.continue-card__action { flex: 0 0 auto; padding-inline: 14px; font-size: 12.5px; }

.catalog-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 38px; align-items: start; }
.filters-panel { position: sticky; top: 102px; max-height: calc(100vh - 122px); overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; }
.filters-panel__mobile-head { display: none; }
.filter-group { min-width: 0; margin: 0; padding: 0 0 21px; border: 0; border-bottom: 1px solid var(--line); }
.filter-group + .filter-group { margin-top: 21px; }
.filter-group legend, .filter-label { display: block; width: 100%; margin-bottom: 11px; color: var(--ink); font-size: 13px; font-weight: 750; }
.filter-options--scroll { max-height: 224px; overflow-y: auto; padding-right: 4px; }
.check-option, .radio-option { display: flex; align-items: center; gap: 9px; min-height: 33px; color: var(--text-dim); font-size: 13px; cursor: pointer; }
.check-option input, .radio-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.check-option span, .radio-option span { flex: 1; }
.check-option small { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.filters-reset { width: 100%; margin-top: 18px; }
.filters-apply { display: none; width: 100%; margin-top: 16px; }
.filters-backdrop, .mobile-filter-button { display: none; }
.catalog-results { min-width: 0; }
.catalog-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; margin-bottom: 19px; }
.catalog-title-row h1, .library-heading h1, .profile-head h1 { margin: 0 0 5px; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.catalog-title-row p, .library-heading p, .profile-head p { margin: 0; color: var(--text-dim); font-size: 13px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.quick-genres { display: flex; gap: 19px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.quick-genres::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 5px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-dim); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.active { border-bottom-color: var(--accent); color: var(--accent-strong); }
.catalog-toolbar__controls { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sort-control { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 9px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); color: var(--text-dim); }
.sort-control .icon { width: 16px; height: 16px; }
.sort-control select { max-width: 150px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.view-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); }
.view-switch .icon-button { width: 32px; height: 32px; border: 0; border-radius: 7px; }
.view-switch .icon-button.active { background: var(--ink); color: var(--bg-elev); }
.view-switch .icon { width: 16px; height: 16px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -2px 0 19px; }
.active-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 600; }
.active-filter .icon { width: 13px; height: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 27px 19px; }
.card { position: relative; min-width: 0; }
.card__cover-link { display: block; }
.cover { position: relative; z-index: 0; border-radius: var(--radius); }
.cover::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--accent); transform: translate(0, 0); transition: transform .28s cubic-bezier(.16, 1, .3, 1); }
.cover__art { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: #29303b; color: #fff; box-shadow: 0 9px 25px rgba(20, 25, 34, .16); transition: transform .28s cubic-bezier(.16, 1, .3, 1), box-shadow .28s; }
.cover--v0 .cover__art { background: #b84c44; color: #fff7f3; }
.cover--v1 .cover__art { background: #242a35; color: #f4f2eb; }
.cover--v2 .cover__art { background: #2e5c52; color: #eff8f2; }
.cover--v3 .cover__art { background: #3d5e91; color: #f1f5ff; }
.cover--v4 .cover__art { background: #d8a844; color: #261e11; }
.cover--v5 .cover__art { background: #715079; color: #faf1fa; }
.cover__img { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__letter { position: absolute; top: 3%; right: -7%; color: currentColor; font-family: var(--font-serif); font-size: 152px; font-weight: 700; line-height: 1; opacity: .13; transform: rotate(5deg); transition: transform .32s cubic-bezier(.16, 1, .3, 1), opacity .32s; }
.cover__badge, .cover__rating { position: absolute; z-index: 2; top: 10px; padding: 5px 8px; border-radius: 7px; background: rgba(13, 16, 21, .7); color: #fff; font-size: 11px; font-weight: 650; line-height: 1.2; backdrop-filter: blur(5px); }
.cover__badge { left: 10px; max-width: calc(100% - 58px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover__rating { right: 10px; top: auto; bottom: 10px; color: #fff; font-variant-numeric: tabular-nums; }
.cover__content { position: absolute; z-index: 1; right: 15px; bottom: 16px; left: 15px; display: flex; flex-direction: column; padding-right: 35px; }
.cover__title { display: -webkit-box; overflow: hidden; font-size: 16px; font-weight: 750; line-height: 1.25; letter-spacing: -.025em; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.cover__author { overflow: hidden; margin-top: 8px; font-size: 11px; font-weight: 500; opacity: .82; text-overflow: ellipsis; white-space: nowrap; }
.cover--compact .cover__letter { top: 50%; right: auto; left: 50%; font-size: 46px; opacity: .65; transform: translate(-50%, -50%); }
.cover--compact .cover__art { box-shadow: 0 4px 12px rgba(20, 25, 34, .13); }
.cover--compact::before { display: none; }
.card__body { padding: 12px 2px 0; }
.card__title { display: -webkit-box; overflow: hidden; min-height: 40px; color: var(--text); font-size: 14.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.015em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card__author { overflow: hidden; margin-top: 4px; color: var(--text-dim); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.card__meta { display: flex; gap: 7px; margin-top: 7px; color: var(--text-faint); font-size: 11px; }
.card__meta span + span::before { content: "·"; margin-right: 7px; }
.bookmark-button { position: absolute; z-index: 3; top: 10px; right: 10px; display: inline-grid; place-items: center; width: 35px; height: 35px; padding: 0; border: 1px solid rgba(255, 255, 255, .45); border-radius: 10px; background: rgba(255, 255, 255, .9); color: #20242a; box-shadow: 0 4px 12px rgba(20, 25, 34, .12); backdrop-filter: blur(6px); transition: background-color .15s, color .15s, transform .15s; }
.bookmark-button.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.bookmark-button.active .icon { fill: currentColor; }
.bookmark-button .icon { width: 17px; height: 17px; }
.grid--list { grid-template-columns: 1fr; gap: 0; }
.grid--list .card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.grid--list .card:first-child { padding-top: 0; }
.grid--list .card__cover-link { grid-row: 1; grid-column: 1; }
.grid--list .cover__title { font-size: 11px; -webkit-line-clamp: 2; }
.grid--list .cover__author, .grid--list .cover__badge { display: none; }
.grid--list .cover__content { right: 8px; bottom: 9px; left: 8px; padding: 0; }
.grid--list .cover__rating { right: 6px; bottom: 6px; padding: 3px 5px; font-size: 11px; }
.grid--list .card__body { grid-row: 1; grid-column: 2; align-self: center; padding: 0 46px 0 0; }
.grid--list .card__title { min-height: 0; font-size: 17px; -webkit-line-clamp: 1; }
.grid--list .card__author { margin-top: 6px; font-size: 12.5px; }
.grid--list .card__meta { margin-top: 10px; font-size: 12px; }
.grid--list .bookmark-button { top: 50%; right: 4px; border-color: var(--line); background: var(--bg-elev); color: var(--text-dim); box-shadow: none; transform: translateY(-50%); backdrop-filter: none; }
.grid--list .bookmark-button.active { background: var(--accent-soft); color: var(--accent); }

.breadcrumbs { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 21px; color: var(--text-faint); font-size: 12px; }
.breadcrumbs .icon { width: 13px; height: 13px; }
.breadcrumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.novel-hero { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 34px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); box-shadow: var(--shadow); }
.novel-info { min-width: 0; }
.novel-info__origin { color: var(--text-dim); font-size: 13px; font-weight: 600; }
.novel-info h1 { max-width: 850px; margin: 7px 0 5px; font-size: clamp(27px, 3vw, 38px); font-weight: 800; line-height: 1.18; letter-spacing: -.04em; }
.original-title { margin: 0; color: var(--text-faint); font-size: 12.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.tag { padding: 6px 11px; border: 1px solid transparent; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 600; }
.novel-stats { display: flex; flex-wrap: wrap; gap: 29px; margin: 19px 0; color: var(--text-dim); font-size: 12px; }
.novel-stats b { display: block; margin-bottom: 2px; color: var(--text); font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.synopsis { max-width: 75ch; margin: 0; color: var(--text-dim); font-family: var(--font-serif); font-size: 15px; line-height: 1.7; }
.novel-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.bookmark-button--labelled { position: static; display: inline-flex; width: auto; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elev); color: var(--text); box-shadow: none; font-size: 13.5px; font-weight: 650; backdrop-filter: none; }
.bookmark-button--labelled.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.bookmark-button--labelled .icon { width: 18px; height: 18px; }
.anime-block { display: flex; align-items: center; gap: 15px; max-width: 620px; margin-top: 17px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.anime-block__poster { width: 64px; height: 88px; flex: none; border-radius: 8px; object-fit: cover; }
.anime-block__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.anime-block__label { color: var(--accent-strong); font-size: 11px; font-weight: 700; }
.anime-block__title { font-size: 16px; font-weight: 750; }
.anime-block__meta, .anime-block__src { color: var(--text-dim); font-size: 12px; }
.anime-block__src { display: inline-flex; align-items: center; gap: 5px; }
.anime-block__src .icon { width: 13px; height: 13px; }
.chapters { margin-top: 36px; }
.chapters__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.chapters__head h2 { margin: 0 0 3px; font-size: 24px; font-weight: 750; letter-spacing: -.025em; }
.chapters__head p { margin: 0; color: var(--text-dim); font-size: 12.5px; }
.chapter-search { display: flex; align-items: center; gap: 10px; max-width: 520px; height: 44px; margin-bottom: 13px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elev); color: var(--text-faint); }
.chapter-search:focus-within { border-color: var(--ink); }
.chapter-search .icon { width: 18px; height: 18px; }
.chapter-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.chapter-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.chapter-row { display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 9px 17px; border-bottom: 1px solid var(--line); transition: background-color .12s; }
.chapter-row:last-child { border-bottom: 0; }
.chapter-row .num { display: grid; place-items: center; flex: 0 0 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-row .title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
.chapter-row > .icon { width: 16px; height: 16px; color: var(--text-faint); }
.chapter-row.read .title { color: var(--text-dim); }
.chapter-read { display: inline-flex; align-items: center; gap: 5px; color: var(--text-faint); font-size: 11px; }
.chapter-read .icon { width: 15px; height: 15px; }
.chapters-more { display: flex; min-width: 270px; margin: 15px auto 0; }
.chapters-more span { color: var(--text-faint); font-size: 11px; font-weight: 400; }

.reader { max-width: 850px; margin: 0 auto; }
.read-progress { position: fixed; z-index: 70; top: 0; left: 0; width: 0; height: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.reader__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.reader__tools { display: flex; align-items: center; gap: 6px; }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); color: var(--text-dim); font-size: 11.5px; font-weight: 600; }
.tool .icon { width: 16px; height: 16px; }
.chapter-jump { display: flex; align-items: center; gap: 5px; }
.chapter-jump input { width: 68px; height: 40px; padding: 0 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.chapter-jump .btn-secondary { min-height: 40px; padding: 8px 11px; font-size: 11.5px; }
.reader__paper { padding: 54px 58px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.novel-name { display: inline-block; margin-bottom: 10px; color: var(--accent-strong); font-size: 12.5px; font-weight: 650; }
.chapter-title { margin: 0 0 33px; font-size: 29px; font-weight: 800; line-height: 1.3; letter-spacing: -.035em; }
.prose { max-width: 70ch; color: var(--text); font-family: var(--font-serif); font-size: 18px; line-height: 1.8; }
.prose p { margin: 0 0 1.05em; }
.reader__pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 21px; }
.reader__pager > * { flex: 1; }
.reader-pager__novel { flex: 0 1 auto !important; }
body.reader-sepia { --bg: #f1e9da; --bg-elev: #f8f1e5; --paper: #fbf5e9; --line: #ddd0b9; --text: #302a22; --text-dim: #6c604e; --ink: #302a22; }
body.reader-dark { --bg: #111315; --bg-elev: #1b1e21; --paper: #1b1e21; --line: #33383d; --text: #e8e9e6; --text-dim: #acb2b5; --ink: #e8e9e6; }

.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.library-tabs { display: flex; gap: 29px; margin-bottom: 27px; border-bottom: 1px solid var(--line); }
.library-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 0 14px; color: var(--text-dim); font-size: 13.5px; font-weight: 600; }
.library-tab.active { color: var(--accent-strong); }
.library-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.library-tab .icon { width: 18px; height: 18px; }
.library-tab > span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bg-soft); color: var(--text-dim); font-size: 11px; }
.continue-list--library { grid-template-columns: 1fr; gap: 11px; }
.continue-list--library .continue-card { padding: 16px 18px; }
.continue-list--library .continue-card__cover { flex-basis: 72px; }
.history-list { border-top: 1px solid var(--line); }
.history-row { display: flex; align-items: center; gap: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.history-row__cover { flex: 0 0 48px; }
.history-row__cover .cover { border-radius: 7px; box-shadow: none; }
.history-row__cover .cover__art { border-radius: 7px; }
.history-row__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.history-row__title { overflow: hidden; font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.history-row__chapter { overflow: hidden; margin-top: 3px; color: var(--text-dim); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.history-row__date { margin-top: 4px; color: var(--text-faint); font-size: 11px; }
.history-clear { margin-top: 18px; }

.profile-head { display: flex; align-items: center; gap: 18px; padding-bottom: 25px; }
.profile-head > div:nth-child(2) { flex: 1; }
.profile-head p { max-width: 660px; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 62px; height: 62px; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 17px; background: var(--accent-soft); color: var(--accent-strong); }
.profile-avatar .icon { width: 30px; height: 30px; }
.profile-summary { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 17px 0 27px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 13px; }
.profile-summary b { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.storage-warning { margin-bottom: 18px; padding: 12px 15px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 650; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.settings-section { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); }
.settings-section__head { margin-bottom: 8px; }
.settings-section__head h2 { margin: 0 0 5px; font-size: 21px; font-weight: 750; letter-spacing: -.025em; }
.settings-section__head p { margin: 0; color: var(--text-dim); font-size: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.setting-row label { color: var(--text); font-size: 13.5px; font-weight: 650; }
.setting-row p { margin: 3px 0 0; color: var(--text-dim); font-size: 11.5px; }
.segmented { display: flex; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.segmented button { min-height: 33px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 11.5px; font-weight: 600; }
.segmented button.active { background: var(--ink); color: var(--bg-elev); }
.range-control { display: flex; align-items: center; gap: 10px; }
.range-control input { width: 130px; }
.range-control output { min-width: 42px; color: var(--text-dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.settings-preview { margin-top: 23px; padding: 19px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.settings-preview > span { display: block; margin-bottom: 10px; color: var(--text-faint); font-size: 11px; }
.settings-preview p { max-width: 60ch; margin: 0; }
.settings-side { display: grid; gap: 16px; }
.data-section .settings-section__head { margin-bottom: 18px; }
.settings-action { display: flex; align-items: center; gap: 11px; width: 100%; padding: 15px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.settings-action > .icon:first-child { color: var(--text-dim); }
.settings-action > .icon:last-child { width: 16px; height: 16px; margin-left: auto; color: var(--text-faint); }
.settings-action span { display: flex; flex-direction: column; }
.settings-action b { font-size: 12.5px; font-weight: 650; }
.settings-action small { margin-top: 2px; color: var(--text-dim); font-size: 11px; }
.modal-input, .modal-textarea, .request-form input, .request-form select, .request-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 13px; }
.modal-input { height: 42px; margin-top: 8px; }
.modal-textarea { min-height: 120px; margin-top: 8px; resize: vertical; line-height: 1.55; }
.request-section { margin-top: 24px; }
.request-note { margin: 14px 0 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); border-radius: 11px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12.5px; font-weight: 650; }
.request-form { display: grid; gap: 16px; margin-top: 20px; }
.request-form label { display: grid; gap: 7px; color: var(--text-dim); font-size: 12px; font-weight: 650; }
.request-form textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.request-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.request-form .primary { justify-self: start; }
.request-list { display: grid; gap: 10px; margin-top: 22px; }
.request-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.request-row > div { display: grid; gap: 4px; min-width: 0; }
.request-row b { color: var(--text); font-size: 13.5px; }
.request-row span, .request-row small { color: var(--text-dim); font-size: 12px; overflow-wrap: anywhere; }
.request-row a { color: var(--accent-strong); font-size: 12px; font-weight: 650; }
.request-status { flex: 0 0 auto; padding: 5px 9px; border-radius: 8px; background: var(--bg-soft); color: var(--text-dim); font-size: 11px; font-weight: 700; }
.request-status.status-accepted { background: var(--accent-soft); color: var(--accent-strong); }
.request-status.status-rejected { color: var(--text-faint); }
.request-empty { padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 12px; }

.empty { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 330px; padding: 48px 20px; text-align: center; }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); color: var(--accent); transform: rotate(-3deg); }
.empty__icon .icon { width: 28px; height: 28px; }
.empty h2, .empty h3 { margin: 0 0 8px; font-size: 23px; font-weight: 750; letter-spacing: -.025em; }
.empty p { max-width: 480px; margin: 0 0 20px; color: var(--text-dim); font-size: 13px; }
.empty--compact { min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.empty--compact h3 { font-size: 18px; }
.empty--compact p { margin-bottom: 0; }
.loading-state { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 360px; color: var(--text-dim); }
.loading-state p { margin: 15px 0 0; font-size: 13px; }
.loading-mark { width: 30px; height: 38px; border: 2px solid var(--line-strong); border-radius: 4px 9px 9px 4px; border-left-color: var(--accent); animation: loadingBook 1.2s ease-in-out infinite alternate; }
@keyframes loadingBook { to { transform: translateY(-6px) rotate(3deg); } }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(15, 18, 23, .58); }
.modal-backdrop.open { display: grid; }
.modal { position: relative; width: min(100%, 400px); padding: 27px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); box-shadow: var(--shadow-lg); }
.modal h2 { margin: 0 36px 10px 0; font-size: 22px; font-weight: 750; letter-spacing: -.025em; }
.modal > p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.modal__close { position: absolute; top: 14px; right: 14px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.modal__actions--spread { align-items: center; justify-content: space-between; }
.modal__actions--spread > div { display: flex; gap: 8px; }
.modal-field { display: block; margin: 18px 0 8px; color: var(--text-dim); font-size: 12px; font-weight: 600; }
.font-setting { width: min(100%, 260px); }
.reader-font-preview, .reader-color-preview { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-family: var(--font-serif); font-size: 16px; line-height: 1.75; }
.color-settings { display: grid; gap: 12px; margin-top: 20px; }
.color-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-dim); font-size: 13px; }
.color-setting__control { display: inline-flex; align-items: center; gap: 10px; }
.color-setting__control output { min-width: 66px; color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.color-setting input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-elev); cursor: pointer; }
.contrast-note { margin: 12px 0 0 !important; color: var(--text-dim); font-size: 12px !important; }
.contrast-note.bad { color: var(--accent-strong); font-weight: 650; }
.settings-preview p { padding: 10px 12px; border-radius: 8px; }
.toast { position: fixed; z-index: 120; bottom: 24px; left: 50%; max-width: calc(100vw - 32px); padding: 12px 17px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--ink); color: var(--bg-elev); box-shadow: var(--shadow-lg); font-size: 12.5px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 34px; align-items: center; width: min(1360px, 100%); margin: 0 auto; padding: 31px 30px; }
.logo--footer .logo__mark { width: 32px; height: 32px; font-size: 14px; }
.logo--footer .logo__text { font-size: 14px; }
.footer p { margin: 0; color: var(--text-dim); font-size: 12px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { color: var(--text-dim); font-size: 12px; font-weight: 600; }
.footer__note { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 11px; }
.mobile-nav { display: none; }

@media (hover: hover) and (pointer: fine) {
  .desktop-nav a:hover { color: var(--ink); }
  .icon-button:hover { border-color: var(--line); background: var(--bg-soft); color: var(--ink); }
  .profile-link:hover { border-color: var(--ink); }
  .profile-link:hover { background: var(--ink-strong); color: var(--bg-elev); }
  .primary:hover { transform: translateY(-1px); background: var(--ink-strong); box-shadow: 0 9px 22px rgba(21, 27, 38, .17); }
  .btn-secondary:hover { border-color: var(--ink); background: var(--bg-soft); }
  .text-button:hover, .section-link:hover, .continue-card__title:hover, .chip:hover, .card__title:hover, .breadcrumbs a:hover, .history-row__title:hover, .history-row__chapter:hover, .settings-action:hover, .footer nav a:hover { color: var(--accent-strong); }
  .check-option:hover, .radio-option:hover { color: var(--ink); }
  .active-filter:hover, .tag:hover, .anime-block:hover { border-color: var(--accent); }
  .card:hover .cover::before, .card:focus-within .cover::before { transform: translate(6px, 5px); }
  .card:hover .cover__art, .card:focus-within .cover__art { transform: translate(-2px, -2px); box-shadow: 0 14px 32px rgba(20, 25, 34, .2); }
  .card:hover .cover__letter, .card:focus-within .cover__letter { opacity: .2; transform: rotate(2deg) translateX(-5px); }
  .bookmark-button:hover { background: var(--accent); color: var(--on-accent); transform: scale(1.05); }
  .grid--list .bookmark-button:hover { background: var(--accent-soft); color: var(--accent); transform: translateY(-50%); }
  .bookmark-button--labelled:hover { transform: none; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
  .chapter-row:hover { background: var(--bg); }
  .tool:hover { border-color: var(--ink); color: var(--ink); }
  .novel-name:hover { text-decoration: underline; text-underline-offset: 3px; }
  .library-tab:hover, .segmented button:hover { color: var(--ink); }
  .segmented button.active:hover { color: var(--bg-elev); }
}

@media (min-width: 1500px) { .grid { grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); } }
@media (max-width: 1100px) {
  .topbar__inner { gap: 16px; padding-inline: 20px; }
  .desktop-nav { gap: 15px; }
  .profile-link span { display: none; }
  .profile-link { width: 42px; padding: 0; }
  .view { padding-inline: 20px; }
  .catalog-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 25px; }
  .catalog-toolbar { align-items: flex-start; flex-direction: column; }
  .catalog-toolbar__controls { align-self: stretch; justify-content: space-between; }
  .continue-card__action { padding-inline: 10px; }
  .continue-card__action .icon { display: none; }
  .settings-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .reader__toolbar { flex-wrap: wrap; }
  .reader__tools { margin-left: auto; }
}

@media (max-width: 800px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .topbar__inner { flex-wrap: wrap; gap: 10px 14px; min-height: 66px; padding: calc(10px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 10px calc(16px + env(safe-area-inset-left, 0px)); }
  .logo__mark { width: 35px; height: 35px; font-size: 15px; }
  .logo__text { font-size: 15px; }
  .desktop-nav { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; height: 42px; margin: 0; }
  .search kbd { display: none; }
  .topbar__nav { margin-left: auto; }
  .view { min-height: calc(100dvh - 190px); padding: 23px 16px 44px; }
  .catalog-layout { display: block; }
  .filters-panel { position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; display: none; width: min(90vw, 380px); max-height: none; padding: 18px 22px calc(28px + env(safe-area-inset-bottom, 0px)); border-left: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow-lg); }
  .filters-open .filters-panel { display: block; }
  .filters-panel__mobile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
  .filters-panel__mobile-head h2 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.035em; }
  .filters-backdrop { position: fixed; z-index: 90; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(15, 18, 23, .55); }
  .filters-open .filters-backdrop { display: block; }
  .filters-apply { position: sticky; z-index: 2; bottom: 0; display: inline-flex; }
  .mobile-filter-button { display: inline-flex; }
  .catalog-title-row { min-height: 0; margin-bottom: 17px; }
  .catalog-title-row h1, .library-heading h1, .profile-head h1 { font-size: 29px; }
  .catalog-toolbar { gap: 12px; margin-bottom: 17px; }
  .quick-genres { width: calc(100vw - 32px); gap: 17px; }
  .catalog-toolbar__controls { justify-content: flex-end; }
  .sort-control { flex: 1; }
  .sort-control select { width: 100%; max-width: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 23px 14px; }
  .continue-section { margin-bottom: 31px; }
  .continue-list { grid-template-columns: 1fr; }
  .continue-section .continue-card:nth-child(2) { display: none; }
  .continue-card__action { padding-inline: 13px; }
  .continue-card__action .icon { display: block; }
  .novel-hero { grid-template-columns: 160px minmax(0, 1fr); gap: 22px; padding: 22px; }
  .novel-stats { gap: 20px; }
  .novel-actions { grid-column: 1 / -1; }
  .settings-layout { grid-template-columns: 1fr; }
  .setting-row { align-items: center; flex-direction: row; }
  .profile-head { align-items: flex-start; flex-wrap: wrap; }
  .profile-head > .primary { margin-left: 80px; }
  .reader__toolbar { gap: 8px; }
  .reader-back span { display: none; }
  .reader-back { width: 42px; padding: 0; }
  .chapter-jump { order: 3; }
  .reader__tools { flex-wrap: wrap; justify-content: flex-end; }
  .reader__paper { padding: 38px 30px; }
  .footer { display: none; }
  .mobile-nav { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px max(10px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elev) 95%, transparent); backdrop-filter: blur(16px); }
  .mobile-nav a { display: flex; align-items: center; flex-direction: column; gap: 3px; min-height: 49px; padding: 4px; color: var(--text-dim); font-size: 11px; font-weight: 600; }
  .mobile-nav a.active { color: var(--accent-strong); }
  .mobile-nav .icon { width: 21px; height: 21px; }
  body[data-page="reader"] .mobile-nav { display: none; }
  body[data-page="reader"] { padding-bottom: 0; }
  body[data-page="reader"] .search { display: none; }
  .toast { bottom: 84px; }
  body[data-page="reader"] .toast { bottom: 24px; }
}

@media (max-width: 560px) {
  .topbar__nav { gap: 3px; }
  .topbar__nav .icon-button, .profile-link { width: 37px; height: 37px; }
  .logo { gap: 8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .cover__title { font-size: 14px; -webkit-line-clamp: 4; }
  .cover__content { right: 12px; bottom: 13px; left: 12px; padding-right: 27px; }
  .cover__author { margin-top: 6px; font-size: 11px; }
  .cover__letter { font-size: 125px; }
  .cover__badge, .cover__rating { top: 7px; padding: 4px 6px; font-size: 11px; }
  .cover__badge { left: 7px; max-width: calc(100% - 52px); }
  .cover__rating { right: 7px; bottom: 7px; top: auto; }
  .bookmark-button { top: 8px; right: 8px; width: 32px; height: 32px; }
  .card__body { padding-top: 10px; }
  .card__title { min-height: 38px; font-size: 13.5px; }
  .card__author { font-size: 11px; }
  .card__meta { align-items: flex-start; flex-direction: column; gap: 1px; font-size: 11px; }
  .card__meta span + span::before { display: none; }
  .grid--list { grid-template-columns: 1fr; }
  .grid--list .card { grid-template-columns: 84px minmax(0, 1fr); gap: 13px; }
  .grid--list .card__meta { flex-direction: row; gap: 6px; }
  .grid--list .card__meta span + span::before { display: inline; }
  .section-head { align-items: flex-end; }
  .section-head h2 { font-size: 22px; }
  .section-head p { display: none; }
  .section-link { font-size: 12px; }
  .continue-card { gap: 12px; padding: 12px; }
  .continue-card__cover { flex-basis: 56px; }
  .continue-card__title { font-size: 13.5px; }
  .continue-card__chapter { max-width: 150px; font-size: 11px; }
  .continue-card__action { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  .continue-card__action .icon { display: none; }
  .novel-hero { grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 17px; }
  .novel-info__origin { font-size: 11px; }
  .novel-info h1 { margin-top: 4px; font-size: 23px; }
  .original-title { font-size: 11px; }
  .tags { margin: 13px 0; }
  .tag { padding: 5px 8px; font-size: 11px; }
  .novel-stats { grid-column: 1 / -1; gap: 16px; margin: 13px 0; order: 6; }
  .novel-stats b { font-size: 15px; }
  .synopsis { grid-column: 1 / -1; font-size: 14px; order: 7; }
  .novel-info { display: contents; }
  .novel-info__origin, .novel-info h1, .original-title, .tags { grid-column: 2; }
  .novel-info__origin { align-self: end; }
  .novel-info h1 { align-self: start; }
  .novel-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); order: 5; }
  .novel-actions .primary { grid-column: 1 / -1; }
  .novel-actions > * { width: 100%; padding-inline: 10px; font-size: 11.5px; }
  .novel-actions .bookmark-button--labelled { width: 100%; }
  .request-form__grid { grid-template-columns: 1fr; }
  .request-form .primary { width: 100%; justify-self: stretch; }
  .request-row { gap: 12px; }
  .chapters__head { align-items: flex-end; }
  .chapters__head h2 { font-size: 22px; }
  .chapters__head .text-button { font-size: 11px; }
  .chapter-row { gap: 10px; min-height: 55px; padding: 8px 11px; }
  .chapter-row .title { font-size: 12px; }
  .chapter-read { font-size: 0; }
  .chapters-more { min-width: 0; width: 100%; }
  .reader__toolbar { align-items: flex-start; }
  .reader__tools { gap: 5px; }
  .tool { min-height: 38px; padding: 7px 9px; font-size: 11px; }
  .chapter-jump { width: 100%; }
  .chapter-jump input { flex: 1; }
  .reader__paper { padding: 30px 21px; border-radius: 15px; }
  .chapter-title { margin-bottom: 25px; font-size: 25px; }
  .prose p { margin-bottom: 1em; }
  .reader__pager { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-elev); box-shadow: var(--shadow-lg); }
  .reader__pager > * { padding-inline: 9px; font-size: 11.5px; }
  .reader-pager__novel { display: none; }
  .library-heading { align-items: flex-start; }
  .library-heading .btn-secondary { width: 42px; padding: 0; font-size: 0; }
  .library-tabs { gap: 22px; overflow-x: auto; }
  .library-tab { flex: 0 0 auto; font-size: 12px; }
  .library-tab .icon { width: 16px; height: 16px; }
  .continue-list--library .continue-card { padding: 12px; }
  .history-row { gap: 11px; }
  .profile-head { gap: 13px; }
  .profile-avatar { flex-basis: 49px; height: 49px; border-radius: 14px; }
  .profile-avatar .icon { width: 24px; height: 24px; }
  .profile-head > .primary { width: 100%; margin-left: 0; }
  .profile-summary { gap: 8px 18px; font-size: 11px; }
  .settings-section { padding: 19px; }
  .setting-row { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .range-control { width: 100%; }
  .range-control input { flex: 1; }
  .modal { padding: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
