:root {
    --ink: #202438;
    --muted: #68708a;
    --paper: #fffdf8;
    --cream: #fff7df;
    --banana: #ffd84d;
    --coral: #ff775f;
    --violet: #6158d9;
    --line: #e8e7ef;
    --shadow: 0 14px 34px rgba(37, 42, 72, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f7f8fc;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.7;
}

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

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

.site-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 9px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px 12px 18px 18px;
    background: var(--banana);
    box-shadow: inset -5px -4px 0 rgba(161, 111, 0, 0.15);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 9px;
    border-radius: 10px;
    color: #4c5369;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2f278d;
    background: #eeeefe;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-top: 42px;
    padding: 62px;
    border-radius: 30px;
    background: linear-gradient(125deg, #fff0a4 0%, #ffe176 47%, #f9b9a9 100%);
    box-shadow: var(--shadow);
}

.hero::after {
    position: absolute;
    right: -65px;
    bottom: -110px;
    width: 340px;
    height: 340px;
    border: 26px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    content: "";
}

.eyebrow,
.section-kicker {
    margin: 0 0 8px;
    color: #66540e;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero h1 {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin: 0;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.08;
    letter-spacing: -4px;
}

.hero h1 span {
    color: #5946bd;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 610px;
    margin: 19px 0 25px;
    font-size: 17px;
}

.button-row,
.chapter-controls {
    display: flex;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--ink);
    color: white;
    font-size: 14px;
    font-weight: 800;
}

.button.light {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
}

.content-section {
    margin-top: 66px;
}

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

.section-heading h2,
.section-heading h1 {
    margin: 0;
    font-size: clamp(27px, 4vw, 36px);
    line-height: 1.2;
    letter-spacing: -1.5px;
}

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

.text-link {
    color: var(--violet);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

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

.comic-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: 0 4px 14px rgba(32, 36, 56, 0.04);
}

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

.comic-card-body {
    padding: 14px;
}

.comic-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.comic-card p,
.meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.category-card {
    min-height: 176px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.category-card b {
    display: block;
    margin-bottom: 10px;
    font-size: 31px;
}

.category-card h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

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

.rank-layout,
.feature-layout,
.about-layout,
.download-panel {
    display: grid;
    gap: 24px;
}

.rank-layout {
    grid-template-columns: 1.25fr 0.75fr;
}

.rank-list,
.reading-note,
.newsletter,
.about-card,
.filter-box {
    padding: 24px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-num {
    color: var(--coral);
    font-size: 22px;
    font-weight: 900;
}

.feature-layout {
    grid-template-columns: 1fr 1fr;
}

.feature-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    overflow: hidden;
    border-radius: 22px;
    background: #252b4d;
    color: white;
}

.feature-card img {
    height: 100%;
    min-height: 220px;
}

.feature-card div {
    padding: 27px;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 25px;
}

.feature-card p {
    margin: 0 0 14px;
    color: #d7dcfa;
}

.schedule {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

.schedule div {
    min-height: 130px;
    padding: 16px;
    border-right: 1px solid var(--line);
}

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

.schedule b,
.schedule span {
    display: block;
}

.schedule span {
    margin-top: 14px;
    color: var(--violet);
    font-size: 13px;
    font-weight: 700;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef0ff;
    color: #40389b;
    font-size: 14px;
    font-weight: 700;
}

.quote-strip {
    padding: 32px;
    border-radius: 22px;
    background: linear-gradient(115deg, #6259d9, #8a7ce8);
    color: white;
}

.quote-strip blockquote {
    max-width: 900px;
    margin: 0;
    font-size: clamp(21px, 3vw, 31px);
    font-weight: 700;
    line-height: 1.45;
}

.about-layout {
    grid-template-columns: 1fr 1fr;
}

.about-card {
    background: var(--cream);
}

.about-card h3,
.reading-note h2 {
    margin: 0 0 12px;
}

.about-card p,
.reading-note p {
    margin: 0;
    color: #4d5267;
}

.download-panel {
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    padding: 30px;
    border-radius: 24px;
    background: #202438;
    color: white;
}

.qr {
    display: grid;
    width: 120px;
    height: 120px;
    place-items: center;
    border-radius: 14px;
    background: repeating-linear-gradient(45deg, #fff 0 8px, #202438 8px 13px);
    color: #202438;
    font-weight: 900;
}

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

.download-panel p {
    margin-top: 8px;
    color: #d7daed;
}

.site-footer {
    margin-top: 66px;
    padding: 34px 0;
    background: #171a2b;
    color: #c7cbdb;
}

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

.breadcrumb {
    margin-top: 32px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--violet);
}

.page-hero {
    margin-top: 23px;
    padding: 37px;
    border-radius: 22px;
    background: white;
}

.page-hero h1 {
    margin: 0;
    font-size: 38px;
}

.page-hero p {
    max-width: 800px;
    margin: 10px 0 0;
    color: var(--muted);
}

.article {
    max-width: 860px;
    margin: 42px auto 0;
}

.article-header {
    padding-bottom: 23px;
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    margin: 8px 0 12px;
    font-size: clamp(30px, 5vw, 45px);
    line-height: 1.2;
}

.chapter-image {
    width: min(680px, 100%);
    margin: 30px auto;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.chapter-ending {
    margin-top: 24px;
    padding: 19px;
    border-radius: 14px;
    background: var(--cream);
    text-align: center;
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 68px;
        gap: 10px;
    }

    .brand {
        font-size: 18px;
    }

    .main-nav {
        max-width: calc(100vw - 150px);
    }

    .hero {
        margin-top: 28px;
        padding: 38px 26px;
    }

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

    .rank-layout,
    .feature-layout,
    .about-layout,
    .download-panel {
        grid-template-columns: 1fr;
    }

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

    .schedule div {
        border-bottom: 1px solid var(--line);
    }

    .feature-card {
        grid-template-columns: 120px 1fr;
    }

    .download-panel .qr {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .site-shell {
        width: min(100% - 22px, 1200px);
    }

    .brand-mark {
        width: 31px;
        height: 31px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

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

    .content-section {
        margin-top: 48px;
    }

    .feature-card {
        grid-template-columns: 1fr;
    }

    .feature-card img {
        max-height: 220px;
    }
}
