/* 创作工房：深夜蓝 + 金色描边的“图鉴”风；每个作品用 data 里的 theme 覆盖 --accent / --accent2 / --deep */
:root {
  --ink: #0c0b16;
  --deep: #151231;
  --panel: #1b1838e6;
  --line: #ffffff1f;
  --text: #f2eee6;
  --muted: #b9b3c9;
  --accent: #f0c86a;
  --accent2: #b58cff;
  --radius: 16px;
  --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ink); color: var(--text);
  font: 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before { /* 星屑底纹 */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 42%, #ffe9a8aa 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 62%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 82%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 88%, #cdb6ff99 50%, transparent 51%),
    radial-gradient(1200px 700px at 85% -10%, #3a2a7a55, transparent 60%),
    radial-gradient(900px 600px at -10% 30%, #5a2a4a40, transparent 60%),
    var(--ink);
  background-size: 400px 400px, 520px 520px, 610px 610px, 470px 470px, 380px 380px, 560px 560px, auto, auto, auto;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 顶栏 ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: linear-gradient(#0c0b16d9, #0c0b1600);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px/1 var(--serif); letter-spacing: .12em; text-shadow: 0 2px 10px #000a; }
.brand-mark { color: var(--accent); font-size: 18px; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: #0c0b16a6; border: 1px solid var(--line); backdrop-filter: blur(8px); }
.lang button { font: 600 13px/1 var(--sans); color: var(--muted); background: none; border: 0; padding: 8px 15px; border-radius: 999px; cursor: pointer; letter-spacing: .05em; }
.lang button[aria-pressed="true"] { background: linear-gradient(135deg, #ffe39a, #d9a441); color: #2a1d05; }

main { flex: 1; width: 100%; }

/* ---------- 首页大图：两行滚动的作品画面 ---------- */
.hero-home { position: relative; height: min(92vh, 860px); min-height: 560px; overflow: hidden; display: grid; align-items: end; }
.mq { position: absolute; inset: -60px -40px 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; transform: rotate(-5deg) scale(1.1); }
.mq-row { overflow: hidden; min-height: 0; }
.mq-track { display: flex; gap: 12px; height: 100%; width: max-content; animation: mq 90s linear infinite; }
.mq-row.rev .mq-track { animation-direction: reverse; animation-duration: 120s; }
.mq-row:nth-child(3) .mq-track { animation-duration: 100s; }
.mq-track img { height: 100%; width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; filter: saturate(1.05); }
@keyframes mq { to { transform: translateX(-50%); } }
.hero-home-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, #0c0b1699 0%, #0c0b1633 35%, #0c0b16cc 72%, var(--ink) 100%),
  radial-gradient(ellipse at 50% 70%, #0c0b16cc, transparent 70%); }
.hero-home-text { position: relative; z-index: 1; text-align: center; padding: 0 20px clamp(56px, 10vh, 110px); }
.eyebrow { margin: 0 0 10px; font: 600 13px/1 var(--sans); letter-spacing: .5em; color: var(--accent); text-transform: uppercase; }
.hero-home h1 {
  margin: 0; font: 700 clamp(38px, 7vw, 84px)/1.1 var(--serif); letter-spacing: .08em;
  background: linear-gradient(180deg, #fff 30%, #f3d58a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px #000c);
}
.lead { margin: 18px auto 0; max-width: 40em; color: #e6e0f0; font-size: clamp(15px, 1.6vw, 18px); text-shadow: 0 2px 10px #000; }

/* ---------- 作品横幅 ---------- */
.works { max-width: 1320px; margin: 0 auto; padding: 24px clamp(14px, 4vw, 56px) 90px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 26px; font: 700 clamp(26px, 3vw, 36px)/1 var(--serif); letter-spacing: .2em; }
.section-head small { font: 600 14px/1 var(--sans); color: var(--accent); letter-spacing: .1em; }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .5; }

.feat {
  position: relative; display: grid; align-items: end; min-height: clamp(380px, 46vw, 560px);
  margin-bottom: 28px; border-radius: 22px; overflow: hidden; text-decoration: none; isolation: isolate;
  border: 1px solid #ffffff22; box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px #ffffff0d;
}
.feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.feat:hover .feat-bg { transform: scale(1.05); }
.feat-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, color-mix(in srgb, var(--deep) 94%, transparent) 0%, color-mix(in srgb, var(--deep) 70%, transparent) 38%, transparent 70%),
  linear-gradient(0deg, color-mix(in srgb, var(--deep) 80%, transparent), transparent 55%); }
.feat.flip .feat-shade { background:
  linear-gradient(270deg, color-mix(in srgb, var(--deep) 94%, transparent) 0%, color-mix(in srgb, var(--deep) 70%, transparent) 38%, transparent 70%),
  linear-gradient(0deg, color-mix(in srgb, var(--deep) 80%, transparent), transparent 55%); }
.feat-body { padding: clamp(22px, 4vw, 48px); max-width: 560px; }
.feat.flip .feat-body { justify-self: end; text-align: right; }
.feat.flip .chips { justify-content: flex-end; }
.feat-no { margin: 0; font: 700 14px/1 var(--sans); letter-spacing: .3em; color: var(--accent); }
.feat-title { margin: 10px 0 6px; font: 700 clamp(30px, 4vw, 48px)/1.15 var(--serif); letter-spacing: .06em; text-shadow: 0 3px 16px #000c; }
.feat-title.has-logo { margin: 4px 0 4px; }
.feat-logo { width: min(400px, 80%); filter: drop-shadow(0 6px 18px #000a); }
.feat.flip .feat-logo { margin-left: auto; }
.feat-genre { margin: 0 0 10px; color: var(--accent); font-weight: 600; font-size: 15px; letter-spacing: .08em; }
.feat-tag { margin: 0 0 16px; color: #ece6f6; font-size: 15.5px; text-shadow: 0 2px 8px #000; }
.feat-cta { display: inline-block; margin-top: 18px; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; letter-spacing: .08em;
  color: #1d1405; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent)); box-shadow: 0 6px 20px -6px var(--accent); transition: transform .2s; }
.feat:hover .feat-cta { transform: translateX(4px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { font-size: 12.5px; line-height: 1; padding: 7px 12px; border-radius: 999px; background: #0c0b1699; border: 1px solid #ffffff2e; color: #eee; backdrop-filter: blur(6px); }
.chip.strong { background: color-mix(in srgb, var(--accent) 22%, #0c0b16cc); border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent); font-weight: 700; }
.chip.ghost { background: transparent; color: var(--muted); }

/* ---------- 作品页 ---------- */
.project { background: linear-gradient(180deg, transparent 0, var(--deep) 80vh, var(--ink) 160vh); }
.ph { position: relative; min-height: min(96vh, 900px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }
.ph-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, #0c0b1680 0%, transparent 22%, transparent 45%, color-mix(in srgb, var(--deep) 85%, transparent) 82%, var(--deep) 100%); }
.ph-body { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px) clamp(40px, 8vh, 80px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.back { align-self: flex-start; position: absolute; top: 74px; text-decoration: none; font-size: 14px; padding: 7px 14px; border-radius: 999px; background: #0c0b16a6; border: 1px solid var(--line); backdrop-filter: blur(8px); }
.back:hover { border-color: var(--accent); color: var(--accent); }
.ph-title { margin: 0; font: 700 clamp(40px, 6vw, 76px)/1.1 var(--serif); letter-spacing: .06em; text-shadow: 0 4px 24px #000; }
.ph-logo { width: min(620px, 86vw); filter: drop-shadow(0 10px 30px #0009); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.ph-genre { margin: 14px 0 4px; color: var(--accent); font-weight: 700; letter-spacing: .14em; text-shadow: 0 2px 10px #000; }
.ph-tag { margin: 0 0 18px; max-width: 40em; font-size: clamp(15px, 1.6vw, 18px); text-shadow: 0 2px 12px #000; }
.ph .chips { justify-content: center; margin-bottom: 24px; }

.pbody { max-width: 1240px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 56px) 90px; }
.sec-title { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 70px 0 30px; font: 700 clamp(24px, 3vw, 34px)/1.2 var(--serif); letter-spacing: .24em; }
.sec-title .orn { color: var(--accent); font-size: .6em; }
.sec-title::before, .sec-title::after { content: ""; width: clamp(40px, 12vw, 160px); height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.sec-title::after { transform: scaleX(-1); }

.story-text { max-width: 46em; margin: 0 auto; text-align: center; font-size: 17px; line-height: 2.1; }
.story-text p { margin: 0 0 1em; }

.hl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 40px; }
.hl-item { padding: 22px 22px 18px; border-radius: var(--radius); background: linear-gradient(160deg, #ffffff12, #ffffff05); border: 1px solid var(--line); }
.hl-no { font: 700 13px/1 var(--sans); color: var(--accent); letter-spacing: .2em; }
.hl-item p { margin: 10px 0 0; font-size: 15px; }

/* 角色一字排开站在“舞台”上 */
.cast { position: relative; display: flex; justify-content: safe center; align-items: flex-end; gap: clamp(0px, .6vw, 10px); padding: 0 10px 0; overflow-x: auto; scrollbar-width: thin; }
.cast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 56px; height: 80px; z-index: -1;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--accent2) 45%, transparent), transparent 70%); }
.cast-item { margin: 0; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.cast-item img { height: clamp(170px, 18vw, 262px); width: auto; transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), filter .35s; filter: drop-shadow(0 10px 14px #0009); transform-origin: 50% 100%; }
.cast-item:hover img { transform: translateY(-10px) scale(1.06); filter: drop-shadow(0 16px 20px #000b) drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 50%, transparent)); }
.cast-item figcaption { margin-top: 10px; text-align: center; line-height: 1.3; }
.cast-item strong { display: block; font: 700 15px/1.3 var(--serif); letter-spacing: .06em; }
.cast-item span { font-size: 12px; color: var(--muted); }

.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-flow: dense; gap: 14px; }
.shot { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #000; aspect-ratio: 3 / 2; box-shadow: 0 0 0 1px var(--line); }
.shot.wide { grid-column: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s; }
.shot:hover img { transform: scale(1.06); }

.info-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; margin-top: 70px; align-items: start; }
.stack { display: grid; gap: 22px; }
.panel { position: relative; padding: 26px 26px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: inset 0 1px 0 #ffffff14, 0 20px 40px -24px #000; scroll-margin-top: 90px; }
.panel::before, .panel::after { content: "✦"; position: absolute; top: -9px; font-size: 14px; color: var(--accent); background: var(--deep); padding: 0 6px; }
.panel::before { left: 18px; } .panel::after { right: 18px; }
.panel-title { margin: 0 0 16px; font: 700 19px/1.3 var(--serif); letter-spacing: .14em; color: var(--accent); }
.timeline { margin: 0; padding: 0; list-style: none; counter-reset: tl; }
.timeline li { position: relative; padding: 0 0 14px 34px; font-size: 15px; line-height: 1.7; }
.timeline li::before { counter-increment: tl; content: counter(tl); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--sans); color: #1d1405; background: var(--accent); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 28px; bottom: 2px; width: 1px; background: color-mix(in srgb, var(--accent) 45%, transparent); }

.links { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.links li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #0c0b1680; border: 1px solid var(--line); }
.link-info { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.5; }
.link-info strong { font-size: 15px; }
.note { color: var(--muted); font-size: 12.5px; }
.size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.btn { white-space: nowrap; padding: 9px 16px; border-radius: 10px; border: 0; cursor: pointer; text-decoration: none; font: 700 14px/1 var(--sans); letter-spacing: .05em;
  color: #1d1405; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); box-shadow: 0 6px 18px -8px var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.big { padding: 15px 30px; font-size: 16px; border-radius: 999px; }
.btn.off { background: transparent; color: var(--muted); border: 1px dashed #ffffff40; box-shadow: none; font-weight: 500; cursor: default; }

/* ---------- 看图 ---------- */
dialog#lightbox { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
dialog#lightbox::backdrop { background: #05040cf0; }
#lightbox figure { margin: 0; }
#lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; margin: 0 auto; box-shadow: 0 20px 60px #000; }
#lightbox figcaption { text-align: center; margin-top: 12px; color: var(--muted); }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #1b1838cc; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-prev { left: 18px; top: calc(50% - 24px); } .lb-next { right: 18px; top: calc(50% - 24px); } .lb-close { right: 18px; top: 18px; }

/* ---------- 页脚 ---------- */
.foot { text-align: center; padding: 40px 20px 50px; color: var(--muted); font-size: 13px; }
.foot-mark { color: var(--accent); font-size: 18px; margin-bottom: 8px; }
.foot p { margin: 0; }
.empty { padding: 160px 20px 60px; color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  .info-cols { grid-template-columns: 1fr; }
  .feat-body, .feat.flip .feat-body { max-width: none; justify-self: stretch; text-align: left; }
  .feat.flip .chips { justify-content: flex-start; }
  .feat.flip .feat-logo { margin-left: 0; }
  .feat-shade, .feat.flip .feat-shade { background: linear-gradient(0deg, var(--deep) 10%, color-mix(in srgb, var(--deep) 60%, transparent) 55%, transparent 85%); }
  .shot.wide { grid-column: auto; }
  .cast { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
