:root {
    --paper: #f4f6fa;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #687487;
    --line: #e1e6ef;
    --navy: #101d35;
    --accent: #a6f351;
    --blue: #2459cf;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

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

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

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

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

button, input, select {
    font: inherit;
}

button, select {
    cursor: pointer;
}

button {
    color: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #277fe3;
    outline-offset: 4px;
}

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

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

h1, h2, h3 {
    line-height: 1.35;
}

h1 {
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -1px;
    margin-bottom: 16px;
}

h2 {
    font-size: 25px;
    margin-bottom: 18px;
}

h3 {
    font-size: 17px;
}

main > section, main > aside {
    margin-bottom: 44px;
}

.shell {
    width: min(1280px, calc(100% - 64px));
    margin-inline: auto;
}

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

.header-top {
    height: 84px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    flex: 0 0 auto;
}

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

.header-reading {
    margin-left: auto;
    font-size: 14px;
    border: 1px solid var(--line);
    padding: 8px 18px;
    border-radius: 40px;
}

.main-nav {
    display: flex;
    gap: 7px;
    padding-bottom: 14px;
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 15px;
    border-radius: 9px;
    font-size: 14px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: #eef2fa;
}

.main-nav a.active {
    background: var(--navy);
    color: white;
}

.icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.home-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 34px;
    margin-bottom: 24px;
}

.home-intro h1 {
    margin: 0;
    font-size: 31px;
}

.home-intro > p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    text-align: right;
}

.eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.4px;
    color: var(--blue);
    margin-bottom: 10px;
}

.hero {
    background: var(--navy);
    color: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.slide {
    position: relative;
    isolation: isolate;
    min-height: 420px;
    display: none;
}

.slide.is-active {
    display: block;
}

.slide > img {
    position: absolute;
    z-index: -2;
    right: 0;
    width: 70%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    opacity: .86;
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #101d35 10%, #101d35ed 30%, #101d3570 65%, #101d3510);
}

.hero-content {
    max-width: 660px;
    padding: 46px 52px 84px;
}

.hero-label {
    display: inline-block;
    color: var(--accent);
    border: 1px solid #a6f35166;
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 13px;
    margin-bottom: 18px;
}

.hero-content h2 {
    font-size: clamp(30px, 4vw, 46px);
    margin-bottom: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-meta {
    color: #d5deea;
    font-size: 14px;
}

.hero-summary {
    max-width: 440px;
    color: #c5cfdd;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 26px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 21px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.primary {
    background: var(--accent);
    color: #14251c;
}

.primary:hover {
    background: #b8ff70;
    color: #14251c;
}

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

.ghost {
    background: #ffffff10;
    border-color: #ffffff50;
    color: white;
}

.ghost:hover {
    color: var(--accent);
}

.quiet {
    background: transparent;
    border-color: var(--line);
}

.slider-controls {
    position: absolute;
    bottom: 23px;
    left: 52px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.slider-controls > button {
    border: 1px solid #ffffff40;
    background: #101d35;
    color: white;
    border-radius: 6px;
    min-width: 34px;
    min-height: 32px;
    font-size: 13px;
}

.slider-dots {
    display: flex;
    gap: 6px;
}

.slider-dots button {
    width: 24px;
    height: 24px;
    padding: 8px 2px;
    border: 0;
    background: transparent;
}

.slider-dots button::after {
    content: "";
    display: block;
    height: 4px;
    border-radius: 3px;
    background: #7a8492;
}

.slider-dots button[aria-pressed="true"]::after {
    background: var(--accent);
}

.discovery-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, 1fr);
    gap: 12px;
    align-items: center;
    padding: 20px 24px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    margin-top: -22px;
}

.discovery-strip h2 {
    margin: 0;
    font-size: 17px;
}

.discovery-link {
    font-size: 14px;
    border-left: 1px solid var(--line);
    padding-left: 20px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

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

.section-heading h2 .icon {
    color: var(--blue);
    width: 24px;
    height: 24px;
}

.section-heading > a, .section-heading > span {
    color: var(--muted);
    font-size: 14px;
}

.update-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.update-list a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2px 16px;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.update-list a > span:nth-child(3) {
    grid-column: 2;
    color: var(--muted);
}

.update-list a > span:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
    color: var(--blue);
}

.update-time {
    grid-row: 1 / 3;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 13px;
}

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

.comic-card {
    min-width: 0;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.comic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 24px #17203312;
}

.cover-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #d5deed;
    overflow: hidden;
}

.cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #d5deed;
    color: #465772;
    font-size: 14px;
}

.cover-wrap .cover {
    height: 100%;
}

.cover-tag {
    position: absolute;
    right: 9px;
    bottom: 9px;
    border-radius: 5px;
    padding: 2px 7px;
    color: white;
    background: #15213ad9;
    font-size: 12px;
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    height: 46px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta, .card-author, .latest-chapter {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-chapter {
    color: var(--blue);
    margin-top: 7px;
}

.card-summary {
    font-size: 13px;
    color: var(--muted);
    height: 44px;
    margin: 9px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag {
    display: inline-block;
    background: #f0f3f8;
    color: #53627a;
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 4px;
}

.soft-section {
    padding: 28px;
    background: #e9eff9;
    border-radius: 18px;
}

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

.rank-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.rank-num {
    font-size: 28px;
    font-weight: 800;
    font-style: italic;
    color: var(--blue);
}

.rank-row .cover {
    width: 55px;
    border-radius: 5px;
    flex-shrink: 0;
}

.rank-row h3 {
    margin: 0 0 8px;
}

.rank-row p, .rank-status {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.rank-status {
    margin-left: auto;
    flex-shrink: 0;
}

.about-panel {
    border-top: 1px solid var(--line);
    padding-top: 32px;
}

.about-panel p {
    max-width: 950px;
    color: var(--muted);
}

.about-panel a {
    color: var(--blue);
    font-size: 14px;
}

.mobile-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 38px;
    background: var(--navy);
    color: white;
    padding: 38px 42px;
    border-radius: 18px;
}

.mobile-panel > div {
    max-width: 840px;
}

.mobile-panel .eyebrow {
    color: var(--accent);
}

.mobile-panel p {
    color: #c3cedf;
    font-size: 14px;
}

.mobile-panel > img {
    flex-shrink: 0;
    border-radius: 16px;
}

.text-link {
    font-size: 14px;
}

.site-footer {
    background: white;
    border-top: 1px solid var(--line);
    padding: 36px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr .65fr;
    gap: 30px;
}

.footer-grid p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.footer-grid nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 22px;
    align-content: start;
    font-size: 14px;
}

.footer-grid nav:last-child {
    grid-template-columns: 1fr;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

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

.category-intro {
    margin-top: 32px;
}

.category-intro p {
    max-width: 850px;
    color: var(--muted);
}

.category-pick {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    align-items: center;
}

.category-pick img {
    border-radius: 9px;
}

.category-pick p {
    max-width: 860px;
    color: var(--muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 16px;
}

.filters label, .reader-tools label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

input, select {
    max-width: 100%;
    min-height: 42px;
    padding: 7px 10px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14px;
}

.filter-search {
    margin-left: auto;
}

.filter-status {
    font-size: 14px;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 26px;
    font-size: 14px;
}

.pagination span[aria-current] {
    padding: 5px 14px;
    background: var(--navy);
    color: white;
    border-radius: 5px;
}

.detail-top {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    margin-top: 30px;
    padding: 32px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.detail-cover .cover {
    border-radius: 12px;
}

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    margin: 24px 0;
    font-size: 14px;
}

.facts > div {
    display: flex;
    gap: 14px;
}

.facts dt {
    color: var(--muted);
    white-space: nowrap;
}

.facts dd {
    margin: 0;
}

.detail-summary {
    line-height: 1.9;
}

.detail-info .actions + p {
    margin-top: 12px;
}

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

.chapter-list a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.chapter-list span {
    font-size: 13px;
    color: var(--muted);
}

.chapter-list span:last-child {
    color: var(--blue);
}

.story-gallery > div {
    max-width: 760px;
}

.story-gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #d5deed;
    border-radius: 12px;
}

.also-like {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 26px;
    background: #e9eff9;
    border-radius: 14px;
}

.also-like > div {
    max-width: 800px;
}

.also-like .button {
    flex-shrink: 0;
}

.info-page {
    max-width: 880px;
    margin: 32px auto 60px;
    background: var(--surface);
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.info-page section {
    margin: 32px 0;
}

.info-page h2 {
    font-size: 21px;
}

.info-page p {
    color: var(--muted);
}

.history-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.toast {
    position: fixed;
    z-index: 100;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 32px);
    background: var(--navy);
    color: white;
    padding: 12px 22px;
    border-radius: 10px;
    box-shadow: 0 5px 30px #0003;
    font-size: 14px;
    display: none;
}

.toast.show {
    display: block;
}

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

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

[hidden] {
    display: none !important;
}

.image-failed {
    object-fit: contain !important;
    background: #dce4ef;
}

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

    * {
        transition: none !important;
    }
}
