:root {
    --night: #070a0d;
    --night-soft: #0c1115;
    --panel: rgba(15, 20, 23, .94);
    --panel-light: rgba(24, 30, 32, .9);
    --paper: #e5d9be;
    --paper-bright: #fff1ce;
    --ink-soft: rgba(229, 217, 190, .66);
    --ink-faint: rgba(229, 217, 190, .42);
    --gold: #d4aa5e;
    --gold-bright: #f1d18b;
    --gold-dark: #8b6730;
    --jade: #6daa91;
    --line: rgba(218, 177, 98, .25);
    --line-soft: rgba(255, 255, 255, .09);
    --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    min-height: 100%;
    color-scheme: dark;
    scroll-behavior: smooth;
    background: var(--night);
}

body {
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    color: var(--paper);
    font-family: var(--sans);
    background:
        radial-gradient(circle at 52% -12%, rgba(67, 87, 87, .34), transparent 38rem),
        linear-gradient(180deg, #080c0f 0%, #090d10 58%, #060809 100%);
    -webkit-tap-highlight-color: transparent;
}

body.reader-open {
    overflow: hidden;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: 90;
    opacity: .16;
    pointer-events: none;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

a,
button {
    color: inherit;
    font: inherit;
}

a {
    text-decoration: none;
}

button {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .32;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: -80px;
    left: 16px;
    z-index: 120;
    min-height: 44px;
    padding: 12px 18px;
    color: #17120a;
    background: var(--gold-bright);
    border-radius: 0 0 8px 8px;
    font-weight: 900;
}

.skip-link:focus {
    top: 0;
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: .22;
    pointer-events: none;
    background:
        repeating-linear-gradient(118deg, transparent 0 82px, rgba(236, 216, 173, .035) 83px 84px, transparent 85px 170px),
        linear-gradient(120deg, transparent 42%, rgba(169, 198, 201, .08) 50%, transparent 58%);
    background-size: auto, 8px 240px;
    animation: rain-drift 11s linear infinite;
}

@keyframes rain-drift {
    to { background-position: 0 0, 70px 1100px; }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px max(18px, calc((100vw - 1420px) / 2));
    border-bottom: 1px solid var(--line-soft);
    background: rgba(7, 10, 13, .88);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-seal {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--gold-bright);
    background: linear-gradient(145deg, rgba(201, 155, 73, .24), rgba(23, 15, 7, .62));
    border: 1px solid rgba(225, 185, 105, .5);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .32), 0 0 24px rgba(210, 166, 84, .08);
    font: 900 1.12rem var(--serif);
}

.brand-copy {
    min-width: 0;
}

.brand-copy b,
.brand-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy b {
    color: var(--paper-bright);
    font: 800 .94rem var(--serif);
    letter-spacing: .13em;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: .58rem;
    letter-spacing: .12em;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.topnav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 800;
}

.topnav a:hover {
    color: var(--gold-bright);
}

.lamp-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ink-faint);
    font-size: .7rem;
    white-space: nowrap;
}

.lamp-status i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--jade);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--jade);
    animation: lamp-breathe 3.2s ease-in-out infinite;
}

@keyframes lamp-breathe {
    50% { opacity: .42; box-shadow: 0 0 5px var(--jade); }
}

main,
.site-footer {
    position: relative;
    z-index: 2;
}

.hero {
    width: min(100%, 1460px);
    min-height: 420px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .65fr);
    align-items: end;
    gap: clamp(34px, 7vw, 100px);
    margin: 0 auto;
    padding: clamp(64px, 8vw, 112px) clamp(20px, 4.5vw, 68px) clamp(48px, 7vw, 86px);
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background:
        linear-gradient(180deg, rgba(5, 8, 10, .08), rgba(5, 8, 10, .64)),
        radial-gradient(circle at 76% 38%, rgba(184, 139, 61, .12), transparent 28%);
}

.hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 42%;
    content: "";
    opacity: .38;
    background: repeating-linear-gradient(167deg, transparent 0 72px, rgba(227, 205, 159, .08) 74px, transparent 76px 126px);
    clip-path: polygon(0 60%, 10% 45%, 19% 56%, 30% 37%, 42% 51%, 53% 30%, 65% 45%, 75% 25%, 88% 41%, 100% 20%, 100% 100%, 0 100%);
}

.hero-mark {
    position: absolute;
    top: 34px;
    right: clamp(18px, 6vw, 90px);
    z-index: -1;
    width: clamp(210px, 27vw, 390px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: rgba(236, 204, 140, .1);
    border: 1px solid rgba(222, 178, 93, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(222, 178, 93, .025), 0 0 0 68px rgba(222, 178, 93, .015);
    font: 900 clamp(2.8rem, 6vw, 5.5rem) var(--serif);
    letter-spacing: .12em;
}

.hero-mark span,
.hero-mark i {
    position: absolute;
    left: 50%;
    width: 56%;
    height: 3px;
    transform: translateX(-50%);
    background: currentColor;
    box-shadow: 0 -17px 0 currentColor, 0 17px 0 currentColor;
}

.hero-mark span { top: 23%; }
.hero-mark i { bottom: 23%; }

.eyebrow {
    margin: 0 0 15px;
    color: var(--gold);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .22em;
}

.hero h1 {
    margin: 0;
    color: var(--paper-bright);
    font: 750 clamp(2.8rem, 6.2vw, 5.7rem)/1.02 var(--serif);
    letter-spacing: -.055em;
    text-shadow: 0 14px 38px rgba(0, 0, 0, .46);
}

.hero h1 em {
    color: var(--gold-bright);
    font-style: normal;
}

.hero-lead {
    max-width: 42rem;
    margin: 24px 0 0;
    color: var(--ink-soft);
    font: 400 clamp(.92rem, 1.25vw, 1.06rem)/1.9 var(--serif);
    letter-spacing: .04em;
}

.hero-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero-summary div {
    min-width: 0;
    padding: 14px 12px;
    border-right: 1px solid var(--line-soft);
}

.hero-summary div:last-child {
    border-right: 0;
}

.hero-summary dt {
    color: var(--ink-faint);
    font-size: .63rem;
}

.hero-summary dd {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--paper-bright);
    font: 800 clamp(.88rem, 1.4vw, 1.08rem) var(--serif);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog {
    width: min(100%, 1460px);
    margin: 0 auto;
    padding: 34px clamp(18px, 4.5vw, 68px) 78px;
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.catalog-heading h2 {
    margin: 0;
    color: var(--paper-bright);
    font: 800 clamp(1.8rem, 4vw, 3.3rem) var(--serif);
}

.catalog-result {
    margin: 0 0 5px;
    color: var(--ink-faint);
    font-size: .78rem;
}

.chapter-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 25px;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    color: var(--ink-soft);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.filter-button span {
    color: var(--ink-faint);
    font-size: .67rem;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
    color: var(--paper-bright);
    background: rgba(212, 170, 94, .13);
    border-color: var(--gold);
}

.filter-button[aria-pressed="true"] span {
    color: var(--gold-bright);
}

.data-notice {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    color: var(--paper);
    background: rgba(83, 57, 22, .35);
    border: 1px solid rgba(218, 177, 98, .3);
    border-radius: 14px;
}

.data-notice > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #1c1509;
    background: var(--gold);
    border-radius: 50%;
    font: 900 .9rem var(--serif);
}

.data-notice b,
.data-notice p {
    display: block;
    margin: 0;
}

.data-notice p {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: .78rem;
    line-height: 1.6;
}

.data-notice code {
    overflow-wrap: anywhere;
    color: var(--gold-bright);
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr));
    gap: clamp(13px, 1.8vw, 23px);
}

.page-card {
    min-width: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(23, 29, 31, .97), rgba(10, 14, 16, .98));
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.page-card:hover,
.page-card:focus-within {
    transform: translateY(-5px);
    border-color: rgba(222, 181, 100, .55);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .43), 0 0 28px rgba(207, 159, 73, .07);
}

.page-card-button {
    width: 100%;
    display: block;
    padding: 0;
    color: inherit;
    background: transparent;
    text-align: left;
}

.card-image-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(205, 163, 86, .14), transparent 48%),
        repeating-linear-gradient(0deg, rgba(240, 221, 179, .035) 0 1px, transparent 1px 9px),
        #0b1012;
    border-bottom: 1px solid var(--line-soft);
}

.card-image-wrap::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .28);
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, filter .3s ease;
}

.page-card:hover .card-image-wrap img,
.page-card:focus-within .card-image-wrap img {
    transform: scale(1.035);
    filter: brightness(1.06);
}

.card-image-wrap.no-image::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    content: "六爻";
    color: rgba(231, 198, 133, .24);
    font: 900 2.2rem var(--serif);
    letter-spacing: .22em;
}

.card-page-number {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 50px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    color: #171109;
    background: rgba(241, 209, 139, .92);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    font: 900 .7rem var(--serif);
}

.card-copy {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    padding: 15px 16px 17px;
}

.card-chapter {
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--gold);
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--paper-bright);
    font: 800 1.02rem/1.45 var(--serif);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--ink-faint);
    font-size: .7rem;
}

.card-cta i {
    color: var(--gold-bright);
    font-size: 1rem;
    font-style: normal;
}

.site-footer {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px max(20px, calc((100vw - 1320px) / 2));
    color: var(--ink-faint);
    border-top: 1px solid var(--line-soft);
    font-size: .72rem;
}

.site-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--gold);
}

.reader {
    position: fixed;
    inset: 0;
    z-index: 70;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(43, 54, 55, .4), transparent 48%),
        rgba(4, 7, 9, .985);
}

.reader-bar {
    min-height: 70px;
    display: grid;
    grid-template-columns: minmax(92px, 1fr) minmax(180px, 2fr) minmax(92px, 1fr);
    align-items: center;
    gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(6, 9, 11, .76);
    backdrop-filter: blur(14px);
}

.control-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 900;
}

.ghost-button {
    justify-self: start;
    color: var(--paper);
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line-soft);
}

#btnZoom {
    justify-self: end;
}

.reader-progress {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 14px;
}

.reader-progress b {
    overflow: hidden;
    color: var(--paper-bright);
    font: 800 .82rem var(--serif);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-progress span {
    color: var(--ink-faint);
    font-size: .68rem;
    white-space: nowrap;
}

.progress-track {
    grid-column: 1 / -1;
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
}

.progress-track i {
    width: 0;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright));
    border-radius: inherit;
    transition: width .2s ease;
}

.reader-stage {
    min-width: 0;
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: stretch;
}

.edge-button {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--gold);
    background: transparent;
    font-size: 2.8rem;
    opacity: .62;
}

.edge-button:hover:not(:disabled) {
    opacity: 1;
    background: rgba(255, 255, 255, .025);
}

.page-stage {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px;
}

.page-image-button {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
    background: transparent;
    border-radius: 10px;
}

.page-image-button img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 9px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .58), 0 0 0 1px rgba(238, 214, 164, .08);
}

.image-fallback {
    min-width: min(100%, 360px);
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .025);
    border: 1px dashed var(--line);
    border-radius: 12px;
    font: 800 1rem var(--serif);
}

.page-stage figcaption {
    max-width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    color: var(--ink-faint);
    text-align: center;
    font-size: .7rem;
}

.page-stage figcaption span,
.page-stage figcaption b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-stage figcaption b {
    color: var(--paper);
    font: 700 .82rem var(--serif);
}

.reader-footer {
    min-height: 66px;
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(90px, auto) minmax(100px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    background: rgba(6, 9, 11, .82);
}

.reader-footer p {
    margin: 0;
    color: var(--ink-faint);
    text-align: center;
    font: 700 .72rem var(--serif);
}

.secondary-button {
    justify-self: start;
    color: var(--paper);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line-soft);
}

.primary-button {
    justify-self: end;
    color: #1b1408;
    background: linear-gradient(135deg, var(--gold-bright), #c79542);
    border: 1px solid var(--gold-bright);
}

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--paper);
    background: rgba(2, 4, 5, .97);
    border: 0;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, .94);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox-bar {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(10px, env(safe-area-inset-top)) 18px 10px;
    border-bottom: 1px solid var(--line-soft);
}

.lightbox-bar p {
    min-width: 0;
    margin: 0;
}

.lightbox-bar span,
.lightbox-bar b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-bar span {
    color: var(--gold);
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .14em;
}

.lightbox-bar b {
    margin-top: 3px;
    color: var(--paper-bright);
    font: 800 .86rem var(--serif);
}

.lightbox-close {
    width: 46px;
    height: 46px;
    padding: 0;
    flex: 0 0 auto;
    color: var(--paper);
    background: rgba(255, 255, 255, .055);
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    font-size: 1.65rem;
    line-height: 1;
}

.lightbox-canvas {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 14px;
    overscroll-behavior: contain;
}

.lightbox-canvas img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
}

.lightbox-hint {
    min-height: 40px;
    margin: 0;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    color: var(--ink-faint);
    text-align: center;
    font-size: .66rem;
}

noscript {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 100;
    padding: 14px;
    color: var(--paper-bright);
    background: #472b20;
    border: 1px solid #a8664f;
    border-radius: 10px;
    text-align: center;
}

@media (max-width: 900px) {
    .lamp-status {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .hero-summary {
        width: min(100%, 560px);
    }

    .reader-stage {
        grid-template-columns: minmax(0, 1fr);
    }

    .edge-button {
        display: none;
    }
}

@media (max-width: 640px) {
    .topbar {
        min-height: 66px;
        gap: 8px;
        padding: 10px 14px;
    }

    .brand {
        flex: 1;
    }

    .brand-seal {
        width: 44px;
        height: 44px;
    }

    .brand-copy small,
    .topnav a:first-child {
        display: none;
    }

    .topnav {
        margin-left: 0;
    }

    .topnav a {
        padding: 0 8px;
        font-size: .7rem;
    }

    .hero {
        min-height: 390px;
        padding: 62px 19px 48px;
    }

    .hero h1 {
        font-size: clamp(2.55rem, 14vw, 4rem);
    }

    .hero-summary div {
        padding: 12px 9px;
    }

    .catalog {
        padding: 24px 14px 58px;
    }

    .catalog-heading {
        display: block;
    }

    .catalog-result {
        margin-top: 10px;
    }

    .chapter-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-button:first-child {
        grid-column: 1 / -1;
    }

    .filter-button {
        min-width: 0;
        padding: 0 10px;
    }

    .page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .page-card {
        border-radius: 12px;
    }

    .card-page-number {
        top: 7px;
        left: 7px;
        min-width: 42px;
        font-size: .62rem;
    }

    .card-copy {
        min-height: 116px;
        padding: 12px 11px 13px;
    }

    .card-title {
        font-size: .88rem;
    }

    .card-cta {
        padding-top: 10px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .reader-bar {
        grid-template-columns: 70px minmax(0, 1fr) 78px;
        gap: 8px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .control-button {
        padding: 0 10px;
        font-size: .72rem;
    }

    .reader-progress {
        display: block;
        text-align: center;
    }

    .reader-progress b,
    .reader-progress span {
        display: block;
    }

    .reader-progress span {
        margin-top: 3px;
    }

    .progress-track {
        margin-top: 5px;
    }

    .page-stage {
        padding: 8px;
    }

    .page-stage figcaption {
        width: 100%;
        display: block;
    }

    .page-stage figcaption span,
    .page-stage figcaption b {
        display: block;
    }

    .page-stage figcaption b {
        margin-top: 3px;
    }

    .reader-footer {
        min-height: 64px;
        grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
        gap: 8px;
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 380px) {
    .brand-copy b {
        max-width: 7.5em;
    }

    .topnav a {
        padding: 0 4px;
    }

    .chapter-filters {
        grid-template-columns: 1fr;
    }

    .filter-button:first-child {
        grid-column: auto;
    }

    .page-grid {
        grid-template-columns: 1fr;
    }

    .reader-bar {
        grid-template-columns: 58px minmax(0, 1fr) 68px;
    }

    .reader-footer p {
        font-size: .63rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
