:root {
    color-scheme: dark;
    --bg: #151325;
    --panel: #201c34;
    --raised: #28213f;
    --line: #3c3356;
    --text: #fcf8ff;
    --muted: #c0b5d4;
    --accent: #c6b2ff;
    --mint: #a2f0d1;
    --ink: #22173a;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1rem; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
img { display: block; max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.23; overflow-wrap: anywhere; }
ol, ul { padding: 0; margin: 0; list-style: none; }
section[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.muted, .section-note { color: var(--muted); }
.skip, .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip:focus {
    z-index: 10;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    clip-path: none;
    padding: 8px 16px;
    color: var(--ink);
    background: var(--mint);
}

.site-header { background: #19162b; border-bottom: 1px solid var(--line); }
.topbar { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; flex: none; font-weight: 800; letter-spacing: .06em; }
.logo { width: 40px; height: 40px; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    font-size: .875rem;
    white-space: nowrap;
}
.icon { flex: none; width: 24px; height: 24px; }
.menu .icon { width: 17px; height: 17px; }
.menu a:hover, .menu a[aria-current] { color: var(--text); background: #30264d; border-color: #4b3c70; }
.menu a[aria-current] { box-shadow: inset 0 -2px var(--mint); }
.site-footer { margin-top: clamp(50px, 8vw, 105px); border-top: 1px solid var(--line); }
.foot { min-height: 105px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-block: 14px; }
.foot small { margin-left: auto; color: var(--muted); }
.text-link { color: var(--accent); font-weight: 700; text-underline-offset: 4px; }
.text-link:hover, h3 a:hover { text-decoration: underline; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--mint);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}
.button:hover { background: #c5ffe8; }
.button.secondary { background: #2f2550; color: var(--text); border-color: #5c4a85; }
.button.secondary:hover { background: #453564; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 1px 9px;
    border: 1px solid #5a477b;
    border-radius: 999px;
    color: var(--accent);
    background: #2c2248;
    font-size: .875rem;
    font-weight: 700;
}

.hero {
    isolation: isolate;
    position: relative;
    display: grid;
    grid-template-columns: 1.07fr .93fr;
    align-items: center;
    min-height: 420px;
    margin-top: 34px;
    border: 1px solid #55446e;
    border-radius: 25px;
    overflow: hidden;
    background: radial-gradient(ellipse at 91% 8%, #513c79 0, transparent 48%), linear-gradient(115deg, #2a2146, #33254c);
}
.hero-copy { position: relative; z-index: 2; min-width: 0; padding: clamp(28px, 5vw, 66px); }
.hero h1 { font-size: clamp(2.95rem, 6vw, 5.3rem); font-weight: 900; letter-spacing: -.05em; }
.hero-copy > p { max-width: 33rem; margin-block: 18px 24px; color: #e4daf5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 390px; margin-top: 27px; }
.stats > div {
    display: flex;
    flex-direction: column-reverse;
    gap: 1px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #594772;
    background: #251c3b;
}
.stats dt { color: #d7c7ee; font-size: .875rem; }
.stats dd { font-size: 1.6rem; line-height: 1.1; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--mint); }
.hero-art { position: relative; width: 100%; align-self: stretch; min-height: 340px; overflow: hidden; }
.hero-art::before {
    content: "";
    position: absolute;
    inset: 0 0 0 -12%;
    opacity: .38;
    background: repeating-linear-gradient(127deg, transparent 0 17px, #baa6ee 18px, transparent 19px 34px);
    mask-image: linear-gradient(110deg, transparent, black 42%);
}
.hero-mark { position: absolute; width: 190px; height: 190px; opacity: .16; right: 1%; top: 1%; transform: rotate(15deg); }
.cover {
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    display: grid;
    aspect-ratio: 5 / 4;
    align-content: end;
    padding: clamp(10px, 2vw, 23px);
    background:
        linear-gradient(0deg, #140f27dd, transparent 68%),
        radial-gradient(circle at 69% 23%, var(--cover-light, #b5a1ff) 0 14%, transparent 14.5%),
        repeating-linear-gradient(143deg, transparent 0 31px, #e7daff45 32px 33px, transparent 34px 52px),
        linear-gradient(145deg, var(--cover-base, #715da3), #221a39);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; z-index: -1; }
.cover::after { content: ""; position: absolute; inset: 36% 0 0; background: linear-gradient(transparent, #161023f2); z-index: -1; pointer-events: none; }
.cover-name { font-size: clamp(1.1rem, 2.4vw, 2.2rem); font-weight: 900; line-height: 1.15; text-shadow: 0 2px 12px #160e2e; overflow-wrap: anywhere; }
.cover-latest { --cover-base: #344775; --cover-light: #8ec8ee; }
.cover-popular { --cover-base: #77518f; --cover-light: #ffd194; }
.cover-ranking { --cover-base: #b45170; --cover-light: #ffbf8a; }
.cover-genres { --cover-base: #6b4790; --cover-light: #cba2ea; }
.cover-guoman { --cover-base: #325f61; --cover-light: #cff2cc; }
.cover-manga { --cover-base: #8c5c40; --cover-light: #f9d190; }
.cover-manhwa { --cover-base: #3c7491; --cover-light: #bcf6d3; }
.hero-art .cover {
    position: absolute;
    top: 17%;
    width: 39%;
    aspect-ratio: 3 / 4;
    border: 3px solid #dec9ff;
    border-radius: 14px;
    box-shadow: 0 16px 38px #0e091ec7;
}
.hero-art .cover-latest { left: 6%; transform: rotate(-12deg) translateY(12%); }
.hero-art .cover-popular { left: 31%; top: 11%; transform: rotate(3deg); z-index: 1; }
.hero-art .cover-manhwa { left: 56%; transform: rotate(14deg) translateY(17%); }

.home-sections, .inner-sections { display: grid; gap: clamp(43px, 6.2vw, 76px); margin-top: 54px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.section-head h2 { display: flex; gap: 10px; align-items: center; font-size: clamp(1.35rem, 2.6vw, 2rem); }
.section-head h2 .icon { width: 27px; height: 27px; }
.section-note { margin: -3px 0 15px; }
.timeline, .archives, .rank-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.timeline li { display: grid; grid-template-columns: 114px minmax(0, 1fr) auto; align-items: center; gap: 10px 17px; padding: 11px 17px; }
.timeline li + li, .archives li + li, .rank-list li + li { border-top: 1px solid var(--line); }
.timeline time { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.row-work { display: inline-block; margin-right: 11px; color: var(--muted); }
.row-title { display: inline-block; font-weight: 800; }
.row-title:hover { color: var(--accent); }
.timeline li p { margin-top: 4px; }
.row-go { min-height: 36px; display: grid; align-items: center; }
.dated { display: grid; gap: 16px; }
.day h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.03rem; }
.day h3 time { color: var(--mint); }

.cards, .podium, .genre-grid, .trials { display: grid; gap: 14px; }
.card, .podium li, .trials article, .genre-grid a, .spotlight {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
}
.pick { grid-template-columns: 1.65fr 1fr 1fr; }
.pick .card:first-child { display: grid; grid-template-columns: .94fr 1.06fr; }
.pick .card:first-child .cover { height: 100%; }
.card .cover { aspect-ratio: 16 / 9; }
.card-copy { padding: 15px; }
.card-copy h3, .spot-copy h3 { margin-block: 8px; font-size: 1.25rem; }
.card-copy p, .rank-copy p, .trials p, .spot-copy p, .archives p { margin-bottom: 9px; color: var(--muted); }
.podium { grid-template-columns: 1.15fr 1fr 1fr; margin-bottom: 14px; }
.podium .cover { aspect-ratio: 2 / 1; }
.rank-copy { position: relative; min-height: 85px; padding: 13px 14px 11px 70px; }
.rank-copy p { margin: 4px 0 0; }
.rank-number {
    position: absolute;
    left: 13px;
    top: 13px;
    min-width: 42px;
    padding: 2px 4px;
    border-radius: 6px;
    background: var(--raised);
    color: var(--mint);
    font-weight: 900;
    text-align: center;
    font-size: 1.2rem;
}
.rank-list .rank-copy { min-height: 0; }
.genre-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.genre-grid a { display: grid; gap: 4px; padding: 14px; min-height: 110px; }
.genre-grid a:hover { border-color: var(--accent); background: var(--raised); }
.genre-grid a span { color: var(--muted); font-size: .875rem; }
.genre-groups { display: grid; gap: 10px; margin-top: 18px; }
.genre-groups > section { display: grid; grid-template-columns: 90px 1fr; gap: 8px 14px; border-bottom: 1px solid var(--line); padding: 12px 4px; }
.genre-groups > section > div { grid-column: 2; min-width: 0; }
.genre-groups p { color: var(--muted); }
.genre-groups + .spotlight { margin-top: 18px; }
.mosaic { grid-template-columns: 1.35fr 1fr; }
.mosaic > :first-child { grid-row: span 2; display: grid; grid-template-rows: 1fr auto; }
.mosaic > :first-child .cover { aspect-ratio: auto; min-height: 235px; }
.mosaic > :not(:first-child) { display: grid; grid-template-columns: .49fr .51fr; }
.mosaic > :not(:first-child) .cover { aspect-ratio: auto; }
.shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shelf .card { display: grid; grid-template-columns: .42fr .58fr; }
.shelf .cover { aspect-ratio: auto; min-height: 190px; }
.shelf .cover-name { font-size: clamp(1rem, 1.7vw, 1.4rem); }
.feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature .card { display: grid; grid-template-columns: .53fr .47fr; }
.feature .cover { aspect-ratio: auto; min-height: 175px; }
.trials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trials article { padding: 20px; background: linear-gradient(135deg, #392958, var(--panel)); }
.trials h3, .archives h3 { margin-bottom: 5px; }
.archives li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; }
.archives li a { flex: none; }
.archives p { margin-bottom: 0; }
.spotlight { display: grid; grid-template-columns: 1fr 1fr; }
.spotlight .cover { aspect-ratio: auto; min-height: 240px; }
.spot-copy { align-self: center; padding: clamp(20px, 4vw, 44px); }
.spot-copy blockquote { margin-block: 10px 16px; border-left: 3px solid var(--accent); padding-left: 12px; color: var(--muted); }
.subscription {
    display: grid;
    align-items: center;
    grid-template-columns: clamp(75px, 16vw, 160px) 1fr;
    gap: clamp(14px, 4vw, 48px);
    padding: clamp(19px, 5vw, 47px);
    border: 1px solid #5d4a86;
    border-radius: 18px;
    background: radial-gradient(ellipse at left top, #534079, transparent 65%), #2a2143;
}
.rss-mark { width: 100%; height: auto; }
.subscription .actions { margin-top: 13px; }
.feed-address { color: var(--muted); margin-top: 9px; overflow-wrap: anywhere; }
.copy-status:not(:empty) { color: var(--mint); margin-top: 6px; }

.breadcrumbs { margin-block: 23px 17px; color: var(--muted); font-size: .875rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 3px 9px; }
.breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs li + li::before { content: "/"; margin-right: 9px; color: #9b86bd; }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { text-decoration: underline; }
.category-intro {
    padding: clamp(22px, 5vw, 53px);
    border: 1px solid #5a487b;
    border-radius: 19px;
    background: linear-gradient(120deg, #362959, var(--panel) 87%);
}
.category-intro > .icon { width: 32px; height: 32px; margin-bottom: 9px; }
.category-intro h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.category-intro p { max-width: 700px; margin-block: 10px 13px; color: var(--muted); }
.reader { max-width: 780px; margin-inline: auto; }
.reading-header { padding-block: clamp(16px, 4vw, 40px) 23px; border-bottom: 1px solid var(--line); }
.reading-work { color: var(--mint); font-weight: 800; margin-bottom: 8px; }
.reading-header h1 { font-size: clamp(1.9rem, 5.1vw, 3.4rem); }
.reading-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--muted); }
.reader-tip, .reader-end { margin-block: 24px 30px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.reader-tip h2, .reader-end h2 { font-size: 1.23rem; margin-bottom: 6px; }
.reader-tip p, .reader-end p { color: var(--muted); }
.reader-end .actions { margin-top: 14px; }
.scene { margin-block: 28px 36px; }
.scene > p { font-size: clamp(1.03rem, 2.1vw, 1.18rem); line-height: 1.95; margin-bottom: 12px; }
.scene figure { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #221d37; }
.scene img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #25203b; }
.scene figcaption { padding: 7px 12px; color: var(--muted); font-size: .875rem; }
.scene figure:has(.art-unavailable) {
    background: repeating-linear-gradient(135deg, #282140 0 24px, #221d37 24px 48px);
}
.scene figure:has(.art-unavailable) figcaption { background: #221d37; }
.art-unavailable { opacity: 0; }

@media (max-width: 1050px) {
    .topbar { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 12px; }
    .menu { width: 100%; justify-content: space-between; }
    .hero { min-height: 360px; }
    .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .shelf .card { grid-template-columns: 1fr; }
    .shelf .cover { min-height: 0; aspect-ratio: 4 / 5; }
}

@media (max-width: 790px) {
    .wrap { width: calc(100% - 36px); }
    .hero { grid-template-columns: 1fr 0.8fr; }
    .hero-copy { padding: 23px; }
    .hero-art { min-height: 270px; }
    .hero-art .cover { top: 25%; }
    .hero-art .cover-popular { top: 21%; }
    .hero-art .cover-name { font-size: 1.05rem; }
    .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pick .card:first-child { grid-column: 1 / -1; }
    .feature .card { display: block; }
    .feature .cover { min-height: 0; aspect-ratio: 5 / 3; }
}

@media (max-width: 600px) {
    .wrap { width: calc(100% - 28px); }
    .menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .menu a { padding: 4px 1px; gap: 3px; font-size: .8125rem; }
    .menu .icon { width: 13px; height: 14px; }
    .hero { grid-template-columns: 1fr; margin-top: 20px; border-radius: 17px; }
    .hero-copy { padding: 20px 17px 10px; }
    .hero h1 { font-size: clamp(2.65rem, 11vw, 3.5rem); }
    .hero-copy > p { margin-block: 12px 14px; }
    .stats { margin-top: 14px; }
    .stats > div { padding-inline: 8px; }
    .hero-art { min-height: 0; aspect-ratio: 1.66; }
    .hero-art .cover { width: 31%; top: 12%; }
    .hero-art .cover-latest { left: 12%; }
    .hero-art .cover-popular { top: 8%; left: 35%; }
    .hero-art .cover-manhwa { left: 58%; }
    .hero-mark { width: 105px; height: 105px; }
    .home-sections, .inner-sections { margin-top: 35px; }
    .timeline li { grid-template-columns: minmax(0, 1fr) auto; gap: 0 9px; padding: 8px 11px; }
    .timeline li time { grid-column: 1 / -1; }
    .row-work { display: block; margin: 0; font-size: .875rem; }
    .timeline .row-go { align-self: end; }
    .podium { grid-template-columns: 1fr; }
    .podium li { display: grid; grid-template-columns: .39fr .61fr; }
    .podium .cover { aspect-ratio: auto; }
    .rank-copy { padding-left: 49px; }
    .rank-number { left: 7px; min-width: 34px; }
    .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .mosaic { gap: 8px; grid-template-columns: 1fr 1fr; }
    .mosaic > :first-child { grid-column: 1 / -1; grid-row: auto; }
    .mosaic > :not(:first-child) { display: block; }
    .mosaic > :not(:first-child) .cover { aspect-ratio: 5 / 4; }
    .shelf { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spotlight { grid-template-columns: 1fr; }
    .spotlight .cover { min-height: 0; aspect-ratio: 16 / 9; }
    .subscription { grid-template-columns: 1fr; }
    .rss-mark { width: 64px; height: 64px; }
    .archives li { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
    .pick, .trials { grid-template-columns: 1fr; }
    .card-copy { padding: 11px; }
    .foot { gap: 12px; }
}

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