:root {
    color-scheme: light;
    --ink: #151b29;
    --text: #242c3b;
    --muted: #687180;
    --accent: #ff713d;
    --accent-dark: #bb3d11;
    --paper: #ffffff;
    --back: #f5f6f8;
    --line: #e2e6ed;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--back);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", 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-dark);
}

button, select, input {
    font: inherit;
}

button, select {
    cursor: pointer;
}

button, .button {
    touch-action: manipulation;
}

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

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

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

h1, h2, h3 {
    line-height: 1.4;
    color: var(--ink);
}

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

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    vertical-align: -3px;
}

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

.topbar {
    display: flex;
    align-items: center;
    min-height: 90px;
    gap: 26px;
}

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

.brand-name {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.25;
}

.header-note {
    padding-left: 25px;
    border-left: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.header-discover {
    margin-left: auto;
    background: var(--ink);
    color: white;
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
}

.header-discover:hover {
    background: var(--accent);
    color: var(--ink);
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 16px 12px;
    font-size: 14px;
    font-weight: 650;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.navigation a.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}

.page-kicker {
    display: flex;
    justify-content: space-between;
    padding: 26px 0 18px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 1px;
}

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

.hero-slide {
    position: relative;
    min-height: 448px;
    display: grid;
    grid-template-columns: 46% 54%;
}

[hidden] {
    display: none !important;
}

.hero-picture {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    position: relative;
    align-self: stretch;
    background: #28374a;
}

.hero-picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--ink), transparent 45%), linear-gradient(0deg, #151b2944, transparent);
    pointer-events: none;
}

.hero-picture img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    color: #dae2ee;
}

.hero-copy {
    grid-column: 1;
    grid-row: 1;
    padding: 40px 16px 75px 42px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 1.5px;
    color: var(--accent-dark);
}

.hero-copy .eyebrow {
    color: #ffb391;
}

.hero-tags {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 19px 0 12px;
    font-size: 12px;
    color: #d9e0e8;
}

.hero-tags span {
    padding: 3px 9px;
    border: 1px solid #ffffff35;
    border-radius: 5px;
}

.hero-copy h2 {
    color: white;
    font-size: clamp(28px, 3.2vw, 42px);
    letter-spacing: -1px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hero-intro {
    color: #c3cbd7;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-reason {
    color: #ffb391;
    margin-top: 12px;
    font-size: 13px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.primary {
    background: var(--accent);
    color: #1d1d24;
}

.primary:hover {
    background: #ff966e;
    color: #1d1d24;
}

.secondary {
    color: white;
    border-color: #ffffff55;
    background: #ffffff0d;
}

.secondary:hover {
    color: #ffb391;
}

.outline {
    background: var(--paper);
    color: var(--text);
    border-color: var(--line);
}

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

.slider-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    bottom: 19px;
    left: 42px;
    z-index: 2;
}

.slider-controls button {
    background: transparent;
    color: white;
    border: 1px solid #ffffff55;
    border-radius: 6px;
    min-width: 34px;
    min-height: 34px;
    font-size: 13px;
}

.slider-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.slider-dots button {
    min-width: 24px;
    min-height: 30px;
    border: 0;
    position: relative;
}

.slider-dots button::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 10px;
    background: #9aa3b1;
    left: 9px;
    top: 12px;
}

.slider-dots button[aria-pressed="true"]::before {
    background: var(--accent);
    width: 18px;
    left: 3px;
}

.quick-topics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.quick-topics a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
}

.quick-topics .icon {
    color: var(--accent-dark);
}

.shelf {
    margin: 44px 0;
}

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

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 800;
}

.section-heading h2 .icon {
    color: var(--accent-dark);
    width: 23px;
    height: 23px;
}

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

.section-heading p {
    margin-top: 5px;
}

.text-link {
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 650;
}

.section-heading > a {
    flex-shrink: 0;
}

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

.comic-card {
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 180ms, box-shadow 180ms;
}

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

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

.cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #dce3ec;
    color: #354252;
}

.cover-status {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 24px 12px 10px;
    color: white;
    font-size: 12px;
    background: linear-gradient(transparent, #131925e8);
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h3 {
    font-size: 17px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.genre {
    color: var(--muted);
    font-size: 13px;
    margin: 7px 0 2px;
}

.author, .state {
    font-size: 12px;
    color: var(--muted);
}

.latest-chapter {
    font-size: 13px;
    color: var(--accent-dark);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    margin: 8px 0 4px;
}

.card-tag {
    font-size: 12px;
    color: #525f73;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 10px;
    min-height: 51px;
}

.card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    height: 67px;
    color: var(--muted);
    margin-top: 10px;
}

.tinted {
    background: #eaf0f6;
    padding: 24px;
    border-radius: 18px;
}

.editorial-band {
    border-left: 5px solid var(--accent);
    background: var(--ink);
    padding: 32px 40px;
    border-radius: 0 16px 16px 0;
    position: relative;
}

.editorial-band h2 {
    color: white;
    font-size: 29px;
    margin: 7px 0 12px;
}

.editorial-band .eyebrow {
    color: #ffb391;
}

.editorial-band p {
    color: #c3cbd7;
    max-width: 750px;
}

.editorial-band .button {
    margin-top: 20px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 16px;
}

.rank-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
}

.rank-list li > div {
    min-width: 0;
    flex: 1;
}

.rank-number {
    font-size: 35px;
    color: var(--accent-dark);
    font-weight: 900;
    font-style: italic;
    flex: 0 0 48px;
}

.rank-list h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.rank-cover {
    width: 60px;
    flex: 0 0 60px;
}

.rank-cover img {
    border-radius: 6px;
}

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

.about-panel h2 {
    margin: 8px 0 16px;
    font-size: 26px;
}

.about-panel p {
    max-width: 900px;
    color: var(--muted);
    margin-bottom: 16px;
}

.mobile-panel {
    display: flex;
    align-items: center;
    gap: 50px;
    justify-content: space-between;
    padding: 36px 44px;
    background: #ffe1d4;
    border-radius: 18px;
    margin-bottom: 52px;
}

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

.mobile-panel h2 {
    font-size: 29px;
    margin: 8px 0 12px;
}

.mobile-panel > img {
    flex: 0 0 156px;
}

.small {
    font-size: 12px;
    margin-top: 14px;
    color: #694e44;
}

.site-footer {
    background: var(--ink);
    color: #d3d9e4;
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr .65fr;
    gap: 60px;
    padding-bottom: 36px;
}

.footer-grid .brand-name {
    color: white;
}

.footer-grid p {
    font-size: 14px;
    max-width: 340px;
    margin-top: 16px;
    color: #a8b1c1;
}

.footer-grid nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.footer-grid nav a, .footer-grid > div:last-child > a {
    display: block;
    font-size: 14px;
    padding: 6px 0;
}

.site-footer a:hover {
    color: #ffb391;
}

.copyright {
    border-top: 1px solid #ffffff1a;
    padding-block: 22px;
    font-size: 12px;
    color: #a8b1c1;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    padding: 24px 0;
}

.category-intro {
    margin: 8px 0 26px;
}

.category-intro h1 {
    font-size: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.category-intro h1 .icon {
    width: 32px;
    height: 32px;
    color: var(--accent-dark);
}

.category-intro p {
    margin-top: 12px;
    max-width: 870px;
    color: var(--muted);
}

.category-feature {
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 30px;
    padding: 26px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
}

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

.category-feature h2 {
    margin: 7px 0 10px;
    font-size: 25px;
}

.category-feature p {
    color: var(--muted);
    max-width: 900px;
    font-size: 14px;
}

.category-feature .button {
    margin-top: 14px;
}

.filter-bar {
    background: var(--paper);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 24px;
}

.filter-bar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 14px;
    background: var(--back);
}

.pill.selected {
    background: var(--ink);
    color: white;
}

.sort-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 14px;
}

select {
    padding: 8px 26px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--paper);
    max-width: 100%;
}

.filter-message, .more-row {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.filter-message:not(:empty) {
    padding: 30px 0;
}

.more-row {
    margin-top: 28px;
}

.more-row .button {
    margin-top: 12px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 38px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}

.detail-cover img {
    border-radius: 10px;
}

.detail-info {
    min-width: 0;
}

.detail-info h1 {
    font-size: 36px;
    margin: 9px 0;
}

.metadata {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 20px;
    font-size: 14px;
    margin: 22px 0;
}

.metadata > div {
    display: flex;
    gap: 12px;
}

.metadata dt {
    color: var(--muted);
    flex-shrink: 0;
}

.metadata dd {
    margin: 0;
}

.detail-reason {
    color: var(--accent-dark);
    font-size: 14px;
}

.prose-panel {
    padding: 28px 0 0;
}

.prose-panel h2, .related-scenes h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.prose-panel p {
    max-width: 1000px;
    line-height: 2;
}

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

.chapter-list a {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
}

.chapter-list span {
    color: var(--accent-dark);
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.chapter-list strong {
    font-size: 16px;
}

.scene-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.scene {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #dce3ec;
    border-radius: 12px;
}

figcaption {
    color: var(--muted);
    font-size: 13px;
    padding-top: 8px;
}

.information-page {
    max-width: 880px;
    margin: 0 auto 60px;
    padding: 35px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.information-page h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.information-page h2 {
    font-size: 22px;
    margin-bottom: 24px;
}

.information-page p {
    margin-bottom: 20px;
    line-height: 2;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 12px;
    background: var(--ink);
    color: white;
}

.skip-link:focus {
    top: 8px;
}

.toast {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    z-index: 20;
    background: var(--ink);
    color: white;
    border-radius: 10px;
    padding: 12px 22px;
    box-shadow: 0 4px 20px #0003;
}

.toast:empty {
    display: none;
}

.image-error {
    object-fit: contain;
    font-size: 14px;
}

.image-retry {
    display: block;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--text);
    padding: 8px 12px;
    margin: 8px auto;
    border-radius: 6px;
    font-size: 13px;
}

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

    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
