/* ============================================================
   渺小叙事 · 暗房 — 设计系统
   ============================================================ */

/* 暗色 · 暗房（默认） */
:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --bg-card: #16161a;
  --bg-raise: #1c1c21;
  --ink: #eae7e0;
  --ink-dim: #8b8880;
  --ink-faint: #55534d;
  --amber: #d7a45a;
  --amber-soft: rgba(215, 164, 90, .14);
  --line: #26262b;
  --rec: #e0432f;
  --glow: rgba(224, 67, 47, .08);

  --serif: "Songti SC", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

/* 亮色 · 相纸（跟随系统） */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f1e8;
    --bg-card: #faf8f1;
    --bg-raise: #ece7d9;
    --ink: #26241f;
    --ink-dim: #7b7566;
    --ink-faint: #b8b1a0;
    --amber: #a1731f;
    --amber-soft: rgba(161, 115, 31, .1);
    --line: #dfd9c9;
    --rec: #c23527;
    --glow: rgba(194, 53, 39, .055);
  }
}

/* 亮色 · 相纸（手动选择） */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e8;
  --bg-card: #faf8f1;
  --bg-raise: #ece7d9;
  --ink: #26241f;
  --ink-dim: #7b7566;
  --ink-faint: #b8b1a0;
  --amber: #a1731f;
  --amber-soft: rgba(161, 115, 31, .1);
  --line: #dfd9c9;
  --rec: #c23527;
  --glow: rgba(194, 53, 39, .055);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  position: relative;
  transition: background-color .25s ease, color .25s ease;
}

/* 底片颗粒 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

::selection { background: var(--amber); color: var(--bg); }

/* ---------- 自定义光标：REC 红点 / 录制按钮 ---------- */

html {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="5" fill="%23d84035" stroke="rgba(20,19,16,.4)" stroke-width="1"/></svg>') 8 8, auto;
}
a, button, [role="button"] {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><circle cx="11" cy="11" r="8.5" fill="none" stroke="%23d84035" stroke-width="1.6"/><circle cx="11" cy="11" r="4" fill="%23d84035"/></svg>') 11 11, pointer;
}

/* ---------- 鼠标红光（暗房安全灯，仅移动时亮起） ---------- */

.mouse-glow {
  position: fixed;
  left: 0; top: 0;
  width: 300px; height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 998;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  opacity: 0;
  transition: opacity .4s ease;
  will-change: transform;
}

a { color: inherit; }
a:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

.frame { max-width: 1040px; margin: 0 auto; padding: 0 32px; }

/* ---------- 顶栏 ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
  font-size: 12px;
  letter-spacing: .25em;
}
.topbar .logo {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.topbar .logo em { color: var(--amber); font-style: normal; }
.topbar nav { text-align: right; }
.topbar nav a {
  color: var(--ink-dim);
  text-decoration: none;
  margin-left: 26px;
  transition: color .2s;
  white-space: nowrap;
}
.topbar nav a:hover, .topbar nav a.active { color: var(--ink); }
.topbar nav a.active { border-bottom: 1px solid var(--amber); padding-bottom: 4px; }

.topbar-right { display: flex; align-items: center; gap: 26px; }

/* ---------- 主题切换 ---------- */

.theme-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.theme-switch button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .1em;
  padding: 6px 12px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button.on { color: var(--amber); background: var(--amber-soft); }
.theme-switch button + button { border-left: 1px solid var(--line); }

/* ---------- 首页 hero ---------- */

.hero { padding: 90px 0 70px; }
.hero .rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--amber);
  margin-bottom: 28px;
}
.hero .rec::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 12px var(--rec);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  margin-bottom: 24px;
}
.hero h1 span { display: inline-block; }
.hero p {
  font-size: 15px;
  color: var(--ink-dim);
  letter-spacing: .1em;
  max-width: 480px;
  line-height: 2;
}

/* ---------- 区块标题 ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 26px 0 30px;
}
.section-head h2 {
  font-size: 14px;
  letter-spacing: .35em;
  font-weight: 600;
  color: var(--ink);
}
.section-head a {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color .2s;
}
.section-head a:hover { color: var(--amber); }

/* ---------- 内页页头 ---------- */

.page-head { padding: 72px 0 56px; }
.page-head .en {
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--amber);
  margin-bottom: 20px;
}
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: .2em;
  margin-bottom: 18px;
}
.page-head p {
  font-size: 14.5px;
  color: var(--ink-dim);
  letter-spacing: .08em;
  line-height: 2;
  max-width: 520px;
}

/* ---------- 视频卡片 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 72px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s, transform .2s;
  display: block;
}
.card:hover { border-color: var(--amber); transform: translateY(-2px); }
.card .thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card .thumb::after {
  content: "▶";
  position: absolute;
  right: 12px; bottom: 10px;
  font-size: 10px;
  color: rgba(234,231,224,.85);
}
/* 占位封面（有真实封面图后换成 <img>） */
.thumb.t1 { background: linear-gradient(135deg, #2b2320 0%, #4a3524 55%, #1a1512 100%); }
.thumb.t2 { background: linear-gradient(135deg, #1d2226 0%, #32424a 55%, #12161a 100%); }
.thumb.t3 { background: linear-gradient(135deg, #23201d 0%, #3f3a2a 55%, #141210 100%); }
.thumb.t4 { background: linear-gradient(135deg, #26201f 0%, #4a2e2e 55%, #171213 100%); }
.thumb.t5 { background: linear-gradient(135deg, #1e2320 0%, #2e453a 55%, #121614 100%); }
.thumb.t6 { background: linear-gradient(135deg, #232025 0%, #3c3450 55%, #141217 100%); }

.card .body { padding: 18px 18px 20px; }
.card .ep {
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--amber);
  margin-bottom: 10px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.card p { font-size: 13px; color: var(--ink-dim); line-height: 1.8; }

/* ---------- 行列表（转发·图文） ---------- */

.list { margin-bottom: 80px; }
.list a, .list .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.list a:hover .title { color: var(--amber); }
.list .title {
  font-family: var(--serif);
  font-size: 16.5px;
  letter-spacing: .05em;
}
.list .note { font-size: 13px; color: var(--ink-dim); flex: 1; text-align: right; }
.list .date {
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .1em;
  white-space: nowrap;
}
.empty-note {
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--ink-faint);
  letter-spacing: .08em;
  line-height: 2;
  padding: 8px 0 24px;
}

/* ---------- 策展卡（转发·图文 内页） ---------- */

.curated-item {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 30px 32px;
  margin-bottom: 24px;
  transition: border-color .2s;
}
.curated-item:hover { border-color: var(--amber); }
.curated-item .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.curated-item .stamp {
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 3px 10px 3px 12px;
}
.curated-item .date { font-size: 12px; color: var(--ink-dim); letter-spacing: .1em; }
.curated-item h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 14px;
}
.curated-item h3 a { text-decoration: none; }
.curated-item h3 a:hover { color: var(--amber); }
.curated-item blockquote {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 18px;
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 2;
  margin-bottom: 16px;
}
.curated-item .say {
  font-size: 14px;
  line-height: 2;
  color: var(--ink);
}
.curated-item .say::before {
  content: "推荐语";
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}
.curated-item .src {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}
.curated-item .src:hover { color: var(--amber); border-color: var(--amber); }

/* ---------- 脚本详情页 ---------- */

.article { max-width: 680px; margin: 0 auto; padding: 64px 0 40px; }
.article .ep {
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--amber);
  margin-bottom: 22px;
}
.article h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  margin-bottom: 18px;
}
.article .logline {
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 2;
  letter-spacing: .06em;
  margin-bottom: 40px;
}

.video-embed {
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px solid var(--line);
  margin-bottom: 56px;
  position: relative;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-embed img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.video-embed .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: .25em;
}
.video-embed .placeholder::before {
  content: "▶";
  width: 52px; height: 52px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding-left: 4px;
}

.script-body { font-family: var(--serif); }
.script-body .scene {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--amber);
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.script-body .scene::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.script-body p {
  font-size: 16.5px;
  line-height: 2.2;
  letter-spacing: .04em;
  margin-bottom: 26px;
}
.script-body .direction {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-dim);
  background: var(--bg-card);
  border-left: 2px solid var(--amber);
  padding: 12px 18px;
  line-height: 2;
  margin-bottom: 26px;
}
.script-body strong { font-weight: 700; color: var(--amber); }

/* 章节标题 */
.script-body h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.6;
  margin: 68px 0 28px;
}
.script-body h2 .no {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .35em;
  color: var(--amber);
  margin-bottom: 10px;
}

/* 引用块 */
.script-body blockquote {
  border-left: 2px solid var(--amber);
  background: var(--bg-card);
  padding: 22px 26px;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink-dim);
}
.script-body blockquote .from {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--ink-faint);
}

/* 数据表 */
.script-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 32px;
  font-family: var(--sans);
  font-size: 13.5px;
}
.script-body th {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .25em;
  font-weight: 600;
  color: var(--amber);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--amber);
}
.script-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  line-height: 1.8;
}
.script-body tr th:last-child, .script-body tr td:last-child { text-align: right; }

/* 章节分隔 */
.script-body .sep {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 56px 0;
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0;
}
.script-body .sep::before, .script-body .sep::after { content: "·"; }
.script-body .sep span::before { content: "·"; }

/* 虚构声明（小剧场前的免责小字） */
.script-body .disclaimer {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--ink-faint);
  line-height: 1.9;
  margin: 0 0 20px;
  font-style: italic;
}

/* 对话块（出镜小剧场） */
.script-body .dialog {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 24px;
  margin: 0 0 32px;
}
.script-body .dialog p {
  font-size: 15.5px;
  line-height: 2.1;
  margin-bottom: 20px;
}
.script-body .dialog p:last-child { margin-bottom: 0; }
.script-body .who {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--amber);
  margin-bottom: 6px;
}

/* 金句 */
.script-body .pull {
  margin: 52px 0;
  padding: 0 24px;
  text-align: center;
  font-size: 19px;
  line-height: 2;
  letter-spacing: .06em;
  color: var(--ink);
}
.script-body .pull::before {
  content: "";
  display: block;
  width: 32px;
  border-top: 2px solid var(--amber);
  margin: 0 auto 24px;
}
.script-body .pull::after {
  content: "";
  display: block;
  width: 32px;
  border-top: 2px solid var(--amber);
  margin: 24px auto 0;
}

.article-foot {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}
.article-foot a {
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: .1em;
  line-height: 1.8;
  transition: color .2s;
  max-width: 45%;
}
.article-foot a:hover { color: var(--amber); }
.article-foot .label {
  display: block;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.article-foot .next { text-align: right; margin-left: auto; }

/* ---------- 关于页 ---------- */

.avatar {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--amber-soft);
  margin: 6px 0 30px;
}

.about-body {
  max-width: 620px;
  padding: 0 0 24px;
}
.about-body p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.2;
  letter-spacing: .04em;
  color: var(--ink);
  margin-bottom: 24px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 16px 0 72px;
}
.platform {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .2s, transform .2s;
}
.platform:hover { border-color: var(--amber); transform: translateY(-2px); }
.platform .name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.platform .handle { font-size: 12px; color: var(--ink-dim); letter-spacing: .08em; }
.platform .arrow { color: var(--ink-faint); transition: color .2s, transform .2s; }
.platform:hover .arrow { color: var(--amber); transform: translateX(4px); }

/* ---------- 页脚 ---------- */

footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 34px 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ink-dim);
  flex-wrap: wrap;
  gap: 16px;
}
footer.site-foot .links a {
  color: var(--ink-dim);
  text-decoration: none;
  margin-right: 22px;
  transition: color .2s;
}
footer.site-foot .links a:hover { color: var(--amber); }

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .frame { padding: 0 22px; }
  .topbar { flex-direction: column; gap: 16px; padding: 22px 0 18px; }
  .topbar nav a { margin: 0 10px; font-size: 11px; }
  .topbar-right { flex-direction: column; gap: 14px; }
  .hero { padding: 56px 0 48px; }
  .page-head { padding: 48px 0 40px; }
  .list a, .list .row { flex-wrap: wrap; gap: 6px 16px; }
  .list .note { flex-basis: 100%; text-align: left; order: 3; }
  .curated-item { padding: 24px 20px; }
  .article { padding: 40px 0 32px; }
  .article-foot { flex-direction: column; }
  .article-foot a { max-width: 100%; }
  .article-foot .next { text-align: left; margin-left: 0; }
  footer.site-foot { flex-direction: column; align-items: flex-start; }
}
