:root {
    --paper: #f6f7fa;
    --surface: #ffffff;
    --ink: #202333;
    --muted: #697083;
    --line: #e5e7ed;
    --accent: #df3156;
    --accent-dark: #be2042;
    --night: #171c2c;
    --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: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

button, input, select {
    font: inherit;
}

button, select {
    cursor: pointer;
}

button, select, input {
    max-width: 100%;
}

button {
    color: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #e29911;
    outline-offset: 4px;
}

img {
    display: block;
    max-width: 100%;
    background: #dce1ec;
    color: #3b4255;
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.3;
}

h2 {
    font-size: 25px;
    line-height: 1.4;
}

h3 {
    font-size: 17px;
}

.wrap {
    width: min(1280px, calc(100% - 64px));
    margin-inline: auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-top {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.header-top h1 {
    font-size: inherit;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.brand img {
    background: transparent;
    flex-shrink: 0;
}

.brand-note, .muted {
    color: var(--muted);
}

.brand-note {
    font-size: 14px;
    border-left: 1px solid var(--line);
    padding-left: 25px;
}

.mobile-link {
    margin-left: auto;
    font-size: 14px;
    color: var(--accent);
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: 25px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    min-height: 55px;
    border-bottom: 3px solid transparent;
    font-size: 15px;
}

.nav .active {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
}

.icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    vertical-align: middle;
}

main {
    padding-top: 30px;
    padding-bottom: 60px;
}

.hero {
    position: relative;
    min-height: 420px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--night);
    color: white;
}

.hero-slide {
    display: none;
    position: relative;
    min-height: 420px;
    isolation: isolate;
}

.hero-slide.is-active {
    display: grid;
    align-items: center;
}

.hero-art {
    position: absolute;
    right: 0;
    top: 0;
    width: 73%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #2e3b54;
    z-index: -2;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #171c2c 8%, #171c2cef 32%, #171c2c72 65%, #171c2c20);
    z-index: -1;
}

.hero-copy {
    width: 54%;
    padding: 40px 48px 82px;
}

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hero .eyebrow {
    color: #ffb4b9;
}

.hero h2 {
    font-size: clamp(30px, 3.5vw, 46px);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero-meta {
    color: #e4e7f1;
    font-size: 14px;
    margin-bottom: 17px;
}

.hero-summary {
    color: #cbd0de;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 10px 22px;
    border-radius: 9px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.button.primary:hover {
    background: var(--accent-dark);
}

.button.ghost {
    background: #ffffff12;
    border-color: #ffffff55;
    color: white;
}

.slider-controls {
    position: absolute;
    left: 48px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider-controls > button {
    color: white;
    background: #ffffff10;
    border: 1px solid #ffffff30;
    border-radius: 6px;
    min-width: 34px;
    height: 34px;
    font-size: 14px;
}

.slider-dots {
    display: flex;
    align-items: center;
}

.slider-dots button {
    border: 0;
    width: 26px;
    height: 28px;
    background: transparent;
    position: relative;
}

.slider-dots button::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 10px;
    background: #ffffff55;
    position: absolute;
    left: 9px;
    top: 10px;
}

.slider-dots button[aria-pressed="true"]::after {
    background: #ff647f;
    width: 18px;
    left: 3px;
}

.edition-line {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.edition-line .eyebrow {
    margin: 0;
}

.edition-line > :last-child {
    margin-left: auto;
}

.shelf {
    margin-top: 44px;
}

.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;
}

.section-heading .icon {
    color: var(--accent);
}

.section-heading p {
    font-size: 14px;
    margin-top: 5px;
}

.more {
    color: var(--muted);
    flex-shrink: 0;
    font-size: 14px;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 23px;
}

.comic-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cover {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #dce1ec;
    margin-bottom: 12px;
    box-shadow: 0 5px 12px #19253d0c;
}

.cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform .25s ease;
}

.cover:hover img {
    transform: scale(1.035);
}

.comic-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 51px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
}

.summary {
    font-size: 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    line-height: 1.7;
    margin: 8px 0 12px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
}

.tag {
    background: #e8ecf2;
    color: #4b5367;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.chapter {
    color: var(--accent);
    font-size: 13px;
    white-space: nowrap;
}

.feature-shelf {
    padding: 28px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
}

.rank-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}

.rank-number {
    color: var(--accent);
    font-size: 30px;
    font-weight: 800;
    font-style: italic;
}

.rank-list img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    max-width: none;
}

.rank-list .summary {
    margin: 3px 0 0;
}

.rank-list li > div {
    flex: 1;
    min-width: 0;
}

.about-block {
    margin-top: 48px;
    padding: 36px 40px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    background: white;
    border-radius: 0 16px 16px 0;
}

.about-block p {
    margin: 15px 0;
    color: var(--muted);
}

.about-block a {
    color: var(--accent);
    font-size: 14px;
}

.mobile-block {
    display: flex;
    align-items: center;
    gap: 45px;
    margin-top: 32px;
    padding: 40px;
    border-radius: 16px;
    color: white;
    background: var(--night);
}

.mobile-block > div {
    flex: 1;
}

.mobile-block img {
    flex-shrink: 0;
    border-radius: 24px;
    background: transparent;
}

.mobile-block h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.mobile-block .eyebrow {
    color: #ff9aab;
}

.mobile-block .meta {
    margin-top: 15px;
    color: #bbc4d5;
}

.site-footer {
    background: white;
    border-top: 1px solid var(--line);
    padding: 38px 0;
}

.site-footer .wrap {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px 50px;
}

.site-footer .muted {
    margin-top: 12px;
    font-size: 14px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 14px 25px;
    font-size: 14px;
}

.copyright {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 23px;
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 28px;
}

.page-intro {
    margin-bottom: 28px;
}

.page-intro h2 {
    margin: 10px 0;
    font-size: 19px;
}

.page-intro p {
    max-width: 800px;
    color: var(--muted);
}

.category-feature {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.category-feature > img {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.category-feature p {
    margin: 10px 0 15px;
    color: var(--muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 16px 0;
    margin-bottom: 15px;
    border-block: 1px solid var(--line);
    font-size: 14px;
}

.filters select {
    margin-left: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}

.filters > span {
    margin-left: auto;
    color: var(--muted);
}

.pagination {
    margin-top: 35px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
}

.pagination a {
    color: var(--accent);
}

.detail-hero {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.detail-hero > img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

dl {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 5px;
    font-size: 14px;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
}

.synopsis {
    padding: 28px;
    background: white;
    border-radius: 12px;
    margin-top: 30px;
}

.synopsis p {
    margin-top: 12px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.chapter-grid a {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 14px;
}

.scene-image {
    margin: 18px 0 0;
}

.scene-image img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 12px;
}

figcaption {
    font-size: 13px;
    color: var(--muted);
    padding: 8px 0;
}

.related .comic-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.guess {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-left: 3px solid var(--accent);
}

.guess h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.guess a {
    color: var(--accent);
}

.guess p {
    color: var(--muted);
    margin-top: 8px;
}

.prose {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 16px;
    background: white;
}

.prose p {
    margin-top: 22px;
}

.image-unavailable {
    border: 1px dashed #8b94a7;
    background: #e4e8f0;
    padding: 14px;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
