/* Phantom 作品站 — 样式。颜色只在下面两组变量里定义：深色（默认）和浅色。 */
:root,
:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --bg-2: #141417;
  --bg-3: #1c1c21;
  --ink: #edeae4;
  --ink-2: #b9b5ad;
  --muted: #85817a;
  --rule: #2a2a30;
  --rule-2: #3a3a42;
  --scrim: rgba(8, 8, 10, .78);
  --invert-bg: #edeae4;
  --invert-ink: #0c0c0e;
  --accent: #e8643a;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f2f0eb;
  --bg-2: #e9e6df;
  --bg-3: #dfdbd2;
  --ink: #141414;
  --ink-2: #3c3a36;
  --muted: #6e6a63;
  --rule: #d6d1c7;
  --rule-2: #bfb9ad;
  --scrim: rgba(10, 10, 12, .62);
  --invert-bg: #141414;
  --invert-ink: #f2f0eb;
  --accent: #b8321c;
  color-scheme: light;
}
:root {
  --sans: "Inter Tight", "Noto Sans SC", "Noto Sans JP", "Hiragino Sans", "Microsoft YaHei", system-ui, sans-serif;
  --mincho: "Shippori Mincho B1", "Noto Serif JP", "Yu Mincho", "Songti SC", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: 16px;
  --head-h: 52px;
  --col-gap: 14px;
  --s: #b9b3a8;
}
@media (min-width: 900px) {
  :root { --gutter: 40px; --head-h: 64px; --col-gap: 24px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mono { font-family: var(--mono); font-size: .86em; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 60; background: var(--invert-bg); color: var(--invert-ink); padding: 6px 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--s); flex: none; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; }

/* ---------- 头部 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: background-color .3s, border-color .3s, color .3s;
}
/* 有大图的页面：头部浮在图上，滚动后才出现底色 */
.has-overlay .site-head { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: #f3f1ec; backdrop-filter: none; }
.has-overlay .site-head::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none; z-index: -1; transition: opacity .3s; }
.has-overlay .site-head.is-solid { background: color-mix(in srgb, var(--bg) 90%, transparent); border-color: var(--rule); color: var(--ink); backdrop-filter: blur(10px); }
.has-overlay .site-head.is-solid::before { opacity: 0; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; letter-spacing: .3em; }
.wm-mark { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.wm-mark::after { content: ""; position: absolute; inset: 2px 2px 2px 50%; background: currentColor; border-radius: 0 10px 10px 0; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.site-nav a { white-space: nowrap; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav .ext span { font-size: 11px; margin-left: 2px; }
.theme-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 50%; opacity: .8; }
.theme-btn:hover { opacity: 1; }
:root[data-theme="light"] .theme-btn svg { transform: rotate(180deg); }
@media (max-width: 560px) {
  .site-nav { gap: 12px; font-size: 13px; }
  .site-nav .ext:last-of-type { display: none; }
}

main { padding: 0 var(--gutter); }
.has-overlay main { padding-top: 0; }

/* ---------- 图片与占位 ---------- */
.ph { position: relative; width: 100%; background: var(--bg-2); color: var(--muted); overflow: hidden; }
.ph-tag { position: absolute; top: 10px; left: 10px; font: 11px/1.3 var(--mono); }
.ph-label { position: absolute; left: 10px; bottom: 10px; font-size: 12px; }

/* ---------- 首页：全屏轮播 ---------- */
.stage { position: relative; margin: 0 calc(var(--gutter) * -1); height: 100svh; min-height: 520px; overflow: hidden; background: #000; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 0s 1.1s; }
.slide.is-on { opacity: 1; visibility: visible; transition: opacity 1.1s ease; }
.slide-media, .slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide-media img { object-fit: cover; transform: scale(1.04); transition: transform 7s ease-out; }
.slide.is-on .slide-media img { transform: scale(1); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 38%, transparent 60%), linear-gradient(to right, rgba(0,0,0,.35), transparent 55%); pointer-events: none; }
.slide-cap { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 72px; color: #f3f1ec; max-width: 640px; }
.slide-cap .kicker { color: rgba(243,241,236,.8); }
.slide-name { font-family: var(--mincho); font-weight: 700; font-size: clamp(34px, 6vw, 76px); line-height: 1.08; letter-spacing: .02em; margin-top: 14px; }
.slide-roma { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; opacity: .8; margin-top: 8px; }
.slide-link { display: inline-flex; gap: 12px; margin-top: 22px; padding: 10px 0; border-top: 1px solid rgba(243,241,236,.5); min-width: 220px; justify-content: space-between; }
.stage-dots { position: absolute; z-index: 3; right: var(--gutter); bottom: 32px; display: flex; gap: 8px; }
.stage-dots button { width: 44px; height: 24px; display: grid; align-items: center; }
.stage-dots span { display: block; height: 2px; background: rgba(255,255,255,.35); overflow: hidden; position: relative; }
.stage-dots [aria-selected="true"] span::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: dotfill var(--dur, 6s) linear forwards; }
.stage.is-paused .stage-dots [aria-selected="true"] span::after { animation-play-state: paused; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 900px) { .slide-cap { bottom: 96px; } .stage-dots { bottom: 48px; } }

/* 介绍与数字 */
.intro { display: grid; gap: 28px; padding: 64px 0 0; }
.intro-text { font-size: 18px; line-height: 1.7; color: var(--ink); max-width: 36em; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.stats div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { font-size: 28px; line-height: 1.2; color: var(--ink); }
@media (min-width: 900px) {
  .intro { grid-template-columns: 7fr 5fr; align-items: end; padding-top: 120px; column-gap: 64px; }
  .intro-text { font-size: 22px; grid-row: 1 / 3; align-self: start; }
  .intro .arrow-link { justify-self: start; }
}

.arrow-link { display: inline-flex; gap: 10px; align-items: baseline; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 3px; width: fit-content; }
.arrow-link:hover { text-decoration: none; color: var(--accent); }
.arrow-link.small { font-size: 13px; font-weight: 400; }

.block { padding-top: 88px; }
@media (min-width: 900px) { .block { padding-top: 140px; } }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--ink); padding-top: 12px; margin-bottom: 28px; }
.block-head h2 { font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.block-head .mono { font-size: 12px; text-transform: uppercase; }

/* 成片：图文交错 */
.features { display: grid; gap: 64px; }
.feature { display: grid; gap: 20px; }
.feature-media { display: block; overflow: hidden; background: var(--bg-2); }
.feature-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s ease; }
.feature-media:hover img { transform: scale(1.02); }
.feature-name { font-family: var(--mincho); font-weight: 700; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.15; margin-top: 12px; }
.feature-roma { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.feature-sum { margin: 18px 0 22px; color: var(--ink-2); max-width: 30em; }
.feature .arrow-link { margin-top: 18px; }
.feature-thumbs { display: flex; gap: 8px; margin-top: 28px; }
.feature-thumbs img { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; }
@media (min-width: 900px) {
  .features { gap: 120px; }
  .feature { grid-template-columns: 8fr 4fr; gap: 48px; align-items: end; }
  .feature.flip { grid-template-columns: 4fr 8fr; }
  .feature.flip .feature-media { order: 2; }
  .feature-text { border-left: 2px solid var(--s); padding-left: 24px; }
  .feature-thumbs img { width: 88px; }
}

/* 最近发布：索引行 */
.rows { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 14px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
  transition: background-color .2s, padding .2s;
}
.row:hover { text-decoration: none; background: var(--bg-2); padding-left: 10px; padding-right: 10px; }
.row-no { color: var(--muted); }
.row-name { display: flex; flex-direction: column; min-width: 0; }
.row-ja { font-family: var(--mincho); font-weight: 700; font-size: 19px; line-height: 1.3; }
.row-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-series { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.row-type, .row-ver { display: none; }
.row-date { grid-column: 3; grid-row: 2; justify-self: end; color: var(--muted); font-size: 11px; }
@media (min-width: 900px) {
  .row { grid-template-columns: 56px minmax(0, 5fr) 2fr 1fr 1fr 1.2fr; padding: 16px 0; align-items: center; }
  .row-ja { font-size: 22px; }
  .row-type, .row-ver { display: block; font-size: 13px; color: var(--ink-2); }
  .row-date { grid-column: auto; grid-row: auto; font-size: 12px; }
}

/* 按系列 */
.series-list > li { border-top: 1px solid var(--rule); padding: 20px 0 24px; }
.series-list > li:last-child { border-bottom: 1px solid var(--rule); }
.series-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: baseline; }
.series-head:hover { text-decoration: none; }
.series-head:hover .series-name { text-decoration: underline; text-underline-offset: 5px; }
.series-name { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.series-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--s); }
.series-ja { grid-column: 1; font-size: 12px; color: var(--muted); padding-left: 22px; }
.series-n { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--ink-2); }
.series-chars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-left: 22px; }
.series-chars a { font-family: var(--mincho); font-weight: 500; font-size: 14px; padding: 4px 10px; border: 1px solid var(--rule-2); }
.series-chars a:hover { text-decoration: none; border-color: var(--s); color: var(--s); }
@media (min-width: 900px) {
  .series-list > li { display: grid; grid-template-columns: 4fr 8fr; gap: 32px; padding: 28px 0 32px; }
  .series-head { align-self: start; }
  .series-name { font-size: 28px; }
  .series-chars { margin-top: 0; padding-left: 0; }
}

/* ---------- 卡片 ---------- */
.tile { display: block; position: relative; }
.tile:hover { text-decoration: none; }
.tile-media { position: relative; overflow: hidden; background: var(--bg-2); }
.tile-media img, .tile-media .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s ease; }
.tile:hover .tile-media img { transform: scale(1.03); }
.tile-no { position: absolute; top: 10px; left: 10px; font-size: 11px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.tile-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--s); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.tile:hover .tile-media::after { transform: scaleX(1); }
.tile-text { padding-top: 12px; }
.tile-title { font-size: 15px; font-weight: 500; line-height: 1.4; }
.tile:hover .tile-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tile-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.chip { display: inline-block; margin-top: 8px; margin-right: 6px; font: 11px/1.4 var(--mono); padding: 1px 6px; border: 1px solid var(--rule-2); color: var(--ink-2); }
.chip-member { color: var(--accent); border-color: currentColor; }

/* 无图作品：索引卡 */
.card-face {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  display: flex; flex-direction: column; padding: 14px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--s) 22%, transparent), transparent 60%),
    var(--bg-2);
  border-top: 3px solid var(--s);
  transition: background-color .3s;
}
.tile-card:hover .card-face { background-color: var(--bg-3); }
.card-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.card-name { margin-top: auto; font-family: var(--mincho); font-weight: 700; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; writing-mode: horizontal-tb; }
.card-roma { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; min-height: 1.4em; }
.card-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule-2); font-size: 11px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px var(--col-gap); }
.grid-5 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 48px var(--col-gap); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1400px) { .results .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 899px) { .grid-5 > :first-child { grid-column: 1 / -1; } .grid-5 > :first-child .tile-media img { aspect-ratio: 4 / 4.2; } }

/* ---------- 作品库 ---------- */
.catalog { padding-top: 32px; }
.cat-head { display: grid; gap: 16px; }
.cat-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.cat-head h1 .mono { font-size: 14px; font-weight: 400; vertical-align: super; }
.search input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 10px 0; outline: none;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-bottom-color: var(--accent); }
@media (min-width: 900px) {
  .catalog { padding-top: 64px; }
  .cat-head { grid-template-columns: 1fr minmax(320px, 440px); align-items: end; }
  .cat-head h1 { font-size: 40px; }
}

.path { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 28px; padding: 12px 0; border-top: 1px solid var(--ink); font-size: 14px; }
.path button { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
.path button:hover { text-decoration-color: currentColor; }
.path [aria-current] { font-weight: 600; text-decoration: none; cursor: default; }
.path .sep { color: var(--muted); }

.char-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: thin; border-bottom: 1px solid var(--rule); }
.char-strip[hidden] { display: none; }
.char-btn { flex: none; text-align: left; padding: 10px 14px; border: 1px solid var(--rule-2); min-width: 120px; transition: border-color .2s; }
.char-btn:hover { border-color: var(--ink-2); }
.char-btn .nm { font-family: var(--mincho); font-weight: 700; font-size: 15px; }
.char-btn .ja { display: block; font-size: 11px; color: var(--muted); }
.char-btn .n { font: 11px var(--mono); color: var(--muted); margin-left: 6px; }
.char-btn[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); }
.char-btn[aria-pressed="true"] .ja, .char-btn[aria-pressed="true"] .n { color: inherit; opacity: .7; }

.cat-body { margin-top: 20px; }
.cat-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.filter-toggle { font-size: 14px; border: 1px solid var(--ink); padding: 6px 14px; }
.filter-toggle .mono { margin-left: 6px; }
.view-switch { display: inline-flex; border: 1px solid var(--rule-2); margin-left: auto; }
.view-switch button { font-size: 12px; padding: 5px 12px; color: var(--muted); }
.view-switch [aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); }
.filters fieldset { padding: 14px 0; border-top: 1px solid var(--rule); }
.filters legend { font-size: 12px; color: var(--muted); padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.opts { clear: both; display: flex; flex-wrap: wrap; gap: 6px; }
.opt { font-size: 13px; padding: 4px 10px; border: 1px solid var(--rule-2); line-height: 1.4; display: inline-flex; align-items: center; gap: 6px; }
.opt .n { font: 11px var(--mono); color: var(--muted); }
.opt .dot { width: 6px; height: 6px; }
.opt[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); }
.opt[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.opt:disabled { opacity: .35; cursor: default; }
.link-btn { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.reset { margin-top: 14px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; }
.filters-head p { font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.active-filters:empty { display: none; }
.active-filters button { font-size: 12px; padding: 3px 9px; background: var(--invert-bg); color: var(--invert-ink); }
.empty { padding: 40px 0; color: var(--muted); }
.results.is-list .grid { display: block; border-top: 1px solid var(--rule); }

@media (max-width: 899px) {
  .filters {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); border-top: 1px solid var(--ink);
    padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .28s ease; visibility: hidden;
  }
  .filters.open { transform: none; visibility: visible; box-shadow: 0 -20px 60px rgba(0,0,0,.4); }
  body.sheet-open { overflow: hidden; }
}
@media (min-width: 900px) {
  .cat-body { display: grid; grid-template-columns: 220px 1fr; gap: 48px; margin-top: 28px; }
  .cat-tools { grid-column: 2; margin-bottom: 0; }
  .filter-toggle, .filters-head { display: none; }
  .filters { grid-row: 1 / 3; position: sticky; top: calc(var(--head-h) + 24px); align-self: start; max-height: calc(100vh - var(--head-h) - 48px); overflow-y: auto; }
  .filters fieldset:first-of-type { border-top: 0; padding-top: 0; }
  .results { grid-column: 2; }
}

/* ---------- 详情 ---------- */
.banner { position: relative; margin: 0 calc(var(--gutter) * -1); height: min(92svh, 62vw); min-height: 560px; background: #000; overflow: hidden; }
.banner-media { position: absolute; inset: 0; width: 100%; height: 100%; cursor: zoom-in; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.2) 42%, transparent 62%), linear-gradient(to right, rgba(0,0,0,.35), transparent 50%); pointer-events: none; }
.banner-cap { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 40px; color: #f3f1ec; pointer-events: none; }
.banner-cap a, .banner-cap .crumbs { pointer-events: auto; }
.banner-cap .kicker, .banner-cap .crumbs, .banner-cap .crumbs a { color: rgba(243,241,236,.82); }
@media (max-width: 899px) { .banner { height: 88svh; min-height: 520px; } }

.plain-head { padding-top: 32px; }
@media (min-width: 900px) { .plain-head { padding-top: 64px; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--ink-2); }
.work-name { font-family: var(--mincho); font-weight: 700; font-size: clamp(36px, 6vw, 84px); line-height: 1.06; letter-spacing: .02em; margin-top: 14px; }
.work-roma { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .78; margin-top: 10px; }
.work-title { font-size: 16px; margin-top: 14px; }
.plain-head .work-name::after { content: ""; display: block; width: 48px; height: 3px; background: var(--s); margin-top: 22px; }

.work-grid { display: grid; gap: 40px; padding-top: 32px; }
.dossier { border-top: 2px solid var(--s); padding-top: 18px; }
.work-summary { font-size: 16px; color: var(--ink); max-width: 34em; margin-bottom: 24px; }
.releases { display: grid; border-top: 1px solid var(--ink); }
.release { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 15px 2px; border-bottom: 1px solid var(--ink); transition: background-color .2s, color .2s, padding .2s; }
.release:first-child { background: var(--invert-bg); color: var(--invert-ink); padding-left: 14px; padding-right: 14px; }
.release:hover { text-decoration: none; background: var(--accent); color: #fff; padding-left: 14px; padding-right: 14px; }
.release-label { font-weight: 600; }
.release-meta { font-size: 12px; white-space: nowrap; opacity: .85; }
.facts { margin-top: 28px; }
.facts div { display: grid; grid-template-columns: 5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.facts div:first-child { border-top: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 13px; }
.note { margin-top: 28px; }
.note h2 { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.note p { font-size: 14px; }
.deps li { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.deps a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
.changelog li { display: grid; grid-template-columns: 6.5em 3.5em 1fr; gap: 8px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.tags a { font-size: 12px; border: 1px solid var(--rule-2); padding: 2px 8px; }

.work-gallery { display: grid; gap: 12px; }
.g-row { display: grid; gap: 12px; }
.g-pair { grid-template-columns: 1fr 1fr; }
.shot { position: relative; }
.shot-btn { display: block; width: 100%; cursor: zoom-in; overflow: hidden; background: var(--bg-2); }
.shot-btn img { width: 100%; transition: transform .6s ease; }
.shot-btn:hover img { transform: scale(1.015); }
.g-pair .shot-btn img, .g-pair .ph { aspect-ratio: 4 / 5; object-fit: cover; }
.shot figcaption { font-size: 11px; color: var(--muted); padding-top: 6px; }
.g-solo .g-note { align-self: end; font-size: 12px; color: var(--muted); border-left: 2px solid var(--s); padding-left: 12px; }
.g-section { font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--rule); }
.g-section .mono { color: var(--s); }
.g-empty { aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 24px; background: radial-gradient(100% 80% at 100% 0%, color-mix(in srgb, var(--s) 20%, transparent), transparent 60%), var(--bg-2); border-top: 3px solid var(--s); }
.g-empty .card-name { font-size: clamp(32px, 4vw, 56px); }
@media (max-width: 899px) { .work-gallery { margin: 0 calc(var(--gutter) * -1); } .g-row { gap: 6px; } .work-gallery { gap: 6px; } .g-section, .shot figcaption, .g-note { margin-left: var(--gutter); } .g-empty { margin: 0 var(--gutter); } }
@media (min-width: 900px) {
  .work-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; padding-top: 56px; }
  .dossier { position: sticky; top: calc(var(--head-h) + 24px); }
  .work-gallery, .g-row { gap: 16px; }
}
.related { padding-top: 96px; }

/* ---------- 大图 ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #08080a; color: #eee; }
.lightbox::backdrop { background: #08080a; }
.lb-stage { position: absolute; inset: 52px 0 40px; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-close { position: absolute; top: 14px; right: 18px; font-size: 14px; z-index: 2; }
.lb-count { position: absolute; left: 18px; top: 16px; font-size: 12px; opacity: .7; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 22px; padding: 18px; z-index: 2; }
.lb-prev { left: 4px; } .lb-next { right: 4px; }

/* ---------- 关于 / 页脚 ---------- */
.about { padding: 64px 0; max-width: 760px; }
.about h1 { font-size: 32px; font-weight: 600; }
.about-lead { font-size: 18px; margin: 16px 0 28px; }
.about .small { margin-top: 20px; }

.site-foot { margin-top: 140px; padding: 28px var(--gutter) 48px; border-top: 1px solid var(--rule); font-size: 13px; }
.foot-grid { display: grid; gap: 14px; }
.foot-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .3em; font-size: 12px; }
.foot-note { color: var(--muted); max-width: 36em; }
.foot-links { display: flex; gap: 18px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 3fr 6fr 3fr; } .foot-links { justify-content: flex-end; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .slide-media img { transform: none; }
}

/* v2.1 微调 */
@media (max-width: 899px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.g-empty { aspect-ratio: 16 / 9; }
.g-empty a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) { .g-empty { aspect-ratio: 4 / 3; } }

/* 关于页 */
.about h1 { font-family: var(--mincho); font-size: clamp(40px, 6vw, 72px); font-weight: 700; margin-top: 12px; }
.about .kicker .wm-mark { width: 12px; height: 12px; }
.about-stats { margin: 8px 0 48px; }
.about-sections { display: grid; gap: 28px; }
.about-sections h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.about-sections p { font-size: 15px; color: var(--ink-2); max-width: 38em; }
.about-sections p + p { margin-top: 10px; }
.about-links { margin-top: 56px; border-top: 1px solid var(--ink); }
.about-links a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
.about-links a:hover { text-decoration: none; color: var(--accent); }
@media (min-width: 900px) { .about { padding: 96px 0 0; max-width: 960px; } .about-sections { grid-template-columns: 1fr 1fr; column-gap: 56px; row-gap: 36px; } }
@media (max-width: 560px) { .about-links .mono { display: none; } }

/* v3.1：关于页右栏配图；未发布作品不叠两道线 */
.about-wrap { display: grid; gap: 40px; }
.about-fig { margin: 0; }
.about-fig img, .about-fig .ph { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.about-fig figcaption { font-size: 11px; color: var(--muted); margin-top: 10px; letter-spacing: .04em; }
@media (min-width: 960px) {
  .about-wrap.has-fig { grid-template-columns: minmax(0, 760px) minmax(280px, 1fr); gap: 64px; align-items: start; }
  .about-wrap .about-fig { position: sticky; top: 96px; margin-top: 64px; }
}
@media (max-width: 959px) { .about-fig { max-width: 520px; padding-bottom: 48px; } }
.releases:has(.release-none) { border-top: 0; }
.release-none { padding: 4px 0 0; }

/* v3.2：系列分组（SCSP 的 283 / 765） */
.unit-btn { flex: none; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px; border: 1px solid var(--s, var(--ink-2)); border-left-width: 3px; min-width: 88px; text-align: left; }
.unit-btn .mono { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.unit-btn .n { font: 11px var(--mono); color: var(--muted); }
.unit-btn[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); }
.unit-btn[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.char-strip.has-units .unit-btn:not(:first-child) { margin-left: 12px; }
.series-chars .unit-link { font-family: var(--mono); font-size: 12px; font-weight: 600; border-style: dashed; color: var(--ink-2); }
.char-strip.has-units { flex-direction: column; overflow: visible; gap: 8px; }
.unit-row { display: flex; gap: 8px; min-width: 0; }
.unit-chars { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.char-strip.has-units .unit-btn:not(:first-child) { margin-left: 0; }
.series-chars-wrap .series-chars + .series-chars { margin-top: 8px; }
/* v3.3：长标题（服装英文名）不撑破网格 */
.grid > *, .tile, .work-grid > * { min-width: 0; }
.card-roma { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name { overflow-wrap: anywhere; }
.release { flex-wrap: wrap; }
.release-meta { white-space: normal; }

/* v3.4 首页轮播：方图/竖图在宽屏放右侧，背后铺同图模糊底 */
.slide-bg { display: none; }
@media (min-width: 900px) {
  .slide.is-tall .slide-bg { display: block; position: absolute; inset: -40px; }
  .slide.is-tall .slide-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(36px) saturate(1.1) brightness(.42); }
  .slide.is-tall .slide-media { left: auto; right: 0; width: min(68vw, 100%); aspect-ratio: auto; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%); mask-image: linear-gradient(to right, transparent 0, #000 26%); }
  .slide.is-tall .slide-media img { object-position: 50% 30%; }
}

/* v3.5 BGM 播放器 */
.bgm-btn { position: relative; }
.bgm-btn .bgm-eq { display: none; gap: 2px; align-items: flex-end; height: 12px; }
.bgm-btn .bgm-eq i { display: block; width: 2px; height: 4px; background: currentColor; animation: eq 0.9s ease-in-out infinite alternate; }
.bgm-btn .bgm-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.bgm-btn .bgm-eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.bgm-btn.is-playing .bgm-ico { display: none; }
.bgm-btn.is-playing .bgm-eq { display: inline-flex; }
.bgm-btn.is-playing { color: var(--accent); opacity: 1; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
@media (prefers-reduced-motion: reduce) { .bgm-btn .bgm-eq i { animation: none; height: 8px; } }
.bgm-panel { position: fixed; z-index: 60; right: var(--gutter); width: min(300px, calc(100vw - 2 * var(--gutter))); background: var(--bg-2); color: var(--ink); border: 1px solid var(--rule-2); padding: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.bgm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bgm-h { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.bgm-play { width: 100%; padding: 9px 0; border: 1px solid var(--ink); font-size: 13px; letter-spacing: .06em; }
.bgm-play[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); }
.bgm-list { list-style: none; margin: 10px 0 0; padding: 0; }
.bgm-list button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 7px 4px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); }
.bgm-list button[aria-pressed="true"] { color: var(--ink); }
.bgm-list button[aria-pressed="true"] .mono { color: var(--accent); }
.bgm-t small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bgm-mode { display: flex; margin-top: 10px; border: 1px solid var(--rule-2); }
.bgm-mode button { flex: 1; padding: 6px 0; font-size: 12px; color: var(--muted); }
.bgm-mode button[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); }
.bgm-mode button:disabled { opacity: .4; cursor: not-allowed; }
.bgm-vol { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.bgm-vol input { flex: 1; accent-color: var(--accent); }
.bgm-foot { margin-top: 10px; font-size: 11px; color: var(--muted); }

/* 轻提示、随便看看、复制链接 */
.toast { position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--invert-bg); color: var(--invert-ink); padding: 8px 16px; font-size: 13px; transition: opacity .25s, transform .25s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.dice-btn { font-size: 12px; margin-left: auto; }
.dice-btn::before { content: "⚄ "; }
.cat-tools .dice-btn + .view-switch { margin-left: 12px; }
.share-row { margin: 10px 0 0; font-size: 12px; }

/* 彩蛋：8bit 模式 */
:root[data-pixel="on"] body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.14) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
:root[data-pixel="on"] h1, :root[data-pixel="on"] .slide-name, :root[data-pixel="on"] .card-name, :root[data-pixel="on"] .work-name, :root[data-pixel="on"] .feature-name { font-family: "DotGothic16", var(--mono); letter-spacing: .04em; }
:root[data-pixel="on"] * { border-radius: 0 !important; }
:root[data-pixel="on"] .tile img, :root[data-pixel="on"] .slide-media img { image-rendering: pixelated; }

/* v3.5 手机：没有横幅的作品，图集提到最前，改成可横滑的一排 */
@media (max-width: 899px) {
  .work:not(.has-banner) .work-gallery:has(.g-row) { order: -1; }
  .work:not(.has-banner) .work-gallery:has(.g-row) { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
  .work:not(.has-banner) .work-gallery:has(.g-row)::-webkit-scrollbar { display: none; }
  .work:not(.has-banner) .work-gallery .g-row { display: contents; }
  .work:not(.has-banner) .work-gallery .g-note, .work:not(.has-banner) .work-gallery .g-section { display: none; }
  .work:not(.has-banner) .work-gallery .shot { flex: 0 0 84%; margin: 0; scroll-snap-align: center; }
  .work:not(.has-banner) .work-gallery .shot:only-of-type { flex-basis: 100%; }
}
.bgm-now { min-height: 1.4em; margin-top: 8px; font-size: 11px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v4 四语：按语言换正文字体 */
:root[data-lang="ja"] { --sans: "Inter Tight", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Noto Sans SC", system-ui, sans-serif; }
:root[data-lang="ko"] { --sans: "Inter Tight", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans JP", system-ui, sans-serif; }
:root[data-lang="ko"] body, :root[data-lang="ja"] body { word-break: keep-all; overflow-wrap: anywhere; }

/* 语言菜单 */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid currentColor; border-radius: 15px; font-size: 12px; opacity: .8; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { opacity: 1; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; min-width: 132px; padding: 6px 0; background: var(--bg-2); color: var(--ink); border: 1px solid var(--rule-2); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.lang-menu li a { display: block; padding: 8px 16px; font-size: 14px; }
.lang-menu li a:hover { background: var(--bg-3); text-decoration: none; }
.lang-menu li a[aria-current] { color: var(--accent); }

/* 作品库入口更显眼：顶栏按钮、首页大图上的按钮、简介旁的实心按钮 */
.site-nav .nav-cta { padding: 5px 14px; border: 1px solid currentColor; border-radius: 16px; font-weight: 600; }
.site-nav .nav-cta:hover { text-decoration: none; background: var(--accent); border-color: var(--accent); color: #fff; }
.site-nav .nav-cta[aria-current="page"] { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); text-decoration: none; }
.has-overlay .site-head:not(.is-solid) .nav-cta[aria-current="page"] { background: #f3f1ec; color: #111; }
.stage-cta { position: absolute; z-index: 3; left: var(--gutter); bottom: 22px; display: inline-flex; gap: 10px; align-items: center; padding: 10px 18px; background: #f3f1ec; color: #111; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.stage-cta:hover { text-decoration: none; background: var(--accent); color: #fff; }
.slide-cap { bottom: 92px; }
@media (min-width: 900px) {
  .stage-cta { left: auto; right: var(--gutter); bottom: 92px; padding: 12px 22px; font-size: 15px; }
  .slide-cap { bottom: 96px; }
}
.btn-cta { display: inline-flex; gap: 10px; align-items: center; justify-self: start; width: fit-content; padding: 12px 22px; background: var(--invert-bg); color: var(--invert-ink); font-weight: 600; }
.btn-cta:hover { text-decoration: none; background: var(--accent); color: #fff; }

/* 组合：首页按系列里的分组、作品库角色条里的组合名 */
.series-unit { display: grid; gap: 8px; margin-top: 16px; padding-left: 22px; }
.series-unit > .unit-link { justify-self: start; }
.series-unit .series-chars { margin-top: 0; padding-left: 0; align-items: center; }
.series-chars .group-link { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .02em; border: 0; padding: 4px 8px 4px 0; min-width: 9.5em; color: var(--ink-2); }
.series-chars .group-link:hover { color: var(--s); }
@media (min-width: 900px) { .series-unit { margin-top: 0; padding-left: 0; } }
@media (max-width: 899px) { .series-chars .group-link { min-width: 0; width: 100%; } }
.grp-btn { flex: none; align-self: stretch; writing-mode: horizontal-tb; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--muted); border-left: 2px solid var(--s, var(--rule-2)); max-width: 9em; text-align: left; line-height: 1.3; }
.grp-btn:hover { color: var(--ink); }
.grp-btn[aria-pressed="true"] { color: var(--accent); border-left-color: var(--accent); }
.opts-chars { max-height: 260px; overflow-y: auto; }
.opts-chars .opt { font-family: var(--mincho); font-weight: 500; }
/* 手机顶栏：外链收进页脚和「关于」，留出作品库按钮、语言、BGM、深浅 */
@media (max-width: 560px) {
  .site-nav { gap: 10px; }
  .site-nav .ext { display: none; }
  .site-nav .nav-cta { padding: 4px 11px; }
  .wordmark { letter-spacing: .18em; gap: 8px; }
  .lang-menu summary { padding: 0 6px; }
}
@media (max-width: 360px) { .site-nav a[href*="about/"] { display: none; } }
@media (max-width: 899px) {
  .stage-dots { bottom: 74px; }
  .slide-cap { bottom: 112px; }
}
.series-unit + .series-unit, .series-unit + .series-chars { margin-top: 14px; }

/* v4.1 原作服装参考图：卡片角标，和 Ken 自己的渲染图区分开 */
.tile-ref { position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 999px; font-size: 11px; line-height: 1.5; color: #2b2833; background: rgba(255,255,255,.82); border: 1px solid rgba(43,40,51,.12); }
.tile-media.is-ref img { background: #e6e3eb; }
