/* 禁漫天堂：暗夜数字书库。布局以小间距、连续文字与封面节奏为主。 */
:root {
  color-scheme: dark;
  --bg: #1B1724;
  --ink: #15121D;
  --surface: #282231;
  --surface-2: #31293d;
  --primary: #9365DC;
  --primary-light: #C3A5E8;
  --text: #F2EDF5;
  --muted: #B5AABB;
  --warm: #F3A16F;
  --stroke: rgba(195,165,232,.19);
  --stroke-strong: rgba(195,165,232,.36);
  --container: 1250px;
  --radius: 5px;
  --font: -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 105px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.72; -webkit-font-smoothing: antialiased; }
::selection { background: var(--primary); color: white; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-light); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.26; letter-spacing: -.025em; }
h1 { font-weight: 760; }
h2 { font-weight: 740; }
h3 { font-weight: 680; }
p { text-wrap: pretty; }
.shell { width: min(calc(100% - 64px), var(--container)); margin-inline: auto; }
.skip { position: fixed; z-index: 99; top: -120px; left: 12px; background: var(--warm); color: var(--ink); padding: 10px 16px; }
.skip:focus { top: 12px; }
.site-header { z-index: 40; position: relative; background: rgba(21,18,29,.95); border-bottom: 1px solid var(--stroke); }
.header-row { min-height: 84px; display: grid; grid-template-columns: minmax(225px,1fr) auto minmax(150px,1fr); align-items: center; gap: 22px; }
.identity { display: inline-flex; align-items: center; gap: 12px; justify-self: start; min-width: 0; }
.identity img { width: 44px; height: 44px; object-fit: contain; border-radius: var(--radius); }
.identity span { display: grid; min-width: 0; }
.identity strong { font-size: 21px; letter-spacing: .04em; line-height: 1.2; }
.identity small { font-size: 11px; letter-spacing: .02em; color: var(--muted); margin-top: 3px; }
.primary-nav { display: flex; gap: 30px; align-items: center; justify-content: center; }
.primary-nav a { padding: 29px 0 28px; font-size: 14px; font-weight: 620; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.primary-nav a:hover { color: var(--text); }
.primary-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }
.header-action { justify-self: end; display: inline-flex; align-items: center; gap: 17px; font-size: 13px; font-weight: 680; border: 1px solid var(--stroke-strong); padding: 9px 15px; border-radius: 2px; transition: border-color .2s ease, background .2s ease; }
.header-action:hover { color: white; border-color: var(--primary); background: rgba(147,101,220,.12); }
.header-action span { color: var(--primary-light); }
.intro { padding-top: 36px; padding-bottom: 57px; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr); gap: clamp(25px,5vw,75px); min-height: 490px; align-items: center; }
.intro__copy { padding-block: 15px; }
.intro__eyebrow, .eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .12em; color: var(--primary-light); margin: 0 0 18px; }
.intro__eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.pulse { display: inline-block; width: 8px; height: 8px; background: var(--warm); border-radius: 1px; box-shadow: 0 0 0 4px rgba(243,161,111,.11); }
.intro h1 { font-size: clamp(38px, 4.35vw, 65px); letter-spacing: -.055em; line-height: 1.16; margin-bottom: 23px; }
.intro h1 span { color: var(--warm); }
.lead { font-size: 15px; color: var(--muted); line-height: 1.9; max-width: 540px; }
.lead strong { color: var(--primary-light); font-weight: 740; }
.intro__actions { margin-top: 29px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.button { border: 1px solid var(--primary); background: var(--primary); display: inline-flex; align-items: center; justify-content: center; padding: 12px 21px; min-height: 45px; font-size: 14px; font-weight: 740; border-radius: 2px; color: #fff; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.button:hover { color: #fff; background: #784ac6; border-color: #784ac6; transform: translateY(-1px); }
.button--outline { border-color: var(--stroke-strong); background: transparent; }
.button--outline:hover { background: rgba(147,101,220,.12); border-color: var(--primary); }
.quiet-link, .more { color: var(--primary-light); font-size: 13px; font-weight: 720; }
.quiet-link:hover, .more:hover { color: #fff; }
.intro__facts { margin-top: 32px; display: flex; gap: 9px 18px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.intro__facts span { padding-left: 12px; border-left: 2px solid var(--primary); }
.intro__art { display: grid; grid-template-columns: 1.13fr 1fr; grid-template-rows: 180px 180px; align-content: stretch; gap: 10px; max-height: 390px; }
.intro-tile { position: relative; background: var(--surface); min-height: 0; display: block; overflow: hidden; border: 1px solid var(--stroke); }
.intro-tile--big { grid-row: span 2; }
.intro-tile img { width: 100%; height: 100%; object-fit: cover; background: linear-gradient(140deg,#332748,#57416e); transition: transform .35s ease; }
.intro-tile:hover img { transform: scale(1.04); }
.intro-tile::after { content: ''; pointer-events: none; position: absolute; inset: 36% 0 0; background: linear-gradient(transparent,rgba(14,10,20,.88)); }
.intro-tile span { z-index: 1; position: absolute; bottom: 15px; left: 15px; right: 10px; font-size: 17px; line-height: 1.35; font-weight: 740; color: white; }
.intro-tile span small { display: block; font-size: 11px; font-weight: 500; color: #dfcfea; margin-top: 3px; }
.intro-tile:not(.intro-tile--big) span { font-size: 14px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; border-top: 1px solid var(--stroke); padding: 25px 0 22px; }
.section-heading .eyebrow { margin: 0 0 7px; }
.section-heading h2 { margin: 0; font-size: clamp(23px,2.3vw,31px); }
.section-heading p:not(.eyebrow) { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.section-heading .more { padding-bottom: 6px; white-space: nowrap; }
.collection { margin-top: 0; }
.card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 29px 16px; }
.work-card { min-width: 0; display: flex; flex-direction: column; }
.cover { display: block; position: relative; width: 100%; aspect-ratio: 280/350; background: linear-gradient(140deg,#392d49,#241d31); overflow: hidden; border: 1px solid var(--stroke); border-radius: 2px; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease, filter .28s ease; }
.cover:hover img { transform: scale(1.035); filter: brightness(1.08); }
.cover-number { position: absolute; left: 0; top: 0; font: 700 11px/1 var(--font); color: white; background: rgba(21,18,29,.83); padding: 9px 11px; }
.work-card__body { display: flex; flex: 1; flex-direction: column; padding: 13px 2px 0; }
.work-card__tags { color: var(--primary-light); display: flex; gap: 8px; font-size: 11px; flex-wrap: wrap; }
.work-card__tags span + span::before { content:'·'; margin-right: 8px; color: var(--muted); }
.work-card h3 { margin: 7px 0 3px; font-size: 17px; }
.work-card h3 a:hover { color: var(--primary-light); }
.work-card__author { color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.work-card__summary { color: #cfc5d3; font-size: 12.5px; line-height: 1.8; margin-bottom: 10px; flex: 1; }
.text-link { font-size: 12px; font-weight: 730; color: var(--primary-light); }
.text-link:hover { color: white; }
.editorial { padding-top: 54px; }
.feature-lines { border-top: 1px solid var(--stroke); }
.feature-lines article { display: grid; grid-template-columns: 66px minmax(0,1fr) 100px; gap: 12px; padding: 24px 10px 25px 0; border-bottom: 1px solid var(--stroke); align-items: start; }
.feature-lines__index { font-size: 26px; line-height: 1; font-weight: 760; color: var(--primary); }
.feature-lines article h3 { font-size: 20px; margin-bottom: 8px; }
.feature-lines article p { max-width: 850px; color: var(--muted); margin-bottom: 8px; }
.feature-lines__label { text-align: right; color: var(--warm); font-size: 12px; }
.pair { padding-top: 53px; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.pair-panel { border: 1px solid var(--stroke); background: linear-gradient(130deg,rgba(147,101,220,.14),var(--surface) 66%); padding: 30px 31px; min-height: 260px; }
.pair-panel--warm { background: linear-gradient(135deg,rgba(243,161,111,.13),var(--surface) 66%); }
.panel-mark { color: var(--primary-light); font-size: 12px; font-weight: 760; }
.pair-panel--warm .panel-mark { color: var(--warm); }
.pair-panel h3 { font-size: 22px; margin: 10px 0; }
.pair-panel p { font-size: 13.5px; color: #d0c5d6; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.pill-row a { font-size: 12px; padding: 5px 11px; border: 1px solid var(--stroke-strong); border-radius: 2px; }
.pill-row a:hover { border-color: var(--primary-light); }
.browser { display: grid; grid-template-columns: .34fr 1fr; gap: 25px; margin-top: 63px; padding-top: 36px; padding-bottom: 36px; border-top: 1px solid var(--stroke-strong); border-bottom: 1px solid var(--stroke-strong); }
.browser__number { color: var(--primary); font-size: clamp(38px,5vw,74px); font-weight: 790; letter-spacing: -.06em; line-height: 1; }
.browser__number span { color: var(--muted); font-size: 12px; font-weight: 550; letter-spacing: 0; }
.browser h2 { font-size: clamp(24px,2.8vw,36px); margin-bottom: 15px; }
.browser p { font-size: 14px; color: var(--muted); max-width: 780px; }
.browser .button { margin-top: 10px; }
.last-list { padding-top: 54px; padding-bottom: 82px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.mini-work { display: grid; grid-template-columns: 76px minmax(0,1fr) 20px; gap: 15px; padding: 13px 5px; border-bottom: 1px solid var(--stroke); align-items: center; min-width: 0; }
.mini-work img { width: 76px; height: 100px; object-fit: cover; background: var(--surface); }
.mini-work span { display: grid; gap: 4px; min-width: 0; }
.mini-work strong { font-size: 16px; }
.mini-work small { color: var(--primary-light); font-size: 11px; }
.mini-work em { color: var(--muted); font-size: 12px; line-height: 1.6; font-style: normal; }
.mini-work b { font-size: 14px; color: var(--primary-light); align-self: start; }
.site-footer { background: var(--ink); border-top: 1px solid var(--stroke); }
.footer-grid { display: flex; justify-content: space-between; gap: 60px; padding-top: 38px; padding-bottom: 26px; }
.footer-brand { font-size: 21px; font-weight: 780; }
.footer-brand span { font-size: 12px; font-weight: 500; color: var(--primary-light); }
.footer-grid p { max-width: 610px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.footer-links { display: flex; gap: 21px; font-size: 13px; white-space: nowrap; }
.footer-links a { color: var(--primary-light); }
.copyright { padding-block: 14px 22px; border-top: 1px solid var(--stroke); color: #93879c; font-size: 11px; }
.breadcrumbs { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 25px; margin-bottom: 29px; }
.breadcrumbs a:hover { color: var(--text); }
.catalog-page { padding-bottom: 87px; }
.catalog-head { max-width: 850px; padding-bottom: 19px; }
.catalog-head h1 { font-size: clamp(33px,4vw,49px); margin-bottom: 16px; }
.catalog-head p:not(.eyebrow) { font-size: 14px; color: var(--muted); }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 17px 0; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.filter-tabs a { border: 1px solid var(--stroke); padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.filter-tabs a:hover { background: var(--surface); border-color: var(--primary); }
.filter-tabs a[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: white; }
.catalog-count { font-size: 12px; padding: 22px 0 17px; color: var(--muted); }
.catalog-count strong { font-size: 16px; color: var(--warm); }
.catalog-count span { margin-left: 5px; }
.catalog-grid { row-gap: 36px; }
.catalog-notes { border-top: 1px solid var(--stroke); margin-top: 50px; padding-top: 25px; }
.catalog-notes h2 { font-size: 23px; }
.notes-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; }
.notes-grid p { font-size: 13px; color: var(--muted); }
.notes-grid strong { display: block; margin-bottom: 8px; color: var(--text); }
.detail-page { padding-bottom: 80px; }
.work-hero { display: grid; grid-template-columns: minmax(0,330px) minmax(0,1fr); gap: clamp(25px,4vw,65px); padding: 10px 0 43px; border-bottom: 1px solid var(--stroke-strong); }
.work-hero__cover { background: var(--surface); align-self: start; border: 1px solid var(--stroke); }
.work-hero__cover img { width: 100%; aspect-ratio: 420/520; object-fit: cover; }
.work-hero__copy { padding-top: 14px; }
.work-hero h1 { font-size: clamp(36px,4vw,56px); margin-bottom: 20px; }
.hero-tags { display: flex; gap: 9px; margin-bottom: 21px; }
.hero-tags span { color: var(--primary-light); padding: 5px 10px; border: 1px solid var(--stroke-strong); font-size: 12px; }
.hero-tags span:last-child { color: var(--warm); }
.hero-summary { font-size: 16px; color: #ded5e2; line-height: 1.95; max-width: 780px; }
.work-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); padding: 13px 0; margin: 25px 0; }
.work-facts div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--stroke); padding: 9px 0; }
.work-facts div:nth-last-child(-n+2) { border-bottom: none; }
.work-facts dt { color: var(--muted); font-size: 12px; }
.work-facts dd { margin: 0; font-size: 13px; text-align: right; }
.article-body { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: clamp(28px,5vw,72px); padding-top: 43px; align-items: start; }
.article-body__main section { margin-bottom: 37px; }
.article-body__main .eyebrow { margin-bottom: 8px; }
.article-body__main h2 { font-size: clamp(22px,2.3vw,29px); margin-bottom: 14px; }
.article-body__main p { font-size: 15px; line-height: 2.05; color: #d2c9d7; }
.article-body__main .content-note { border: 1px solid var(--stroke); background: rgba(147,101,220,.08); padding: 23px 25px; }
.article-body__main .content-note h2 { font-size: 20px; }
.article-body__main .content-note p { margin-bottom: 0; font-size: 13px; }
.aside-box { border-top: 2px solid var(--primary); background: var(--surface); padding: 21px 21px 14px; }
.aside-box h2 { font-size: 18px; margin: 0 0 11px; }
.aside-box .eyebrow { margin-bottom: 6px; }
.aside-item { display: flex; gap: 11px; padding: 13px 0; align-items: center; border-bottom: 1px solid var(--stroke); }
.aside-item:last-child { border: 0; }
.aside-item img { height: 75px; width: 57px; object-fit: cover; background: #413651; }
.aside-item span { display: grid; gap: 3px; }
.aside-item strong { font-size: 13px; line-height: 1.4; }
.aside-item small { font-size: 11px; color: var(--muted); }
.missing { min-height: 59vh; padding-top: 80px; }
.missing h1 { font-size: clamp(30px,4vw,48px); }
.missing p:not(.eyebrow) { color: var(--muted); }
.missing .button { margin-top: 15px; }
/* 1200px 以下的紧凑桌面排列 */
@media (max-width: 1100px) {
  .shell { width: min(calc(100% - 48px),var(--container)); }
  .intro { grid-template-columns: minmax(310px,.98fr) minmax(0,1fr); gap: 24px; }
  .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 27px 13px; }
  .work-card h3 { font-size: 15px; }
  .work-card__summary { font-size: 12px; }
  .article-body { grid-template-columns: minmax(0,1fr) 280px; gap: 28px; }
}
/* 横向平板：缩小封面列数，保存正文宽度。 */
@media (max-width: 850px) {
  .header-row { grid-template-columns: 1fr auto; min-height: 72px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; gap: 25px; justify-content: start; border-top: 1px solid var(--stroke); overflow-x: auto; }
  .primary-nav a { padding: 10px 0 11px; }
  .header-action { grid-column: 2; grid-row: 1; }
  .intro { grid-template-columns: 1fr; padding-top: 33px; gap: 30px; }
  .intro h1 { max-width: 650px; }
  .intro__art { max-width: 660px; width: 100%; grid-template-rows: 170px 170px; }
  .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mini-grid { grid-template-columns: 1fr; }
  .article-body { grid-template-columns: 1fr; }
  .article-body__aside { max-width: none; }
  .aside-box { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 22px; }
  .aside-box > .eyebrow, .aside-box > h2 { grid-column: 1/-1; }
  .work-hero { grid-template-columns: 250px minmax(0,1fr); gap: 26px; }
  .hero-summary { font-size: 14px; }
  .work-facts { grid-template-columns: 1fr; }
  .work-facts div:nth-last-child(2) { border-bottom: 1px solid var(--stroke); }
}
/* 手机版强调两列作品与可触及的连续导航。 */
@media (max-width: 600px) {
  .shell { width: min(calc(100% - 30px),var(--container)); }
  .header-row { gap: 0 8px; }
  .identity { gap: 8px; }
  .identity img { width: 37px; height: 37px; }
  .identity strong { font-size: 17px; }
  .identity small { font-size: 9px; }
  .header-action { font-size: 11px; padding: 7px 9px; gap: 5px; }
  .primary-nav { gap: 25px; }
  .primary-nav a { font-size: 13px; }
  .intro { padding-top: 28px; padding-bottom: 35px; }
  .intro h1 { font-size: clamp(34px,9vw,49px); }
  .lead { font-size: 13px; }
  .intro__facts { margin-top: 20px; }
  .intro__art { grid-template-rows: 150px 150px; }
  .intro-tile span { bottom: 10px; left: 10px; font-size: 14px; }
  .intro-tile:not(.intro-tile--big) span { font-size: 12px; }
  .section-heading { padding: 19px 0; align-items: start; }
  .section-heading h2 { font-size: 23px; }
  .section-heading .more { font-size: 11px; margin-top: 9px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 11px; }
  .cover { aspect-ratio: 280 / 360; }
  .work-card h3 { font-size: 15px; }
  .work-card__summary { font-size: 11.5px; line-height: 1.72; }
  .work-card__author { font-size: 10px; }
  .work-card__tags { font-size: 10px; }
  .editorial, .pair, .last-list { padding-top: 35px; }
  .feature-lines article { grid-template-columns: 36px minmax(0,1fr); gap: 9px; padding: 20px 0; }
  .feature-lines__index { font-size: 20px; }
  .feature-lines article h3 { font-size: 18px; }
  .feature-lines article p { font-size: 13px; }
  .feature-lines__label { display: none; }
  .pair-grid { grid-template-columns: 1fr; }
  .pair-panel { padding: 23px; min-height: 0; }
  .pair-panel h3 { font-size: 20px; }
  .browser { grid-template-columns: 1fr; gap: 15px; margin-top: 44px; }
  .browser__number { font-size: 42px; }
  .browser h2 { font-size: 24px; }
  .mini-work { grid-template-columns: 63px 1fr 16px; gap: 11px; }
  .mini-work img { width: 63px; height: 84px; }
  .mini-work strong { font-size: 14px; }
  .mini-work em { font-size: 11px; }
  .footer-grid { display: block; padding-top: 28px; }
  .footer-links { margin-top: 22px; flex-wrap: wrap; }
  .catalog-head h1 { font-size: 36px; }
  .catalog-count span { display: block; margin-left: 0; }
  .notes-grid { grid-template-columns: 1fr; gap: 7px; }
  .work-hero { grid-template-columns: 1fr; padding-bottom: 26px; gap: 23px; }
  .work-hero__cover { max-width: 300px; width: 70%; }
  .work-hero__copy { padding-top: 0; }
  .work-hero h1 { font-size: 37px; }
  .article-body { padding-top: 30px; }
  .aside-box { grid-template-columns: 1fr; }
  .breadcrumbs { margin: 18px 0 22px; }
}
/* 窄屏与大字体的内容安全边界 */
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .identity small { display: none; }
  .header-action { padding: 7px; }
  .intro__actions { gap: 14px; }
  .intro__art { grid-template-rows: 120px 120px; }
  .card-grid { gap: 20px 9px; }
  .work-card__summary { font-size: 11px; }
  .section-heading { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --text: #111; --muted: #444; --stroke: #ddd; }
  body { background: white; color: #111; }
  .site-header, .site-footer, .intro__actions, .filter-tabs { display: none; }
  .shell { width: 100%; }
  .card-grid { grid-template-columns: repeat(3,1fr); }
  .cover img, .work-hero__cover img { max-height: 250px; object-fit: contain; }
  a { color: #111; }
}
