.reader-page {
    --reader-bg: var(--np-canvas);
    --reader-surface: var(--np-surface);
    --reader-ink: var(--np-ink);
    --reader-muted: var(--np-muted);
    --reader-border: var(--np-border);
    --reader-accent: var(--np-accent);
    --reader-accent-soft: var(--np-accent-soft);
    --reader-overlay: rgba(24, 32, 30, 0.42);
    --reader-font-size: 18px;
    --reader-line-height: 1.9;
    --reader-brightness: 1;
    --reader-quick-nav-height: calc(50px + env(safe-area-inset-bottom));
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    background:
        linear-gradient(180deg, var(--np-canvas) 0%, var(--np-canvas) 100%);
}

html[data-theme="light"][data-reader-paper="warm"] .reader-page {
    --reader-bg: #f7f1e5;
    --reader-surface: #fffaf0;
    --reader-ink: #2b241d;
    --reader-muted: #776b5e;
    --reader-border: #ded2bf;
    --reader-accent: #96633f;
    --reader-accent-soft: #efe0ca;
    --reader-overlay: rgba(43, 36, 29, 0.42);
}

html[data-theme="light"][data-reader-paper="green"] .reader-page {
    --reader-bg: #e8f2e8;
    --reader-surface: #f4faf3;
    --reader-ink: #17251a;
    --reader-muted: #607064;
    --reader-border: #c8dac9;
    --reader-accent: #397451;
    --reader-accent-soft: #d3e7d5;
    --reader-overlay: rgba(23, 37, 26, 0.42);
}

html[data-theme="light"][data-reader-paper="cool"] .reader-page {
    --reader-bg: #ecebf0;
    --reader-surface: #f8f7fa;
    --reader-ink: #1d1c23;
    --reader-muted: #6d6b77;
    --reader-border: #d5d3dd;
    --reader-accent: #5b617e;
    --reader-accent-soft: #dedff0;
    --reader-overlay: rgba(29, 28, 35, 0.42);
}

.reader-page button,
.reader-page a,
.reader-page input {
    -webkit-tap-highlight-color: transparent;
}

.reader-app {
    position: relative;
    display: flex;
    width: min(100%, 560px);
    height: 100dvh;
    min-height: 100%;
    margin: 0 auto;
    overflow: hidden;
    flex-direction: column;
    background: var(--reader-bg);
    color: var(--reader-ink);
    box-shadow: 0 0 40px rgba(24, 32, 30, 0.08);
    transition: background-color 180ms ease, color 180ms ease;
}

html[data-theme="dark"] .reader-app {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.32);
}

.reader-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--reader-bg);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.reader-main::-webkit-scrollbar,
.reader-directory-list::-webkit-scrollbar {
    display: none;
}

.reader-ambient {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding:
        max(7px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        7px
        max(16px, env(safe-area-inset-left));
    background: linear-gradient(180deg, var(--reader-bg) 72%, rgba(0, 0, 0, 0));
    color: var(--reader-muted);
    font-size: 11px;
    line-height: 1.4;
    pointer-events: none;
}

.reader-ambient__book,
.reader-ambient__progress {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
}

.reader-ambient__book {
    overflow: hidden;
}

.reader-ambient__book span:first-child,
.reader-ambient__book strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-ambient__book strong {
    color: var(--reader-muted);
    font-weight: 500;
}

.reader-ambient__progress {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.reader-ambient__progress strong {
    color: var(--reader-accent);
    font-weight: 700;
}

.reader-content {
    width: min(100%, 42em);
    margin: 0 auto;
    padding: 10px 20px 58px;
    filter: brightness(var(--reader-brightness));
    transition: filter 160ms ease;
}

.reader-ad {
    width: min(100%, 42em);
    margin: 0 auto;
    padding: 0 20px;
}

.reader-ad:empty {
    display: none;
}

.reader-ad .ad-slot {
    margin: 12px 0;
}

.reader-ad .ad-slot a,
.reader-ad .ad-slot img {
    display: block;
    width: 100%;
}

.reader-ad .ad-slot img {
    border-radius: 8px;
}

.reader-chapter-head {
    margin: 6px 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--reader-border);
}

.reader-chapter-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: var(--reader-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.reader-chapter-kicker span[aria-hidden="true"] {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.reader-chapter-head h1 {
    margin: 0 0 10px;
    color: var(--reader-ink);
    font-size: clamp(23px, 6.5vw, 30px);
    font-weight: 700;
    line-height: 1.38;
}

.reader-chapter-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--reader-muted);
    font-size: 12px;
    line-height: 1.6;
}

.reader-article {
    color: var(--reader-ink);
    font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: var(--reader-font-size);
    font-weight: 400;
    line-height: var(--reader-line-height);
    overflow-wrap: anywhere;
    text-rendering: optimizeLegibility;
}

.reader-article > span {
    display: block;
}

.reader-article p {
    margin: 0 0 1.25em;
    text-indent: 2em;
}

.reader-article p:last-child {
    margin-bottom: 0;
}

.reader-article div {
    max-width: 100%;
}

.reader-article img {
    height: auto;
    margin: 1.25em auto;
}

.reader-article blockquote {
    margin: 1.4em 0;
    padding: 9px 0 9px 13px;
    border-left: 2px solid var(--reader-accent);
    background: var(--reader-accent-soft);
    color: var(--reader-ink);
}

.reader-article h1,
.reader-article h2,
.reader-article h3,
.reader-article h4 {
    margin: 1.6em 0 0.8em;
    color: var(--reader-ink);
    line-height: 1.45;
}

.reader-chapter-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 38px;
    padding-top: 24px;
    color: var(--reader-muted);
    font-family: "MiSans", "HarmonyOS Sans SC", "PingFang SC", sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.reader-chapter-end span {
    width: 38px;
    height: 1px;
    background: var(--reader-border);
}

.reader-chapter-end strong {
    font-weight: 600;
}

.reader-paywall {
    display: flex;
    min-height: 320px;
    align-items: center;
    padding: 36px 18px;
    border: 1px solid var(--reader-border);
    border-radius: 8px;
    background: var(--reader-surface);
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.reader-paywall__icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--reader-accent-soft);
    color: var(--reader-accent);
}

.reader-paywall__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reader-paywall h2 {
    margin: 0 0 8px;
    color: var(--reader-ink);
    font-size: 20px;
}

.reader-paywall p {
    margin: 0 0 14px;
    color: var(--reader-muted);
    font-size: 13px;
}

.reader-paywall > strong {
    margin-bottom: 18px;
    color: var(--reader-accent);
    font-size: 18px;
}

.reader-paywall__notice {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
}

.reader-primary-action {
    display: inline-flex;
    min-width: 150px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--reader-accent);
    border-radius: 8px;
    background: var(--reader-accent);
    color: var(--np-on-accent);
    font-weight: 700;
    cursor: pointer;
}

.reader-status-footer {
    position: relative;
    z-index: 14;
    display: flex;
    min-height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding:
        5px
        max(18px, env(safe-area-inset-right))
        max(7px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    border-top: 1px solid var(--reader-border);
    background: var(--reader-bg);
    color: var(--reader-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.reader-status-footer > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reader-status-footer strong {
    color: var(--reader-accent);
}

.reader-quick-nav {
    position: sticky;
    bottom: 0;
    z-index: 16;
    display: grid;
    min-height: var(--reader-quick-nav-height);
    flex: 0 0 auto;
    align-items: stretch;
    padding:
        4px
        max(8px, env(safe-area-inset-right))
        max(5px, env(safe-area-inset-bottom))
        max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--reader-border);
    background: var(--reader-surface);
    grid-template-columns: minmax(0, 1fr) minmax(76px, auto) minmax(0, 1fr);
}

.reader-quick-nav__item {
    display: inline-flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 7px;
    border-radius: 7px;
    color: var(--reader-ink);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.reader-quick-nav__item:first-child {
    justify-content: flex-start;
}

.reader-quick-nav__item:last-child {
    justify-content: flex-end;
}

.reader-quick-nav__item--directory {
    border-right: 1px solid var(--reader-border);
    border-left: 1px solid var(--reader-border);
    color: var(--reader-accent);
}

.reader-quick-nav__item.is-disabled {
    color: var(--reader-muted);
    opacity: 0.62;
}

.reader-quick-nav svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reader-quick-nav__item:active {
    background: var(--reader-accent-soft);
}

.reader-menu {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
}

.reader-toolbar,
.reader-bottom-bar {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 52;
    border-color: var(--reader-border);
    background: var(--reader-surface);
    box-shadow: 0 12px 30px rgba(24, 32, 30, 0.12);
    pointer-events: none;
    visibility: hidden;
}

html[data-theme="dark"] .reader-toolbar,
html[data-theme="dark"] .reader-bottom-bar {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.reader-toolbar--top {
    top: 0;
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding:
        max(8px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        8px
        max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--reader-border);
    transform: translateY(-105%);
}

.reader-bottom-bar {
    bottom: 0;
    padding:
        12px
        max(14px, env(safe-area-inset-right))
        max(8px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    border-top: 1px solid var(--reader-border);
    transform: translateY(105%);
}

.reader-page.is-menu-open .reader-toolbar--top,
.reader-page.is-menu-open .reader-bottom-bar {
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.reader-page.is-menu-open .reader-bottom-bar {
    bottom: var(--reader-quick-nav-height);
}

.reader-page.is-directory-open .reader-toolbar--top,
.reader-page.is-directory-open .reader-bottom-bar,
.reader-page.is-settings-open .reader-toolbar--top,
.reader-page.is-settings-open .reader-bottom-bar {
    pointer-events: none;
    visibility: hidden;
}

.reader-page.is-directory-open .reader-toolbar--top,
.reader-page.is-settings-open .reader-toolbar--top {
    transform: translateY(-105%);
}

.reader-page.is-directory-open .reader-bottom-bar,
.reader-page.is-settings-open .reader-bottom-bar {
    transform: translateY(105%);
}

.reader-toolbar__main,
.reader-toolbar__actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.reader-toolbar__title {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.reader-toolbar__title strong,
.reader-toolbar__title span {
    max-width: min(52vw, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-toolbar__title strong {
    color: var(--reader-ink);
    font-size: 14px;
    line-height: 1.4;
}

.reader-toolbar__title span {
    color: var(--reader-muted);
    font-size: 11px;
    line-height: 1.4;
}

.reader-icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--reader-muted);
    cursor: pointer;
}

.reader-icon-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reader-icon-button:active {
    background: var(--reader-accent-soft);
    transform: scale(0.96);
}

.reader-bookmark-icon {
    fill: transparent !important;
}

.reader-icon-button[aria-pressed="true"] {
    background: var(--reader-accent-soft);
    color: var(--reader-accent);
}

.reader-icon-button[aria-pressed="true"] .reader-bookmark-icon {
    fill: currentColor !important;
}

.reader-chapter-nav {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
}

.reader-chapter-nav > a {
    display: inline-flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    gap: 3px;
    color: var(--reader-ink);
    font-size: 13px;
    font-weight: 600;
}

.reader-chapter-nav > a:last-child {
    justify-content: flex-end;
}

.reader-chapter-nav svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reader-chapter-nav > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: nowrap;
}

.reader-chapter-nav strong {
    color: var(--reader-accent);
    font-size: 12px;
}

.reader-chapter-nav > div span {
    color: var(--reader-muted);
    font-size: 11px;
}

.reader-scrubber {
    display: grid;
    align-items: center;
    gap: 8px;
    margin: 8px 0 6px;
    color: var(--reader-muted);
    font-size: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.reader-scrubber input,
.reader-brightness input {
    width: 100%;
    height: 4px;
    margin: 0;
    border-radius: 999px;
    accent-color: var(--reader-accent);
}

.reader-nav {
    display: grid;
    padding-top: 5px;
    border-top: 1px solid var(--reader-border);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reader-nav button {
    display: flex;
    min-width: 0;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--reader-muted);
    cursor: pointer;
    flex-direction: column;
    font-size: 11px;
}

.reader-nav button.is-active {
    background: var(--reader-accent-soft);
    color: var(--reader-accent);
    font-weight: 700;
}

.reader-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reader-theme-icon--sun {
    display: none;
}

html[data-theme="dark"] .reader-theme-icon--moon {
    display: none;
}

html[data-theme="dark"] .reader-theme-icon--sun {
    display: block;
}

.reader-sheet-backdrop,
.reader-drawer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    visibility: hidden;
    background: var(--reader-overlay);
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.reader-sheet-backdrop.is-open,
.reader-drawer-backdrop.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.reader-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 72;
    pointer-events: none;
    visibility: hidden;
    max-height: min(82dvh, 660px);
    overflow-y: auto;
    padding:
        18px
        max(18px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    border-top: 1px solid var(--reader-border);
    border-radius: 12px 12px 0 0;
    background: var(--reader-surface);
    box-shadow: 0 -12px 36px rgba(24, 32, 30, 0.14);
    transform: translateY(105%);
    transition: transform 220ms ease;
}

.reader-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.reader-sheet__head,
.reader-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reader-sheet__head {
    margin-bottom: 18px;
}

.reader-sheet__head h2,
.reader-drawer__head h2 {
    margin: 0;
    color: var(--reader-ink);
    font-size: 18px;
    line-height: 1.45;
}

.reader-sheet__head p,
.reader-drawer__head p {
    margin: 2px 0 0;
    color: var(--reader-muted);
    font-size: 11px;
}

.reader-setting {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--reader-border);
}

.reader-setting:first-of-type {
    border-top: 0;
}

.reader-setting > span,
.reader-brightness > span {
    flex: 0 0 auto;
    color: var(--reader-muted);
    font-size: 12px;
}

.reader-setting--column {
    align-items: flex-start;
    padding: 15px 0;
    flex-direction: column;
}

.reader-stepper {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--reader-border);
    border-radius: 8px;
    background: var(--reader-bg);
    grid-template-columns: 44px 64px 44px;
}

.reader-stepper button {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: var(--reader-ink);
    cursor: pointer;
}

.reader-stepper strong {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--reader-border);
    border-left: 1px solid var(--reader-border);
    color: var(--reader-accent);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.reader-segments {
    display: inline-grid;
    padding: 3px;
    border: 1px solid var(--reader-border);
    border-radius: 8px;
    background: var(--reader-bg);
    grid-auto-flow: column;
    grid-auto-columns: minmax(58px, auto);
}

.reader-segments button {
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--reader-muted);
    cursor: pointer;
    font-size: 12px;
}

.reader-segments button.is-active {
    background: var(--reader-surface);
    color: var(--reader-accent);
    font-weight: 700;
    box-shadow: 0 2px 7px rgba(24, 32, 30, 0.08);
}

.reader-paper-options {
    display: grid;
    width: 100%;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reader-paper-options button {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--reader-border);
    border-radius: 8px;
    background: transparent;
    color: var(--reader-muted);
    cursor: pointer;
    flex-direction: column;
    font-size: 11px;
}

.reader-paper-options button.is-active {
    border-color: var(--reader-accent);
    background: var(--reader-accent-soft);
    color: var(--reader-accent);
}

.reader-paper-swatch {
    display: block;
    width: 28px;
    height: 28px;
    border: 1px solid var(--reader-border);
    border-radius: 50%;
}

.reader-paper-swatch--default {
    background: linear-gradient(135deg, #ffffff 0 50%, #18201e 50% 100%);
}

.reader-paper-swatch--warm {
    background: #f7f1e5;
}

.reader-paper-swatch--green {
    background: #e8f2e8;
}

.reader-paper-swatch--cool {
    background: #ecebf0;
}

.reader-brightness {
    display: grid;
    min-height: 52px;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--reader-border);
    grid-template-columns: auto minmax(0, 1fr);
}

.reader-drawer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 73;
    pointer-events: none;
    visibility: hidden;
    display: flex;
    width: min(88%, 380px);
    padding:
        max(18px, env(safe-area-inset-top))
        0
        max(12px, env(safe-area-inset-bottom))
        0;
    border-right: 1px solid var(--reader-border);
    background: var(--reader-surface);
    box-shadow: 14px 0 36px rgba(24, 32, 30, 0.16);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    flex-direction: column;
}

.reader-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
}

.reader-drawer__head {
    padding: 0 18px 14px;
}

.reader-directory-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--reader-border);
    border-bottom: 1px solid var(--reader-border);
}

.reader-directory-tools a,
.reader-directory-tools button {
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--reader-accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.reader-directory-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.reader-directory-item {
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--reader-border);
    color: var(--reader-ink);
    font-size: 13px;
}

.reader-directory-item span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-directory-item small {
    flex: 0 0 auto;
    color: var(--reader-muted);
    font-size: 10px;
}

.reader-directory-item.is-current {
    border-left: 3px solid var(--reader-accent);
    background: var(--reader-accent-soft);
    color: var(--reader-accent);
    font-weight: 700;
}

.reader-directory-item.is-vip small {
    color: #b7791f;
}

.reader-directory-status {
    margin: 0;
    padding: 24px 18px;
    color: var(--reader-muted);
    font-size: 12px;
    text-align: center;
}

.reader-drawer__footer {
    display: grid;
    align-items: center;
    padding: 10px 18px 0;
    border-top: 1px solid var(--reader-border);
    color: var(--reader-muted);
    font-size: 11px;
    grid-template-columns: 1fr auto 1fr;
}

.reader-drawer__footer button {
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--reader-accent);
    cursor: pointer;
    font-size: 12px;
}

.reader-drawer__footer button:first-child {
    text-align: left;
}

.reader-drawer__footer button:last-child {
    text-align: right;
}

.reader-drawer__footer button:disabled {
    color: var(--reader-muted);
    cursor: default;
    opacity: 0.5;
}

.reader-toast {
    position: absolute;
    top: max(52px, calc(env(safe-area-inset-top) + 44px));
    left: 50%;
    z-index: 90;
    display: flex;
    max-width: calc(100% - 36px);
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--np-ink);
    color: var(--np-canvas);
    box-shadow: 0 7px 22px rgba(24, 32, 30, 0.2);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -7px);
    transition: opacity 180ms ease, transform 180ms ease;
}

html[data-theme="dark"] .reader-toast {
    background: #e7ece9;
    color: #111614;
}

.reader-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.reader-toast svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 700px) {
    .reader-page {
        padding: 0;
    }

    .reader-app {
        border-right: 1px solid var(--reader-border);
        border-left: 1px solid var(--reader-border);
    }
}

@media (max-width: 390px) {
    .reader-content,
    .reader-ad {
        padding-right: 16px;
        padding-left: 16px;
    }

    .reader-toolbar__title strong,
    .reader-toolbar__title span {
        max-width: 34vw;
    }

    .reader-paper-options {
        gap: 5px;
    }

    .reader-paper-options button {
        padding-right: 4px;
        padding-left: 4px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .reader-icon-button,
    .reader-nav button,
    .reader-quick-nav__item,
    .reader-stepper button,
    .reader-segments button,
    .reader-paper-options button,
    .reader-primary-action {
        transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
    }
}

@media (hover: hover) {
    .reader-icon-button:hover,
    .reader-nav button:hover {
        background: var(--reader-accent-soft);
        color: var(--reader-accent);
    }

    .reader-directory-item:hover {
        background: var(--reader-accent-soft);
    }
}
