@charset "UTF-8";

:root {
    --ink: #17243c;
    --muted: #5d6a7d;
    --blue: #275ae8;
    --paper: #f4f6fa;
    --line: #dde3ed;
    --yellow: #edfa80;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--blue);
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

:focus-visible {
    outline: 3px solid #f09228;
    outline-offset: 4px;
}

img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: #e4eaf4;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    line-height: 1.2;
    letter-spacing: -.055em;
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    line-height: 1.4;
    letter-spacing: -.025em;
}

h3 {
    font-size: 1.07rem;
    line-height: 1.5;
}

.wrap {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header {
    background: white;
    border-bottom: 1px solid var(--line);
}

.topbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: var(--blue);
    border-radius: 13px 13px 13px 3px;
    color: white;
    font-size: 28px;
    font-weight: 900;
    box-shadow: 4px 4px 0 var(--yellow);
}

.brand strong {
    display: block;
    font-size: 22px;
    letter-spacing: -.03em;
}

.brand small,
.quiet {
    color: var(--muted);
    font-size: 14px;
}

.top-note {
    color: var(--muted);
    font-size: 14px;
    margin-left: auto;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 4px 0 16px;
}

.nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 15px;
    white-space: nowrap;
}

.nav a:hover {
    background: #f0f4ff;
}

.nav a[aria-current="page"] {
    background: var(--ink);
    color: white;
}

.section {
    margin-block: 64px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-head .icon {
    color: var(--blue);
    width: 25px;
    height: 25px;
}

.section-head p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.more {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
}

.hero {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    border-radius: 24px;
    overflow: hidden;
    background: var(--ink);
    color: white;
}

.hero-copy {
    padding: 44px;
    align-self: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

.hero .eyebrow {
    color: var(--yellow);
}

.hero h1 a:hover {
    color: white;
}

.hero h2 {
    font-size: 24px;
    margin-top: 16px;
    font-weight: 500;
}

.hero p {
    margin: 20px 0 24px;
    color: #cbd5e7;
    max-width: 33em;
}

.hero-art {
    position: relative;
    min-width: 0;
    min-height: 385px;
}

.hero-art img {
    height: 100%;
    position: absolute;
    inset: 0;
    aspect-ratio: 4 / 3;
}

.hero-caption {
    position: absolute;
    inset: auto 20px 20px;
    background: rgba(18, 29, 47, .9);
    padding: 16px 20px;
    border-left: 4px solid var(--yellow);
    border-radius: 6px;
}

.hero-caption strong {
    font-size: 23px;
    display: block;
}

.hero-caption span {
    font-size: 14px;
    color: #dce5f3;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    background: var(--blue);
    color: white;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.button:hover {
    background: #1742bd;
    color: white;
}

.button.light {
    color: var(--ink);
    background: var(--yellow);
}

.button.secondary {
    color: var(--ink);
    border-color: var(--line);
    background: white;
}

.hero .button.secondary {
    background: transparent;
    color: white;
    border-color: #60718b;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 23px 0;
    border-bottom: 1px solid var(--line);
}

.metrics div {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: center;
}

.metrics strong {
    font-size: 25px;
}

.metrics span {
    color: var(--muted);
    font-size: 14px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px;
}

.book {
    min-width: 0;
}

.cover {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    background: #dce5f3;
}

.cover img {
    aspect-ratio: 3 / 4;
    transition: transform .25s;
}

.cover:hover img {
    transform: scale(1.035);
}

.badge {
    position: absolute;
    top: 9px;
    left: 9px;
    background: var(--yellow);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
}

.book h3 {
    margin-top: 12px;
}

.book p {
    margin-top: 5px;
    font-size: 14px;
    color: var(--muted);
}

.editorial {
    padding: 30px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 28px;
}

.rank-item {
    display: grid;
    grid-template-columns: 32px 64px 1fr;
    gap: 12px;
    align-items: center;
    padding-block: 12px;
    border-top: 1px solid var(--line);
    min-width: 0;
}

.rank-number {
    font-size: 30px;
    font-weight: 850;
    color: var(--blue);
    font-style: italic;
}

.rank-item img {
    aspect-ratio: 3 / 4;
    border-radius: 7px;
}

.rank-item p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.category-tile {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: start;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #dbe3f2;
    background: #eaf0fd;
}

.category-tile:nth-child(2n) {
    background: #eaf3f0;
    border-color: #d8e9e2;
}

.category-tile .icon {
    width: 36px;
    height: 36px;
    color: var(--blue);
}

.category-tile p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
}

.strip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.strip {
    display: block;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-width: 0;
}

.strip img {
    aspect-ratio: 16 / 10;
}

.strip-copy {
    background: white;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
}

.strip p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
}

.china-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #172e31;
    color: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.china-feature > img {
    height: 100%;
    aspect-ratio: 4 / 3;
}

.china-copy {
    padding: 36px;
}

.china-copy .eyebrow {
    color: #c9e9bd;
}

.china-copy h3 {
    font-size: 29px;
    margin-bottom: 16px;
}

.china-copy p {
    color: #cee0dd;
    margin-bottom: 20px;
}

.mini-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.mini-links a {
    border-top: 1px solid #54706c;
    padding-top: 9px;
    color: white;
    font-size: 14px;
}

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

.diary {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #e8b85b;
}

.diary img {
    aspect-ratio: 1;
    border-radius: 8px;
}

.diary p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
}

.fantasy-section {
    padding: 32px;
    border-radius: var(--radius);
    background: #dfe8ff;
}

.fantasy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.portal {
    background: white;
    border-radius: 100px 100px 12px 12px;
    overflow: hidden;
    text-align: center;
}

.portal img {
    aspect-ratio: 4 / 3;
}

.portal h3 {
    padding: 16px 8px 4px;
}

.portal p {
    color: var(--muted);
    font-size: 14px;
    padding: 0 12px 18px;
}

.finish-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 36px;
}

.finish-row {
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.finish-row small {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.updates {
    background: white;
    padding: 26px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.update-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 80px;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.update-row:last-child {
    border: 0;
}

.update-row time {
    font-size: 14px;
    color: var(--muted);
}

.update-row > span {
    color: var(--muted);
    font-size: 14px;
}

.shelf-panel {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 36px;
    border-top: 3px solid var(--blue);
    padding: 28px;
    background: white;
    border-radius: 0 0 16px 16px;
}

.shelf-panel h2 {
    margin-bottom: 12px;
}

.shelf-panel p {
    color: var(--muted);
}

.shelf-list {
    display: grid;
    gap: 10px;
}

.saved-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    background: var(--paper);
    border-radius: 8px;
    padding: 12px 16px;
}

.saved-row button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
}

.about-grid p {
    color: var(--muted);
    margin-bottom: 16px;
}

details {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

details p {
    margin-top: 12px;
    font-size: 14px;
}

.subscribe {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 30px;
    background: var(--yellow);
    padding: 36px;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.subscribe-mark {
    background: var(--ink);
    color: var(--yellow);
    border-radius: 20px 20px 20px 4px;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    font-size: 50px;
    font-weight: 900;
}

.subscribe p {
    margin-top: 8px;
    color: #3c4c35;
    font-size: 14px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 36px;
    color: var(--muted);
    font-size: 14px;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.footer-row nav {
    display: flex;
    gap: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin: 28px 0;
}

.page-intro {
    border-left: 5px solid var(--blue);
    padding: 8px 0 10px 26px;
    margin-bottom: 32px;
}

.page-intro h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-intro p {
    max-width: 860px;
    margin-top: 16px;
    color: var(--muted);
}

.category-books {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.category-book {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.category-book > a img {
    aspect-ratio: 4 / 3;
}

.category-book-body {
    padding: 22px;
}

.category-book-body > p {
    margin: 10px 0 16px;
    color: var(--muted);
    font-size: 14px;
    min-height: 5.25em;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 14px;
    margin-block: 15px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 32px;
    background: white;
    border-radius: var(--radius);
}

.detail-hero > img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
}

.detail-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.detail-hero p {
    margin: 18px 0 24px;
    color: var(--muted);
}

.chapter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chapter-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    padding: 24px;
}

.chapter-card span {
    display: block;
    font-size: 14px;
    color: var(--blue);
    margin-bottom: 7px;
}

.reading {
    width: min(820px, 100%);
    margin-inline: auto;
    --read-size: 18px;
}

.reading h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.read-note {
    background: #e7edfb;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 24px 0;
    color: #394b6f;
    font-size: 14px;
}

.read-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 16px;
}

.read-tools select {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
}

.panel {
    margin: 0 0 32px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.panel img {
    aspect-ratio: 4 / 3;
}

.panel figcaption {
    padding: 24px 28px 28px;
}

.panel h2 {
    font-size: 14px;
    color: var(--blue);
    margin-bottom: 12px;
    letter-spacing: .08em;
}

.panel p {
    font-size: var(--read-size);
    line-height: 2;
}

.chapter-end {
    padding: 30px;
    text-align: center;
    border-block: 1px solid var(--line);
    margin: 40px 0;
}

.chapter-end p {
    color: var(--muted);
    margin: 10px 0 22px;
}

.chapter-end .actions {
    justify-content: center;
}

body.read-night {
    --paper: #111a29;
    --ink: #e3eaf5;
    --muted: #a9b9d0;
    --line: #344157;
    --blue: #91b0ff;
    background: var(--paper);
}

.read-night .panel,
.read-night .site-header,
.read-night .read-tools select,
.read-night .button.secondary {
    background: #1d293d;
    color: #e3eaf5;
}

.read-night .brand-mark,
.read-night .button:not(.secondary) {
    background: #335ad1;
    color: white;
}

.read-night .nav a[aria-current="page"] {
    background: #335ad1;
}

.read-night .nav a:hover {
    color: #14223b;
}

.image-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #3c5072;
    background: #e4eaf4;
    font-size: 14px;
    aspect-ratio: 4 / 3;
    text-align: center;
}

.cover .image-unavailable {
    aspect-ratio: 3 / 4;
}

.hero-art .image-unavailable {
    height: 100%;
    min-height: 385px;
}

.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #17243c;
    color: white;
    border: 1px solid #71809a;
    padding: 12px 24px;
    border-radius: 12px;
    max-width: calc(100% - 32px);
    width: max-content;
    z-index: 20;
}

.toast[hidden] {
    display: none;
}

.skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 30;
    padding: 12px;
    background: white;
}

.skip:focus {
    top: 10px;
}

@media (max-width: 1000px) {
    .book-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-copy {
        padding: 30px;
    }

    .rank-grid,
    .category-grid,
    .category-books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .top-note {
        display: none;
    }

    .subscribe {
        grid-template-columns: 90px 1fr;
    }

    .subscribe > .actions {
        grid-column: 2;
    }

    .nav {
        gap: 2px;
    }

    .nav a {
        font-size: 14px;
        gap: 5px;
    }

    .nav .icon {
        width: 17px;
    }
}

@media (max-width: 680px) {
    .wrap {
        width: calc(100% - 32px);
    }

    .topbar {
        min-height: 82px;
    }

    .brand strong {
        font-size: 20px;
    }

    .brand small {
        font-size: 12px;
    }

    .topbar > .button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }

    .nav a {
        flex-direction: column;
        gap: 3px;
        padding: 7px 2px;
        font-size: 13px;
    }

    .hero {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .hero-copy {
        padding: 28px 24px;
    }

    .hero h2 {
        font-size: 20px;
    }

    .hero-art {
        min-height: 260px;
    }

    .hero-art .image-unavailable {
        min-height: 260px;
    }

    .hero p {
        margin-block: 16px 20px;
    }

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

    .section {
        margin-block: 44px;
    }

    .section-head {
        align-items: start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .more {
        font-size: 13px;
        padding-top: 5px;
    }

    .book-grid,
    .strip-grid,
    .fantasy-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 14px;
    }

    .rank-grid,
    .diary-grid,
    .china-feature,
    .shelf-panel,
    .about-grid,
    .detail-hero,
    .chapter-grid {
        grid-template-columns: 1fr;
    }

    .rank-grid {
        gap: 8px;
    }

    .editorial,
    .fantasy-section,
    .updates,
    .shelf-panel {
        padding: 22px 18px;
    }

    .category-grid {
        gap: 12px;
    }

    .category-tile {
        grid-template-columns: 1fr;
        padding: 18px 14px;
        gap: 10px;
    }

    .category-tile p {
        font-size: 13px;
    }

    .strip-copy {
        padding: 14px;
    }

    .china-copy {
        padding: 25px;
    }

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

    .update-row {
        grid-template-columns: 70px 1fr;
        gap: 4px 12px;
    }

    .update-row > span {
        grid-column: 2;
    }

    .update-row > a:last-child {
        grid-column: 2;
    }

    .about-grid {
        gap: 20px;
    }

    .subscribe {
        grid-template-columns: 64px 1fr;
        padding: 24px 20px;
        gap: 18px;
    }

    .subscribe-mark {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }

    .subscribe > .actions {
        grid-column: 1 / -1;
    }

    .subscribe h2 {
        font-size: 20px;
    }

    .category-books {
        gap: 16px;
    }

    .category-book-body {
        padding: 14px;
    }

    .category-book-body .button {
        padding: 8px 10px;
        width: 100%;
        font-size: 14px;
    }

    .category-book-body > p {
        font-size: 14px;
        min-height: 0;
    }

    .detail-hero {
        padding: 24px;
        gap: 24px;
    }

    .detail-hero > img {
        width: 180px;
        justify-self: center;
    }

    .reading .panel figcaption {
        padding: 20px;
    }

    .read-note {
        padding: 18px;
    }

    .footer-row nav {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cover img {
        transition: none;
    }
}
