:root {
    --ink: #18212f;
    --muted: #667085;
    --paper: #fffdf8;
    --surface: #ffffff;
    --line: #e9e4da;
    --brand: #ed6543;
    --brand-dark: #b83d24;
    --yellow: #ffd45a;
    --navy: #18345a;
    --green: #238b78;
    --purple: #7450a8;
    --shadow: 0 16px 40px rgba(31, 38, 56, 0.09);
    --radius-lg: 28px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(circle at 8% 12%, rgba(255, 212, 90, 0.14), transparent 24%), radial-gradient(circle at 94% 8%, rgba(237, 101, 67, 0.1), transparent 22%);
    content: "";
    pointer-events: none;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(233, 228, 218, 0.9);
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(14px);
}

.header-main {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 42px;
    place-items: center;
    border: 3px solid var(--ink);
    border-radius: 50% 50% 45% 45%;
    background: var(--yellow);
    box-shadow: 4px 4px 0 var(--brand);
    font-size: 1.1rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 999px;
    color: #3e4858;
    font-size: 0.88rem;
    font-weight: 700;
    transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: var(--ink);
}

.nav-icon {
    font-size: 0.95rem;
}

main {
    overflow: hidden;
}

.hero {
    margin-top: 38px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    min-height: 455px;
    grid-template-columns: 1.12fr 0.88fr;
    align-items: center;
    gap: 36px;
    padding: 58px;
    border: 2px solid var(--ink);
    border-radius: 36px;
    background: linear-gradient(135deg, #fff4d6 0%, #ffffff 52%, #ffe8e0 100%);
    box-shadow: 9px 9px 0 var(--ink);
}

.hero-panel::after {
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border: 52px solid rgba(237, 101, 67, 0.12);
    border-radius: 50%;
    content: "";
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--brand-dark);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.4rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-copy {
    max-width: 650px;
    margin: 24px 0 30px;
    color: #4f5968;
    font-size: 1.1rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 4px 4px 0 var(--yellow);
}

.button.secondary {
    background: #ffffff;
    color: var(--ink);
    box-shadow: none;
}

.hero-art {
    position: relative;
    min-height: 300px;
}

.hero-cover {
    position: absolute;
    overflow: hidden;
    width: 54%;
    border: 4px solid var(--ink);
    border-radius: 22px;
    box-shadow: 8px 8px 0 rgba(24, 33, 47, 0.94);
}

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

.hero-cover:first-child {
    z-index: 2;
    left: 4%;
    top: 5%;
    transform: rotate(-7deg);
}

.hero-cover:last-child {
    right: 4%;
    bottom: 1%;
    transform: rotate(7deg);
}

.metric-strip {
    display: grid;
    margin-top: 54px;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric {
    padding: 25px;
    text-align: center;
}

.metric + .metric {
    border-left: 1px solid var(--line);
}

.metric strong {
    display: block;
    font-size: 1.65rem;
}

.metric span {
    color: var(--muted);
    font-size: 0.9rem;
}

.section {
    margin-top: 88px;
}

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

.section-kicker {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.15;
}

.section-heading p {
    max-width: 520px;
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    flex: none;
    color: var(--brand-dark);
    font-weight: 800;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.comic-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f2efe8;
    color: #535d6b;
    font-size: 0.76rem;
    font-weight: 700;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 24px;
}

.rank-list,
.rank-feature {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.rank-list {
    padding: 12px 28px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
}

.rank-item + .rank-item {
    border-top: 1px dashed var(--line);
}

.rank-number {
    color: var(--brand);
    font-size: 1.35rem;
    font-weight: 900;
}

.rank-item strong,
.rank-item span {
    display: block;
}

.rank-item span {
    color: var(--muted);
    font-size: 0.86rem;
}

.rank-score {
    padding: 5px 9px;
    border-radius: 9px;
    background: #fff3d2;
    font-weight: 800;
}

.rank-feature {
    overflow: hidden;
    background: var(--navy);
    color: #ffffff;
}

.rank-feature img {
    aspect-ratio: 16 / 10;
    opacity: 0.9;
}

.rank-feature .card-body p {
    color: #cfdaea;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 22px;
}

.editorial-main,
.editorial-side {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.editorial-main {
    position: relative;
    min-height: 520px;
}

.editorial-main img {
    height: 100%;
    min-height: 520px;
}

.editorial-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 80px 34px 32px;
    color: #ffffff;
    background: linear-gradient(transparent, rgba(14, 19, 30, 0.96));
}

.editorial-overlay h3 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.editorial-side {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 22px;
}

.story-tile {
    display: grid;
    grid-template-columns: 42% 58%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.story-tile img {
    height: 100%;
    min-height: 200px;
}

.story-tile .card-body {
    align-self: center;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 26px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.category-card:nth-child(2n) {
    background: #fff4d6;
}

.category-card:nth-child(3n) {
    background: #e8f5f1;
}

.category-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--ink);
    color: #ffffff;
    font-size: 1.3rem;
}

.category-card h3 {
    margin: 20px 0 7px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.timeline-item {
    padding: 24px;
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.timeline-time {
    color: var(--brand-dark);
    font-weight: 900;
}

.timeline-item h3 {
    margin: 8px 0;
}

.timeline-item p {
    margin: 0;
    color: var(--muted);
}

.spotlight {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    overflow: hidden;
    border-radius: 32px;
    background: #1b2638;
    color: #ffffff;
}

.spotlight img {
    height: 100%;
    min-height: 460px;
}

.spotlight-copy {
    align-self: center;
    padding: 50px;
}

.spotlight-copy h2 {
    margin: 8px 0 18px;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.1;
}

.spotlight-copy p {
    color: #cad4e4;
}

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

.shelf-book {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 18px;
    padding: 16px;
    border-bottom: 5px solid var(--yellow);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.shelf-book img {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
}

.shelf-book h3 {
    margin: 8px 0;
}

.shelf-book p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.guide-card {
    padding: 26px;
    border-top: 5px solid var(--brand);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.guide-card strong {
    display: block;
    margin-bottom: 9px;
    font-size: 1.08rem;
}

.guide-card p {
    margin: 0;
    color: var(--muted);
}

.bookshelf-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 38px;
    border: 2px dashed var(--brand);
    border-radius: var(--radius-lg);
    background: #fff7f2;
}

.bookshelf-panel h2,
.bookshelf-panel p {
    margin-top: 0;
}

.bookshelf-panel p {
    margin-bottom: 0;
    color: var(--muted);
}

.save-button {
    min-width: 160px;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.about-layout {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 46px;
    padding: 46px;
    border-radius: 32px;
    background: #eef6f4;
}

.about-layout h2 {
    margin-top: 0;
    font-size: 2.4rem;
}

.about-copy {
    columns: 2;
    column-gap: 36px;
}

.about-copy p {
    margin-top: 0;
}

.subscription {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 36px;
    padding: 42px;
    border: 3px solid var(--ink);
    border-radius: 32px;
    background: var(--yellow);
    box-shadow: 8px 8px 0 var(--brand);
}

.subscription h2 {
    margin: 0 0 10px;
    font-size: 2.2rem;
}

.subscription p {
    max-width: 720px;
    margin: 0;
}

.subscription-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qr-mark {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    border: 8px solid #ffffff;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, var(--ink) 0 9px, #ffffff 9px 18px);
    color: var(--brand);
    font-size: 1.7rem;
    font-weight: 900;
    text-shadow: 0 0 3px #ffffff;
}

.site-footer {
    margin-top: 90px;
    padding: 38px 0;
    color: #cfd6df;
    background: var(--ink);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.page-hero {
    margin-top: 38px;
    padding: 44px;
    border-radius: 30px;
    background: var(--navy);
    color: #ffffff;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #ccd8e8;
    font-size: 0.9rem;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d6dfeb;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 38px 0 24px;
}

.catalog-toolbar h2 {
    margin: 0;
}

.search-box {
    width: min(340px, 100%);
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.catalog-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 42% 58%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.catalog-card img {
    height: 100%;
    min-height: 260px;
}

.catalog-card .card-body {
    align-self: center;
}

.category-seo {
    margin-top: 60px;
    padding: 32px;
    border-radius: var(--radius-md);
    background: #f2f0ea;
}

.category-seo h2 {
    margin-top: 0;
}

.reader-shell {
    width: min(920px, calc(100% - 40px));
    margin: 38px auto 0;
}

.reader-header {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}

.reader-header .breadcrumbs {
    justify-content: center;
    color: var(--muted);
}

.reader-header h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 3.3rem);
}

.reader-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.reading-note {
    margin: 28px 0;
    padding: 22px 24px;
    border-left: 5px solid var(--brand);
    border-radius: 0 14px 14px 0;
    background: #fff4ee;
}

.comic-pages {
    display: grid;
    gap: 26px;
}

.comic-page {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.comic-page img {
    aspect-ratio: 16 / 11;
}

.comic-page figcaption {
    padding: 20px 24px;
    color: #4d5766;
}

.chapter-end {
    margin-top: 32px;
    padding: 30px;
    border: 2px dashed var(--line);
    border-radius: var(--radius-md);
    text-align: center;
}

.chapter-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.chapter-nav a,
.chapter-nav span {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    font-weight: 800;
    text-align: center;
}

.chapter-nav span {
    color: #9ba3af;
    background: #f3f3f0;
}

@media (max-width: 1020px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        right: 20px;
        top: 70px;
        display: none;
        width: min(420px, calc(100% - 40px));
        grid-template-columns: repeat(2, 1fr);
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: grid;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

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

    .comic-grid,
    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shelf-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .container,
    .reader-shell {
        width: min(100% - 28px, 1200px);
    }

    .hero {
        margin-top: 24px;
    }

    .hero-panel {
        min-height: auto;
        padding: 34px 24px;
        border-radius: 24px;
        box-shadow: 5px 5px 0 var(--ink);
    }

    .hero h1 {
        font-size: clamp(3rem, 20vw, 5.2rem);
    }

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

    .metric-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric + .metric {
        border-left: 0;
    }

    .metric:nth-child(2n) {
        border-left: 1px solid var(--line);
    }

    .metric:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .section {
        margin-top: 64px;
    }

    .section-heading,
    .catalog-toolbar,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .comic-grid,
    .category-grid,
    .timeline,
    .guide-grid,
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-layout,
    .editorial-grid,
    .spotlight,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .editorial-main,
    .editorial-main img {
        min-height: 430px;
    }

    .story-tile,
    .catalog-card {
        grid-template-columns: 40% 60%;
    }

    .spotlight-copy,
    .about-layout,
    .subscription {
        padding: 30px 24px;
    }

    .about-copy {
        columns: 1;
    }

    .bookshelf-panel,
    .subscription {
        grid-template-columns: 1fr;
    }

    .subscription-actions {
        flex-wrap: wrap;
    }

    .page-hero {
        padding: 32px 24px;
    }
}

@media (max-width: 520px) {
    .brand-name {
        display: none;
    }

    .site-nav {
        left: 14px;
        right: 14px;
        width: auto;
    }

    .comic-grid,
    .category-grid,
    .timeline,
    .guide-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .comic-card {
        display: grid;
        grid-template-columns: 42% 58%;
    }

    .comic-card img {
        height: 100%;
    }

    .rank-item {
        grid-template-columns: 40px 1fr;
    }

    .rank-score {
        display: none;
    }

    .editorial-side {
        grid-template-rows: none;
    }

    .story-tile,
    .catalog-card {
        grid-template-columns: 1fr;
    }

    .story-tile img,
    .catalog-card img {
        min-height: 260px;
    }

    .shelf-book {
        grid-template-columns: 92px 1fr;
    }

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