@font-face { font-family: 'PT Serif'; src: url('assets/fonts/pt-serif-400-lat.woff2') format('woff2'); font-weight: 400; 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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FFFD; }
@font-face { font-family: 'PT Serif'; src: url('assets/fonts/pt-serif-400-cyr.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'PT Serif'; src: url('assets/fonts/pt-serif-700-lat.woff2') format('woff2'); font-weight: 700; 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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FFFD; }
@font-face { font-family: 'PT Serif'; src: url('assets/fonts/pt-serif-700-cyr.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
  --serif: 'PT Serif', Georgia, serif;
  --gutter: clamp(26px, 3.25vw, 57px);
  --max: 1320px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, .reader-layout > .main-shell { scrollbar-gutter: stable; scrollbar-width: none; }
html::-webkit-scrollbar, .reader-layout > .main-shell::-webkit-scrollbar { display: none; }
body { margin: 0; min-width: 300px; background: var(--canvas); font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
:is(button, input:not([type="radio"], [type="checkbox"]), textarea, select, dialog),
::file-selector-button { border-radius: 0; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .46; }
img { display: block; width: 100%; }
svg { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-navigation { background: var(--surface); }
.site-navigation-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font: 750 1.42rem/1 var(--sans); letter-spacing: -.04em; }
.brand-symbol { display: grid; place-items: center; width: 38px; height: 38px; background: #6c49c7; color: white; box-shadow: 0 3px 6px #593ea52a; }
.site-navigation nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 9px 12px; color: #575264; font-size: .865rem; font-weight: 750; }
.nav-link svg { width: 19px; height: 19px; }
.nav-narrow { display: none !important; }
.install {
  display: flex; flex: none; align-items: center; gap: 8px; min-height: 40px;
  border: 1px solid var(--line); background: var(--subtle); padding: 4px 9px; text-align: left;
}
.installed-app [data-install-control] { display: none !important; }
.install-steps { display: grid; gap: 8px; padding-inline-start: 24px; margin-block: 0 12px; }
.guest-install { margin-top: 16px; }
.install:hover { border-color: #aa90df; }
.install-icon { flex: none; display: grid; place-items: center; width: 31px; height: 34px; background: #ede5fa; color: var(--accent-ink); }
.install strong { color: #47306d; font-size: .79rem; line-height: 1.4; font-weight: 800; }
.main-shell { min-width: 0; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner, .content { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 73px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #e4daf3; color: #5e3e9b; background: #eee6fa; font-size: .87rem; font-weight: 800; }
.avatar:hover { background: #e5d9f6; }
.content { padding-top: 29px; padding-bottom: 68px; }
main:focus { outline: none; }
.page-heading { margin-bottom: 25px; }
.page-heading h1, .detail-copy h1, .empty h1 { font: 680 clamp(2.15rem, 3.15vw, 3.35rem)/1.12 var(--sans); letter-spacing: -.05em; overflow-wrap: anywhere; }
.page-heading p { margin-top: 9px; color: var(--muted); }

.detail-actions, .dialog-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button, .icon-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 43px; border: 1px solid transparent; padding: 9px 15px;
  font-size: .865rem; font-weight: 800; line-height: 1.45; text-align: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.primary { color: white; background: var(--accent); box-shadow: 0 2px 4px #4f308821; }
.primary:hover { background: var(--accent-hover); }
.secondary { color: var(--accent-ink); background: var(--surface); border-color: #ded4ee; }
.secondary:hover { background: var(--tint); border-color: #d1bfea; }
.icon-button { width: 43px; padding: 0; background: transparent; }
.icon-button:hover { background: var(--tint); color: var(--accent-ink); }
.is-saved svg { fill: #bcaae8; }
.genres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 6px 16px; border: 1px solid #eae5e0; 
  background: var(--surface); color: #585165; font-size: .86rem; white-space: nowrap; font-weight: 750;
}
.chip:hover, .chip.selected { border-color: #e2d8f2; background: #eee7fb; color: #5838a7; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.section-head h2, .form-panel h2, .empty h2, .chapter-end h2 { font: 680 clamp(1.45rem, 2.25vw, 2rem)/1.17 var(--sans); letter-spacing: -.04em; }
.section-head > span { color: var(--muted); font-size: .87rem; }
.text-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--accent-ink); font-size: .875rem; font-weight: 800; text-underline-offset: 3px; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.book-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 25px 18px; }
.book-card { position: relative; min-width: 0; }
.book-link { display: block; }
.cover {
  position: relative; isolation: isolate; container-type: inline-size; overflow: hidden;
  aspect-ratio: 3 / 4; background: radial-gradient(ellipse at 55% 86%, #ffffff2a, transparent 68%), var(--cover-bg);
  color: var(--cover-ink); box-shadow: 0 4px 9px #261d3325;
  transition: box-shadow .2s, transform .2s;
}
.cover img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.cover::after { content: ''; position: absolute; z-index: 2; inset: 0 auto 0 0; width: 10px; background: linear-gradient(90deg, #0006, #0001 55%, #fff2 70%, transparent); pointer-events: none; }
.cover-type { position: absolute; inset: 8% 8% auto; display: grid; justify-items: center; gap: 4cqw; text-align: center; pointer-events: none; }
.cover-type span { font: 800 5.1cqw/1.2 var(--sans); letter-spacing: .075em; text-transform: uppercase; text-shadow: 0 1px 2px #0005; }
.cover-type strong { font: 720 14.7cqw/.99 var(--serif); letter-spacing: -.05em; white-space: pre-line; overflow-wrap: anywhere; text-wrap: balance; text-shadow: 0 1px 2px #0004; }
.cover[style*="#9c7424"] .cover-type :is(span, strong) { text-shadow: 0 1px 3px #ffeec480; }
.book-link:hover .cover { transform: translateY(-3px); box-shadow: 0 8px 15px #261d333b; }
.book-link h3 { margin-top: 9px; font-size: .935rem; line-height: 1.35; letter-spacing: -.024em; font-weight: 800; overflow-wrap: anywhere; }
.book-link:hover h3 { color: var(--accent-ink); }
.book-link p { color: var(--muted); margin-top: 2px; font-size: .81rem; line-height: 1.45; overflow-wrap: anywhere; }
.cover-save {
  position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid #f8f5ff80; background: #fffdf1ed; color: #3d2d58;
  opacity: 0; transition: opacity .15s, background .15s;
}
.book-card:hover .cover-save, .cover-save:focus-visible, .cover-save.is-saved { opacity: 1; }
.badge { width: fit-content; display: inline-flex; align-items: center; white-space: nowrap; padding: 2px 7px; font-size: .75rem; font-weight: 800; line-height: 1.5; }
.book-card > .badge { margin-top: 7px; }
.badge-free { background: #e7f0e6; color: #355943; }
.badge-paid { background: #f0ebe2; color: #554a40; }
.badge-serial { background: #ede5fb; color: #5b3b9f; }
.series { margin-top: 37px; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.select-label { position: relative; display: inline-flex; align-items: center; }
.select-label > svg { position: absolute; right: 10px; pointer-events: none; }
.select-label select { appearance: none; border: 1px solid var(--line); padding: 8px 30px 8px 12px; font-size: .87rem; background: var(--surface); color: var(--ink); font-weight: 750; }
.category-nav { margin: 20px 0 16px; }
.category-nav .section-head { align-items: center; margin-bottom: 12px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.category-card {
  --category-tint: #eee6fb; --category-ink: #6543a6;
  display: flex; align-items: center; gap: 11px; min-height: 73px; padding: 11px 13px;
  border: 1px solid var(--line); background: var(--surface);
  transition: background .15s, border-color .15s;
}
.category-card:hover, .category-card[aria-current] { border-color: var(--category-ink); background: var(--category-tint); }
.category-card[aria-current] .category-icon { background: var(--category-ink); color: #fff; }
.category-fiction { --category-tint: #f8e9ee; --category-ink: #913c5e; }
.category-mystery { --category-tint: #e9edf8; --category-ink: #435784; }
.category-nonfiction { --category-tint: #e8f0e7; --category-ink: #3d684b; }
.category-education { --category-tint: #f8eedf; --category-ink: #795627; }
.category-young-readers { --category-tint: #fbece3; --category-ink: #954c35; }
.category-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; background: var(--category-tint); color: var(--category-ink); }
.category-card-copy { display: grid; gap: 3px; min-width: 0; }
.category-card-copy strong { font-size: .94rem; line-height: 1.28; }
.category-card-copy small { font-size: .81rem; color: var(--muted); }
.catalog-filters { justify-content: flex-start; gap: 8px 12px; }
.catalog-reset { margin-top: 12px; }
.catalog-filter { display: grid; gap: 5px; min-width: 0; }
.catalog-filter label { color: var(--muted); font-size: .875rem; font-weight: 750; }
.catalog-filter select { width: 100%; min-height: 42px; text-overflow: ellipsis; }

@media (max-width: 680px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .category-card { gap: 8px; padding: 9px; }
  .category-icon { flex-basis: 30px; height: 30px; }
  .category-icon svg { width: 16px; height: 16px; }
  .category-card-copy strong { font-size: .875rem; overflow-wrap: anywhere; }
  .catalog-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
.empty {
  display: grid; justify-items: center; gap: 10px; padding: 46px 20px; text-align: center;
  border: 1px dashed #ded5e7; background: var(--surface);
}
.empty p { max-width: 430px; color: var(--muted); }
.empty .button { margin-top: 5px; }
.empty-icon {
  flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px;
  background: var(--tint); color: var(--accent-ink);
}
.back-link { display: inline-block; margin-bottom: 18px; color: var(--accent-ink); font-size: .87rem; font-weight: 800; text-underline-offset: 3px; }
.book-detail { display: grid; grid-template-columns: minmax(172px, 240px) minmax(0, 1fr); align-items: center; gap: clamp(20px, 5vw, 68px); padding: clamp(18px, 3.4vw, 45px); background: var(--surface); border: 1px solid var(--line); }
.detail-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; color: var(--muted); font-size: .88rem; }
.detail-copy .synopsis { max-width: 510px; margin: 14px 0 20px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.detail-author { color: var(--accent-ink); font-weight: 750; margin-top: 8px; overflow-wrap: anywhere; }
.detail-note { margin-top: 13px; color: var(--muted); font-size: .86rem; }
.chapters { max-width: 780px; margin-top: 32px; }
.chapter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.chapter-list :is(a, button) {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  gap: 7px; padding: 10px 13px; border: 1px solid var(--line); background: var(--surface); text-align: left;
}
.chapter-list :is(a, button):hover, .chapter-list [aria-current="true"] { border-color: #d6c5ed; background: #f6f0fd; }
.chapter-list small { display: block; color: var(--muted); font-size: .79rem; }
.chapter-list strong { display: block; font-size: .93rem; overflow-wrap: anywhere; }
.chapter-list svg { color: var(--accent-ink); }

.reader { --reading-bg: #fcfaf6; --reading-ink: #2c2636; --reading-muted: #64596b; --reading-edge: #ebe5e0; --reading-accent: #9d3a16; min-height: 100vh; background: var(--reading-bg); color: var(--reading-ink); }
.reader[data-theme="sepia"] { --reading-bg: #f2e7d1; --reading-ink: #3a2c23; --reading-muted: #685443; --reading-edge: #ded0b6; }
.reader[data-theme="night"] { color-scheme: dark; --reading-bg: #201c27; --reading-ink: #f1e8f6; --reading-muted: #c0afcb; --reading-edge: #42374a; --reading-accent: #ffae82; }
.reader :focus-visible { outline-color: var(--reading-accent); }
.reader-bar { position: sticky; top: 0; z-index: 3; background: var(--reading-bg); }
.reader-bar-inner { display: grid; grid-template-columns: 1fr minmax(0, 2fr) 1fr; align-items: center; gap: 10px; min-height: 64px; max-width: 1280px; margin: auto; padding: 0 24px; }
.reader-exit { justify-self: start; display: inline-flex; align-items: center; gap: 8px; color: var(--reading-accent); font-size: .88rem; font-weight: 800; }
.reader-book-title { color: var(--reading-muted); text-align: center; font-size: .89rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-tools { justify-self: end; display: flex; gap: 3px; }
.type-button { font-family: var(--serif); font-size: 1.15rem; }
.reading-track { height: 3px; background: var(--reading-edge); }
.reading-track span { display: block; width: 0; height: 100%; background: var(--reading-accent); }
.reading-content { width: min(100% - 42px, 680px); margin: 0 auto; padding: 62px 0 70px; }
.reading-kicker { display: block; text-align: center; text-transform: uppercase; font-size: .8rem; font-weight: 800; letter-spacing: .12em; color: var(--reading-accent); }
.reading-content h1 { margin: 13px 0 29px; text-align: center; font: 680 clamp(2rem, 4.7vw, 3.5rem)/1.12 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.reading-text { font: var(--reader-size)/1.8 var(--serif); overflow-wrap: anywhere; white-space: pre-line; }
.reading-text p + p { margin-top: 1.14em; }
.chapter-end { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; border-top: 1px solid var(--reading-edge); text-align: center; margin-top: 37px; padding-top: 24px; }
.chapter-end p { margin: 7px 0 14px; color: var(--reading-muted); }

.author-head { align-items: center; }
.works-list { display: grid; gap: 9px; }
.work-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.work-row .cover { width: 53px; flex: none; }
.work-row > div:nth-child(2) { flex: 1 1 180px; min-width: 0; }
.work-row h3 { font-size: 1rem; overflow-wrap: anywhere; }
.work-row p, .local-note { color: var(--muted); font-size: .84rem; }
.content > .local-note { margin-top: 15px; }
.book-form { display: grid; gap: 14px; max-width: 850px; }
.form-panel { display: grid; gap: 14px; padding: clamp(15px, 3vw, 27px); border: 1px solid var(--line); background: var(--surface); }
.form-panel h2 { font-size: 1.55rem; }
.form-panel .section-head { margin-bottom: 0; }
.fields-row, .access-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.access-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-panel label { display: grid; gap: 5px; min-width: 0; font-size: .86rem; font-weight: 750; }
.form-panel :is(input:not([type=radio], [type=checkbox]), textarea, select) {
  width: 100%; min-height: 40px; border: 1px solid #ddd6e4; 
  padding: 8px 9px; color: var(--ink); background: #fcfafc; font-size: .92rem; font-weight: 500;
}
.form-panel textarea { resize: vertical; }
.field-hint { color: var(--muted); font-size: .78rem; }
.form-panel input[type="file"]::file-selector-button { border: 0; color: var(--accent-ink); background: var(--tint); margin-right: 5px; cursor: pointer; }
.form-panel .access-choice { display: flex; align-items: flex-start; padding: 9px; gap: 6px; border: 1px solid var(--line); cursor: pointer; }
.access-choice:has(input:checked) { border-color: #cdb9ec; background: #f8f3fe; }
.access-choice input { margin: 4px 2px 0 0; accent-color: var(--accent); }
.access-choice :is(strong, small) { display: block; }
.access-choice small { color: var(--muted); font-size: .76rem; font-weight: 600; }
#price-field { max-width: 250px; }
.chapter-fields { display: grid; min-width: 0; margin: 0 0 10px; padding: 12px; gap: 9px; border: 1px solid var(--line); }
.chapter-fields legend { font-size: .87rem; color: var(--muted); font-weight: 750; }
.form-panel .file-label { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent-ink); min-height: 40px; border: 1px solid #e4d9f0; background: #f9f4fe; cursor: pointer; }
.file-label:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.remove-chapter { justify-self: start; color: #8b3156; }
.form-actions { justify-content: flex-end; }
.form-error { color: #8b3156; font-weight: 750; font-size: .89rem; }

dialog { width: min(100% - 28px, 450px); max-height: calc(100% - 28px); overflow: auto; border: 1px solid #e8dfec; padding: 18px 20px 21px; background: #fffdf8; color: var(--ink); box-shadow: 0 18px 65px #291b5240; }
dialog::backdrop { background: #2e224d66; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dialog-head h2 { font: 680 1.62rem/1.17 var(--serif); letter-spacing: -.04em; }
.dialog-head .icon-button { flex: none; width: 37px; min-height: 37px; }
dialog p { color: var(--muted); overflow-wrap: anywhere; }
dialog p + p { margin-top: 7px; }
dialog .dialog-book { color: var(--ink); font-weight: 800; }
.dialog-price { margin: 12px 0 4px; font-size: 1.55rem; font-weight: 800; }
.dialog-price small { color: var(--muted); font-size: .84rem; font-weight: 650; }
dialog .wide { width: 100%; margin-top: 14px; }
.dialog-actions { margin-top: 14px; }
.setting-line, .font-control { display: flex; align-items: center; gap: 7px; }
.setting-line { justify-content: space-between; margin: 13px 0 19px; font-size: .89rem; }
.font-control .icon-button { min-height: 34px; width: 34px; border-color: #e8dcef; font-size: 1rem; color: var(--accent-ink); }
.font-control output { min-width: 24px; text-align: center; }
.theme-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-choice { display: grid; justify-items: center; gap: 4px; padding: 6px 4px; border: 2px solid transparent; font-size: .78rem; color: #403748; background: #f5f0eb; }
.theme-choice span { font: 680 1.23rem/1.2 var(--serif); }
.theme-choice.sepia { background: #f2e7d1; color: #3a2c23; }
.theme-choice.night { background: #302938; color: #f1e8f6; }
.theme-choice[aria-pressed="true"] { border-color: #8764d0; }

#toast { position: fixed; bottom: 22px; right: 22px; z-index: 6; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 44px); padding: 10px 14px; border: 1px solid #ebe3f5; color: #fff; background: #433067; box-shadow: 0 5px 16px #29184538; font-size: .86rem; font-weight: 750; opacity: 0; transform: translateY(9px); pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 15px; }
}
@media (max-width: 800px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  :root { --gutter: clamp(16px, 4.2vw, 29px); }
  .site-navigation { position: fixed; z-index: 5; inset: auto 0 0; padding: 4px max(8px, var(--safe-right)) max(5px, var(--safe-bottom)) max(8px, var(--safe-left)); border-top: 1px solid var(--line); }
  .site-navigation-inner { display: block; padding: 0; }
  .site-navigation nav { display: grid; width: 100%; max-width: 520px; margin: 0 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .site-navigation .install, .nav-wide { display: none; }
  .nav-narrow { display: inline !important; }
  .nav-link { flex-direction: column; gap: 3px; min-height: 48px; justify-content: center; padding: 4px 2px; font-size: .75rem; }
  .nav-link svg { width: 18px; height: 18px; }
  .topbar-inner { flex-wrap: wrap; min-height: 61px; gap: 8px; padding-block: 8px; }
  .site-brand .brand { font-size: 1.33rem; }
  .site-brand .brand-symbol { width: 33px; height: 33px; }
  .site-brand .brand-symbol svg { width: 19px; height: 19px; }
  .avatar { width: 34px; height: 34px; }
  .content { padding-top: 22px; }
  .cover-save { opacity: 1; }
}
@media (max-width: 570px) {
  .page-heading { margin-bottom: 19px; }
  .page-heading p { margin-top: 7px; font-size: .92rem; }
  .genres { flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding: 3px; margin-inline: -3px; scrollbar-width: none; }
  .genres .chip { flex: none; outline-offset: 0; }
  .chip { min-height: 34px; padding-inline: 11px; font-size: .79rem; }
  .section-head { margin-bottom: 12px; }
  .section-head .text-link { font-size: .8rem; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 13px; }
  .cover-save { top: 5px; right: 5px; width: 34px; height: 34px; }
  .series { margin-top: 27px; }
  .book-detail { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .book-detail > .cover { width: min(48vw, 185px); justify-self: center; }
  .detail-copy h1 { font-size: 2rem; }
  .detail-actions { gap: 7px; }
  .detail-actions .button { font-size: .8rem; padding-inline: 9px; }
  .reader-bar-inner { min-height: 52px; padding-inline: 12px; }
  .reader-exit span { display: none; }
  .reading-content { padding-top: 38px; }
  .reading-text { font-size: var(--reader-size); }
  .access-options { grid-template-columns: 1fr; }
  .form-panel .section-head { align-items: flex-start; }
}
@media (max-width: 355px) {
  .fields-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
