/* ═══════════════════════════════════════════════════════════════
   云盘影视 —— 夜航片库 / Night Archive
   ─────────────────────────────────────────────────────────────
   方向：把站点当作一间片库档案馆，而不是一个搜索框。
   · 底色用**暖调墨黑**（未曝光胶片），不是常见的蓝黑 —— 蓝黑是
     每一个深色模式模板的默认，也是这套设计要避开的「AI 味」源头。
   · 唯一强调色是**放映机灯泡的琥珀金**，不用泛光蓝。
   · 标题用**中文宋体**。中文站几乎清一色用苹方/雅黑，宋体在深色
     背景上的编辑感是本站的核心辨识度。
   · 胶片颗粒 + 暗角做空气感；齿孔分隔线是唯一的装饰母题。
   克制的地方：搜索框、网盘按钮、筛选列表必须比装饰更响 ——
   这是个工具站，用户来搜东西然后就走。
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   字体
   ══════════════════════════════════════════════════════════════
   三款都自托管在 /static/fonts/，不走任何 CDN：

   · **不引 Google Fonts** —— 国内被墙，页面会先卡在字体请求上再回退。
   · **只带 Latin 子集**（共 124 KB）—— 完整中文字体是几 MB 级，
     而中文交给系统字体：显示体走宋体（电影片名字体本来就是宋体），
     正文走苹方/雅黑。这不是妥协，是把「风格」放在最该花字节的地方。
   · `font-display: swap` —— 字体没到之前先用系统字体渲染，不留白屏。
*/

/* Bodoni Moda：极端粗细对比的 Didone体，做标题有老电影海报的骨架感。
   它只影响拉丁字母与数字 —— 中文会自然落到后面的宋体。 */
@font-face {
  font-family: "Bodoni Nova";
  src: url("/static/fonts/bodoni-moda-var.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  /* 拉丁子集限定范围，省得浏览器去比对中文字形 */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans：略带工业感的无衬线，做正文与控件。
   选它不选 Inter —— Plex 有明确的「被设计出来」的痕迹，
   窄一点、字腔更方，和上面的 Didone 放一起不打架。 */
@font-face {
  font-family: "Plex Nova Sans";
  src: url("/static/fonts/plex-sans-var.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono：所有数字、时间戳、resource_key。等宽是必须的 ——
   统计数字要能上下对齐，slug 与哈希要能逐字符比对。 */
@font-face {
  font-family: "Plex Nova Mono";
  src: url("/static/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Nova Mono";
  src: url("/static/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plex Nova Mono";
  src: url("/static/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* 墨与纸 */
  --ink:        #0c0b09;   /* 暖调近黑，底 */
  --ink-raise:  #14120e;   /* 抬起的面：卡片、侧栏 */
  --ink-lift:   #1d1a15;   /* 再抬一层：hover、输入框 */
  --paper:      #ece4d6;   /* 纸白，正文 —— 不用纯白 */
  --paper-dim:  #a89e8c;   /* 次级 */
  --paper-faint:#6f6759;   /* 三级：元数据 */
  --rule:       #2a251d;   /* 分隔线，暖调 */
  --rule-soft:  #201c16;

  /* 放映机灯泡 —— 唯一强调色 */
  --amber:      #d4a04c;
  --amber-hot:  #f0c264;
  --amber-deep: #8a6526;

  /* 语义色（都往暖调靠，避免冷蓝破坏整体） */
  --danger:     #d4674e;
  --good:       #7ba05b;

  /* 网盘品牌色：稍微降饱和以融进暖调底 */
  --pan-baidu:  #2f6bb5;
  --pan-alipan: #c2622a;
  --pan-quark:  #2a8fa8;
  --pan-other:  #6f6759;

  /* 拉丁在前、中文在后：浏览器按字符逐个落到第一个能显示的字体上，
     所以拉丁走 Bodoni/Plex，中文自动走宋体/苹方。 */
  --font-display: "Bodoni Nova", "Songti SC", "STSong", "Source Han Serif SC",
                  "Noto Serif SC", "SimSun", "宋体", serif;
  --font-sans:    "Plex Nova Sans", "PingFang SC", "Hiragino Sans GB",
                  "Microsoft YaHei", sans-serif;
  --font-mono:    "Plex Nova Mono", "SF Mono", Menlo, monospace;

  --wrap: 1320px;
  --gap: 18px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 15px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── 空气感：胶片颗粒 + 暗角 ──
   固定在视口上的伪元素，不随滚动 —— 像投影仪的光晕始终在画面上。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* 0.5 看着像脏污而不是胶片。真正的颗粒是「几乎察觉不到但移开眼睛会觉得画面太干净」。 */
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 0%, transparent 45%, rgba(0,0,0,.42) 100%);
}

/* 内容压在颗粒之上 */
.topbar, main, .foot { position: relative; z-index: 2; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: none; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── 滚动条：细、暗、不抢戏 ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a251d; border-radius: 6px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: #3a3327; }

/* ═══════════════ 顶栏 ═══════════════ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(12, 11, 9, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  display: flex; align-items: center; gap: 22px;
  height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: .14em;
  color: var(--paper);
  white-space: nowrap;
  display: flex; align-items: baseline; gap: 9px;
}
/* 品牌旁的一点灯光 —— 放映机还开着的暗示 */
.brand::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px 2px rgba(212,160,76,.55);
  align-self: center;
}
.brand:hover { color: var(--amber-hot); }

/* 配了 LOGO：文字让位给图，但站点名仍要在（alt 之外还留一份给无障碍/图片挂掉时） */
.brand-logo::before { display: none; }
/* 母线是 baseline 对齐的，而 img 是块级元素，flex 里它的基线在底边 ——
   不改这里，图会比文字高出一截、底边压在基线上。 */
.brand-logo { align-items: center; }
.brand-logo img {
  display: block; height: 28px; width: auto;
  /* 图是彩色的，直接贴在暖调背景上会显脏 —— 压一点饱和度融进底色 */
  filter: saturate(.92);
  transition: filter .16s var(--ease);
}
.brand-logo:hover img { filter: saturate(1.05); }
/* 只给读屏软件看，视觉上不占位（图挂掉时它就是唯一的名字） */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.topsearch { display: flex; flex: 1; max-width: 420px; }
.topsearch input { flex: 1; border-radius: 999px 0 0 999px !important; }

.topnav { display: flex; gap: 16px; font-size: 13.5px; flex-wrap: wrap; }
.topnav a { color: var(--paper-dim); letter-spacing: .05em; }
.topnav a:hover { color: var(--amber); }
.topnav .admin-link { color: var(--paper-faint); }
.topnav .admin-link::before { content: "· "; }

/* ═══════════════ 表单元素 ═══════════════ */
input[type="search"], input[type="password"], input[type="text"] {
  background: var(--ink-lift);
  border: 1px solid var(--rule);
  color: var(--paper);
  padding: 9px 15px;
  border-radius: var(--radius, 8px);
  font: inherit;
  min-width: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
/* select / textarea / 数字框也在这套暗色里。
   漏掉它们的后果不是「有点丑」而是**一整个白框**落在暗色页面中间 ——
   浏览器对未设色的控件一律给系统默认的白底，那是个刺眼的白块。 */
select, textarea, input[type="number"], input[type="url"], input[type="file"] {
  background: var(--ink-lift);
  border: 1px solid var(--rule);
  color: var(--paper);
  padding: 9px 15px;
  border-radius: var(--radius, 8px);
  font: inherit;
  min-width: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
select {
  padding: 8px 12px;
  /* 展开菜单由浏览器绘制，dark 系下必须显式声明，否则下拉列表是白底白字 */
  color-scheme: dark;
  cursor: pointer;
}
textarea { line-height: 1.75; resize: vertical; }
input::placeholder { color: var(--paper-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber-deep);
  box-shadow: 0 0 0 3px rgba(212,160,76,.13);
}

button {
  background: var(--amber);
  color: #1a1408;
  border: 0;
  padding: 9px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
button:hover { background: var(--amber-hot); }
button:active { transform: translateY(1px); }
.linkish { background: none; color: var(--paper-dim); padding: 0; font-weight: 400; }
.linkish:hover { background: none; color: var(--amber); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ═══════════════ 首页 hero ═══════════════ */
.hero { padding: 76px 0 40px; text-align: center; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 400;
  letter-spacing: .3em;
  text-indent: .3em;      /* 抵消末字的字距，保持视觉居中 */
  margin: 0 0 14px;
  color: var(--paper);
}
.hero-sub {
  font-family: var(--font-display);
  color: var(--paper-dim);
  font-size: 14px;
  letter-spacing: .22em;
  margin: 0 0 30px;
}
.hero-search { display: flex; max-width: 640px; margin: 0 auto; }
.hero-search input {
  flex: 1; padding: 15px 22px; font-size: 16px;
  border-radius: 999px 0 0 999px;
  border-right: 0;
}
.hero-search button { padding: 15px 30px; border-radius: 0 999px 999px 0; }
.hero-hint { color: var(--paper-faint); font-size: 12.5px; margin-top: 16px; letter-spacing: .04em; }

/* 热门标签：搜索框正下方。对「不知道搜什么」的访客，这是唯一的入口 ——
   没有它，搜索框对大多数人等于装饰。

   **铺满整行**：列宽用 1fr 而不是 max-content。max-content 会让整块标签缩成
   「刚好包住最长那个词」的宽度并居中，两侧留出大片空白 —— 在一个本来就居中
   的 hero 里，那片空白让标签看着像没排完。1fr 让每列均分整行，标签行成了
   一条真正占满版心的横带。

   **恒定两行**：grid-template-rows 给死两行 + grid-auto-flow 让标签逐列填满，
   于是无论后台配了 8 个还是 20 个，桌面端永远是两行。flex-wrap 的自动折行
   做不到这件事 —— 标签一多就变成三四行，hero 被撑高，首屏的板块标题被顶出视野。
   窄屏另作处理：两行放不下那么多标签，退回按内容宽度换行。 */
.hot-tags {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}
.hot-tags-lead {
  color: var(--paper-faint);
  font-size: 11.5px;
  letter-spacing: .18em;
  padding-top: 5px;
  white-space: nowrap;
}
.hot-tags-grid {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  /* 1fr = 均分整行宽度。列数由「两行」这条约束决定，正好是 ceil(n/2) */
  grid-auto-columns: 1fr;
  gap: 7px 8px;
}
.hot-tag {
  background: var(--ink-lift); border: 1px solid var(--rule);
  color: var(--paper-dim); padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; letter-spacing: .03em; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  /* 每格都是整格的点击区：否则行与行之间有一指宽的死区 */
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.hot-tag:hover { color: var(--amber); border-color: var(--amber-deep); }

/* 板块锚点导航：长页面的跳读条。不做 JS 切页 —— 爬虫与 noscript
   读到的仍是同一份完整 HTML，JS 挂了也不丢内容。 */
.section-nav {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.section-nav a {
  color: var(--paper-faint); font-size: 13px; letter-spacing: .08em;
  text-decoration: none; padding: 4px 12px; border-radius: 999px;
  transition: color .16s var(--ease);
}
.section-nav a:hover { color: var(--amber); }

/* 锚点跳转后标题要顶到视口上方，否则 sticky 顶栏会盖住板块标题 */
.section { scroll-margin-top: 76px; }

.searchform { display: flex; max-width: 640px; margin: 24px 0; }
.searchform input { flex: 1; padding: 13px 20px; font-size: 15px; border-radius: 999px 0 0 999px; border-right: 0; }
.searchform button { border-radius: 0 999px 999px 0; padding: 13px 26px; }

/* ═══════════════ 齿孔分隔线 —— 唯一的装饰母题 ═══════════════ */
.sprocket {
  height: 22px;
  margin: 46px 0 8px;
  background-image:
    radial-gradient(circle at 11px 11px, var(--ink) 4.5px, transparent 5px);
  background-size: 26px 22px;
  background-repeat: repeat-x;
  opacity: .85;
  position: relative;
  display:none;
}
.sprocket::before, .sprocket::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 12%, var(--rule) 88%, transparent);
}
.sprocket::before { top: 0; }
.sprocket::after { bottom: 0; }

/* ═══════════════ 板块 ═══════════════ */
.section { margin: 44px 0; }

.section-head {
  display: flex; align-items: flex-end; gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
/* 板块序号 —— 编辑感的来源 */
.section-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber-deep);
  letter-spacing: .1em;
  padding-bottom: 3px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 23px; font-weight: 400;
  letter-spacing: .16em;
  margin: 0;
  line-height: 1.2;
}
.section-title a { color: var(--paper); }
.section-title a:hover { color: var(--amber); }
.section-count { color: var(--paper-faint); font-size: 13px; letter-spacing: 0; }
.section-note { color: var(--paper-faint); font-size: 12.5px; margin: 0; margin-left: auto; text-align: right; }
.more { margin: 16px 0 0; font-size: 13.5px; }
.more a { color: var(--paper-dim); letter-spacing: .04em; }
.more a:hover { color: var(--amber); }

.page-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 400; letter-spacing: .14em;
  margin: 44px 0 22px;
  display: flex; align-items: baseline; gap: 14px;
}
.page-title .section-count { font-size: 14px; }

/* ── 最近更新：横向窄条，与分类板块明确区分 ── */
.strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.strip::-webkit-scrollbar { height: 6px; }
.strip .card { flex: 0 0 132px; }
.strip .card-title { font-size: 12.5px; }
.strip .card-media { aspect-ratio: 2/3; }

/* ═══════════════ 卡片 ═══════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: var(--gap);
}

.card { display: flex; flex-direction: column; }

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 3px;                 /* 海报不该是圆角药丸 */
  overflow: hidden;
  background: var(--ink-raise);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 18px rgba(0,0,0,.5);
  transition: transform .34s var(--ease), box-shadow .34s var(--ease);
}
/* 悬停：像从架子上抽出海报、投到灯下 */
.card:hover .card-media {
  transform: translateY(-5px);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset,
              0 0 0 1px var(--amber-deep),
              0 16px 34px rgba(0,0,0,.66),
              0 0 44px rgba(212,160,76,.14);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }

/* 占位块：按分类取色。0.2% 的资源没有封面，版式不能塌。 */
.card-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--font-display);
  font-size: 46px; color: rgba(236,228,214,.5);
  background: linear-gradient(155deg, #221f19, #16130f);
}
.card-fallback-lg { font-size: 110px; }
.card-fallback[data-cat="未分类"]   { background: linear-gradient(155deg, #2c2921, #1a1712); }
.card-fallback[data-cat="剧集"]     { background: linear-gradient(155deg, #1c2a3a, #111823); }
.card-fallback[data-cat="动漫"]     { background: linear-gradient(155deg, #33203c, #1d1324); }
.card-fallback[data-cat="电影"]     { background: linear-gradient(155deg, #3a2a17, #1f1710); }
.card-fallback[data-cat="短剧目录"] { background: linear-gradient(155deg, #3d1b28, #1f1017); }
.card-fallback[data-cat="短剧"]     { background: linear-gradient(155deg, #46202c, #24131a); }
.card-fallback[data-cat="综艺"]     { background: linear-gradient(155deg, #1a332c, #0f1c18); }
.card-fallback[data-cat="音乐"]     { background: linear-gradient(155deg, #2c2647, #171428); }
.card-fallback[data-cat="纪录片"]   { background: linear-gradient(155deg, #213230, #121a19); }

/* 聚合帖徽章：琥珀金，像片库里的「合集」标签 */
.badge {
  position: absolute; left: 0; bottom: 0;
  background: rgba(212,160,76,.94); color: #1a1408;
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 0 3px 0 0;
}
.badge-agg::before { content: "◧ "; }

.card-body { padding-top: 9px; }
.card-title {
  /* 行高跟随 .card-head 的 --head-lh：两行截断按行盒算的，
     标题与徽章各算各的行高会让裁切线落在药丸中间。 */
  line-height: var(--head-lh, 20px);
  color: var(--paper); font-size: 13.5px;
  transition: color .18s var(--ease);
}
.card:hover .card-title { color: var(--amber-hot); }
.card-meta {
  margin: 5px 0 0; font-size: 11.5px; color: var(--paper-faint);
  display: flex; gap: 7px; flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.card-meta .cat { color: var(--paper-dim); }
.card-meta .q { color: var(--amber); letter-spacing: .03em; }

/* 入场：错落揭示。一次性、克制。 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.grid .card, .strip .card { animation: rise .5s var(--ease) both; }
.grid .card:nth-child(1) { animation-delay: .02s } .grid .card:nth-child(2) { animation-delay: .05s }
.grid .card:nth-child(3) { animation-delay: .08s } .grid .card:nth-child(4) { animation-delay: .11s }
.grid .card:nth-child(5) { animation-delay: .14s } .grid .card:nth-child(6) { animation-delay: .17s }
.grid .card:nth-child(n+7) { animation-delay: .2s }

/* ═══════════════ 两栏 ═══════════════ */
.layout { display: grid; grid-template-columns: 208px 1fr; gap: 32px; align-items: start; }

.sidebar {
  position: sticky; top: 84px;
  background: var(--ink-raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px 18px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.sidebar h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 400;
  letter-spacing: .2em;
  color: var(--paper-dim);
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule-soft);
}
.sidebar h3:first-child { margin-top: 0; }
.facet-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.facet-list li { margin: 1px 0; }
.facet-list a {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--paper-dim); padding: 4px 7px; border-radius: 3px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.facet-list a:hover { background: var(--ink-lift); color: var(--paper); }
.facet-list a.on { background: var(--amber); color: #1a1408; }
.facet-list span { color: var(--paper-faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.facet-list a.on span { color: rgba(26,20,8,.7); }
.facet-scroll { max-height: 210px; overflow-y: auto; }
.sort-note { font-size: 12px; color: var(--paper-faint); margin-top: 14px; }

/* ═══════════════ 详情页 ═══════════════ */
.detail { display: grid; grid-template-columns: 272px 1fr; gap: 36px; margin: 40px 0; }
.detail-media {
  border-radius: 3px; overflow: hidden;
  background: var(--ink-raise);
  aspect-ratio: 2/3;
  box-shadow: 0 14px 40px rgba(0,0,0,.6);
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 标题与徽章合起来的一块，**整体最多两行**。

   用固定行高 + max-height，而不是 -webkit-line-clamp：实测 Chrome 154 已经
   不认 `display: -webkit-box`（computed display 退回 flow-root），只认 -webkit-
   line-clamp 的话截断会静默失效、卡片高度参差 —— 而这个约束是产品要求
   （「标题和标签不超过 2 行」），不能交给一个可能不生效的属性。

   行高必须**统一**：.card-head 自己定行高，标题与药丸都继承它。否则两行的
   边界落在药丸中间，裁出来的就是半个药丸，看起来像渲染坏了。 */
.card-head {
  --head-lh: 20px;
  line-height: var(--head-lh);
  max-height: calc(var(--head-lh) * 2);
  overflow: hidden;
  margin: 0;
}

/* 网盘徽章：实心药丸，白字 + 品牌色。
   实心而不是描边 —— 描边版在深色底上每张卡多三个空心框，读起来像没做完。

   **这里必须是 inline，不是 inline-flex**：列表页的「标题 + 徽章」整体受
   .card-head 的两行截断管着，而 inline-flex 会生成块级盒、跳出行内流 ——
   结果就是徽章独占第三行，标题两行 + 徽章一行，截断也管不到它。
   inline 的徽章才真正跟标题文字排在同一个行框里，超出两行的部分被裁掉。 */
.pan-badges { display: inline; }
.pan-badge {
  display: inline-block;
  padding: 0 7px;
  margin-right: 4px;
  border-radius: 999px;
  background: var(--c);
  color: #fff;
  font-size: 10.5px; line-height: var(--head-lh, 20px); letter-spacing: .04em;
  white-space: nowrap;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 400; line-height: 1.45;
  letter-spacing: .04em;
  margin: 0 0 14px;
}
/* 详情页的徽章跟着 27px 的标题走，得比列表页大一档才不显得像脚注 */
.detail-title .pan-badge { font-size: 12px; line-height: 20px; padding: 0 9px; }
.detail-title .pan-badges { margin-left: 6px; }

/* 管理员在详情页就地改这一条。素色 + hover 变琥珀，跟站内其它链接一致 ——
   它对访客不存在，所以不该有自己的配色。 */
.detail-edit {
  color: var(--paper-faint);
  font-size: 12.5px; letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.detail-edit:hover { color: var(--amber); border-color: var(--amber); }
.detail-meta {
  display: flex; gap: 11px; flex-wrap: wrap;
  font-size: 13px; color: var(--paper-dim); margin: 0 0 22px;
  font-variant-numeric: tabular-nums;
}
.detail-meta .q { color: var(--amber); letter-spacing: .04em; }
.detail-sub { color: var(--paper-faint); font-size: 12.5px; margin: 18px 0 0; letter-spacing: .04em; }

/* 网盘按钮：整站最需要被点击的东西，视觉权重最高。
   网盘名本身就是按钮 —— 不再有「标签 + 打开」两段式：一个不带信息的
   「打开」按钮只增加一次阅读成本，不增加任何信息。 */
.pans { display: flex; flex-wrap: wrap; gap: 10px; }
.pan-btn {
  background: var(--c); color: #fff;
  display: inline-flex; align-items: center;
  padding: 11px 24px; border-radius: 3px;
  font-size: 14px; letter-spacing: .06em;
  border: 1px solid transparent;
  text-decoration: none;
  transition: filter .18s var(--ease), transform .18s var(--ease);
}
.pan-btn:hover { filter: brightness(1.18); transform: translateY(-1px); color: #fff; }
.pans-note {
  color: var(--paper-faint); font-size: 12px;
  letter-spacing: .04em; margin: 12px 0 0;
}

.block { margin: 30px 0; }
.block h2 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 400; letter-spacing: .22em;
  color: var(--paper-dim);
  margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.desc { color: var(--paper-dim); margin: 0; white-space: pre-wrap; line-height: 1.9; }
/* 富文本：段落自己会分段，但 pre-wrap 仍要留 —— 库里大量简介是导入的纯文本，
   里面的换行靠它，没有它整段会塌成一行。 */
.desc > *:first-child { margin-top: 0; }
.desc > *:last-child { margin-bottom: 0; }
.desc p { margin: 0 0 .85em; }
.desc ul, .desc ol { margin: .3em 0 .85em; padding-left: 1.4em; }
.desc li { margin: .18em 0; }
.desc blockquote {
  margin: .3em 0 .85em; padding: .1em 0 .1em 1em;
  border-left: 2px solid var(--rule); color: var(--paper-faint);
}
.desc pre {
  background: var(--ink-raise); border: 1px solid var(--rule);
  padding: 10px 12px; border-radius: 3px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre; /* 代码块内不按 pre-wrap 折行 —— 折了代码就没法读了 */
}
.desc code { font-family: var(--font-mono); font-size: .92em; color: var(--amber); }
.desc pre code { color: var(--paper-dim); font-size: inherit; }
.desc a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }
.desc a:hover { color: var(--amber-hot); }
.desc h3, .desc h4, .desc h5 {
  font-family: var(--font-display); font-weight: 400;
  color: var(--paper); letter-spacing: .1em; margin: .9em 0 .5em;
}
.desc h3 { font-size: 17px; } .desc h4 { font-size: 15px; } .desc h5 { font-size: 14px; }
.desc hr { border: 0; border-top: 1px solid var(--rule); margin: 1em 0; }

/* 合集目录：9900 个剧名无封面，只能文字列表 —— 但可以排得像片目 */
.agg-list {
  columns: 3; column-gap: 30px; margin: 0; padding-left: 22px;
  font-size: 14px; line-height: 2.15;
}
.agg-list li { break-inside: avoid; }
.agg-list a { color: var(--paper-dim); }
.agg-list a::marker { color: var(--amber-deep); font-family: var(--font-mono); font-size: 12px; }
.agg-list a:hover { color: var(--amber); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--ink-raise); border: 1px solid var(--rule);
  color: var(--paper-dim); padding: 4px 12px;
  border-radius: 999px; font-size: 12.5px;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.tag:hover { color: var(--amber); border-color: var(--amber-deep); }

/* ═══════════════ 分页 / 提示 ═══════════════ */
.pager {
  display: flex; gap: 22px; align-items: center; justify-content: center;
  margin: 36px 0; font-size: 14px;
}
.pager a { color: var(--paper-dim); padding: 6px 16px; border: 1px solid var(--rule); border-radius: 999px; }
.pager a:hover { color: var(--amber); border-color: var(--amber-deep); }
.pager-pos { color: var(--paper-faint); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em; }

.empty { color: var(--paper-faint); padding: 48px 0; text-align: center; letter-spacing: .06em; }
.hint { color: var(--paper-faint); font-size: 12.5px; }
.active-filter {
  background: var(--ink-raise); border-left: 2px solid var(--amber);
  padding: 9px 14px; border-radius: 0 3px 3px 0; font-size: 13px;
}
.alert {
  background: var(--ink-raise); border-left: 2px solid var(--amber);
  padding: 11px 16px; border-radius: 0 3px 3px 0; color: var(--paper-dim);
}
.alert-err { border-left-color: var(--danger); color: #e8b7a8; }
.errors pre { white-space: pre-wrap; font-size: 12px; color: var(--paper-dim); }

/* ══════════════════════════════════════════════════════════════
   后台：放映室控制台
   ══════════════════════════════════════════════════════════════
   和公开页面同源，但更像仪表盘而不是内容站：

   · 数字一律等宽 + 表格数字对齐 —— 统计值要能竖着扫
   · 标签小字距展开，模仿面板丝印
   · 分区标题带一条延伸到右边缘的细线，像仪表盘上的分组线
   · 危险动作（初始密码、拒收、校验失败）只用一个暖红，不滥用颜色
   · 面板不圆角 —— 设备面板是方的
*/

.console-tabs {
  display: flex; align-items: center; gap: 2px;
  margin: 0 0 30px; padding: 0 0 1px;
  border-bottom: 1px solid var(--rule);
}
.console-tabs a {
  padding: 9px 18px 8px;
  color: var(--paper-faint);
  text-decoration: none;
  font-size: 12px; letter-spacing: .16em;
  border: 1px solid transparent; border-bottom: none;
  position: relative; top: 1px;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.console-tabs a:hover { color: var(--paper-dim); background: var(--ink-raise); }
.console-tabs a.on {
  color: var(--amber);
  background: var(--ink-raise);
  border-color: var(--rule);
}
/* 弹性占位，把「退出」推到最右 */
.console-tabs-sp { flex: 1; }
.inline { display: inline; }
.console-tabs .ghost {
  background: none; border: 1px solid var(--rule);
  color: var(--paper-faint); padding: 5px 14px;
  font-size: 12px; letter-spacing: .1em; cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.console-tabs .ghost:hover { color: var(--danger); border-color: var(--danger); }

/* ── 登录闸口：整个页面就一个输入框，所以给它舞台 ── */
.gate {
  max-width: 400px;
  margin: 12vh auto 0;
  padding: 40px 36px 34px;
  background: var(--ink-raise);
  border: 1px solid var(--rule);
  /* 顶部一道极窄的琥珀光，像放映机指示灯 */
  box-shadow: 0 -1px 0 0 var(--amber-deep), 0 30px 70px -40px #000;
}
.gate-kicker {
  margin: 0 0 6px;
  font-size: 11px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--amber-deep);
}
.gate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px; font-weight: 500; line-height: 1.05;
  letter-spacing: .06em;
}
.gate-sub { margin: 8px 0 26px; color: var(--paper-faint); font-size: 13px; }
.gate-form { display: flex; flex-direction: column; gap: 10px; }
.gate-form label {
  font-size: 11px; letter-spacing: .2em; color: var(--paper-faint);
}
.gate-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* ≥16px：iOS Safari 聚焦时不会自动放大页面 */
  letter-spacing: .3em;
}
.gate-form button {
  margin-top: 6px; padding: 12px;
  font-size: 13px; letter-spacing: .22em;
}
.gate-hint {
  margin: 22px 0 0; padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; color: var(--paper-faint); line-height: 1.8;
}
.gate-hint code {
  font-family: var(--font-mono); color: var(--amber);
  background: var(--ink-lift); padding: 2px 7px; border-radius: 2px;
}

/* ── 面板：方正、带分组线 ── */
.panel {
  margin: 0 0 18px;
  padding: 22px 24px 24px;
  background: var(--ink-raise);
  border: 1px solid var(--rule);
}
.panel > h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  font-size: 12px; font-weight: 500; letter-spacing: .3em;
  color: var(--paper-dim); text-transform: uppercase;
}
/* 标题后面那条延伸到右边缘的细线 */
.panel > h2::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--rule), transparent);
}
.count-chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0;
  color: var(--amber); background: var(--ink-lift);
  padding: 2px 7px; border-radius: 2px; order: 3;
}

/* ── 初始密码警告：整站唯一允许「喊」的地方 ── */
.caution {
  margin: 0 0 22px;
  padding: 22px 24px 24px;
  background: color-mix(in srgb, var(--danger) 7%, var(--ink-raise));
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--rule));
}
.caution-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.caution-mark {
  flex: none;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  background: var(--danger); color: #17110d;
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  line-height: 1;
}
.caution h2 {
  margin: 0 0 4px;
  font-size: 14px; font-weight: 600; letter-spacing: .1em; color: var(--danger);
}
.caution p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--paper-dim); }
.caution code {
  font-family: var(--font-mono); color: var(--amber);
  background: var(--ink-lift); padding: 1px 6px; border-radius: 2px;
}

/* ── 表单 ── */
.pwform { margin: 0; }
.pwform-row {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
}
.pwform-row .field { flex: 1 1 170px; min-width: 0; }
.pwform-row button { flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-size: 11px; letter-spacing: .16em; color: var(--paper-faint);
}
.field label code { font-family: var(--font-mono); letter-spacing: 0; color: var(--paper-dim); }
.uploadform { max-width: 620px; }
.uploadform .field { margin-bottom: 12px; }
.checkline {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 4px 0 10px; font-size: 13px; color: var(--paper-dim); line-height: 1.6;
}
.checkline input { margin-top: 3px; }

/* ── 统计：等宽数字 + 表格数字对齐 ── */
.statgrid {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 1px; padding: 0; margin: 0 0 18px;
  background: var(--rule); border: 1px solid var(--rule);
}
.statgrid li {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--ink-raise); padding: 16px 18px;
}
.statgrid b {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 26px; line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'zero' 1;
}
.statgrid span {
  font-size: 11px; letter-spacing: .18em; color: var(--paper-faint);
}
/* 有下架行时才亮红 —— 平时全是 0，不该抢注意力 */
.statgrid .stat-warn b { color: var(--danger); }

/* ── 分类分布：横条而不是数字列表，一眼看出头部分布 ── */
.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.bar-list li { display: grid; grid-template-columns: 5.5em 1fr 3.5em; gap: 12px; align-items: center; }
.bar-name { font-size: 13px; color: var(--paper-dim); }
.bar-track { height: 6px; background: var(--ink-lift); overflow: hidden; }
.bar-track i {
  display: block; height: 100%; width: var(--w);
  background: linear-gradient(to right, var(--amber-deep), var(--amber));
}
.bar-n {
  font-family: var(--font-mono); font-size: 12px; color: var(--paper-dim);
  text-align: right; font-variant-numeric: tabular-nums;
}

/* ── 表格 ── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left; padding: 9px 12px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.table th {
  color: var(--paper-faint); font-weight: 400;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  border-bottom-color: var(--rule);
  white-space: nowrap;
}
.table tbody tr:hover td { background: var(--ink-lift); }
.table .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--paper-dim); }
.table .num { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .ellipsis {
  max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.table .tick { width: 34px; }
.table .tick input { width: auto; }
.table .row-bad td { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.table .err-cell { color: var(--danger); font-size: 12px; }

/* ═══════════════ 页脚 ═══════════════ */
.foot { border-top: 1px solid var(--rule); margin-top: 64px; padding: 30px 0 46px; }
.disclaim { max-width: 820px; line-height: 1.85; color: var(--paper-faint); font-size: 12.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 0; font-size: 12.5px; }
.foot-links a { color: var(--paper-faint); letter-spacing: .06em; }
.foot-links a:hover { color: var(--amber); }
.foot-count { margin: 10px 0 0; color: var(--paper-faint); font-size: 12px; font-family: var(--font-mono); }

/* ═══════════════ 响应式 ═══════════════ */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .detail-media { max-width: 208px; }
  .agg-list { columns: 2; }
  .topnav { display: none; }
  .hero { padding: 48px 0 30px; }
  /* 窄屏放不下「两行 × 每行若干列」，退回按内容宽度换行 —— 均分列宽会把
     「擦边短剧」这种长标签压出省略号，而标签被截断就点不准了。
     width:100% 不是可选的：不给宽度它会收缩成 min-content，
     而标签都是 nowrap，min-content 就是「最宽的那一个」—— 于是每个标签独占一行，
     12 个标签变成 12 行。 */
  .hot-tags { flex-direction: column; align-items: center; gap: 8px; }
  .hot-tags-lead { padding-top: 0; }
  .hot-tags-grid {
    width: 100%;
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    justify-items: center;
  }
  .hot-tag { width: auto; max-width: 100%; }
  .section-head { flex-wrap: wrap; }
  .section-note { margin-left: 0; text-align: left; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
  .card-title { font-size: 12.5px; }
}
@media (max-width: 560px) {
  .agg-list { columns: 1; }
  .hero h1 { letter-spacing: .18em; text-indent: .18em; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
}

/* ═══════════════ 无障碍：尊重减少动效 ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover .card-media { transform: none; }
  .card:hover .card-media img { transform: none; }
}

/* ══════════════════════════════════════════════════════════════
   下载记录页 / 详情页事实块
   ══════════════════════════════════════════════════════════════ */

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1px;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.statgrid li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: var(--paper);
}
.statgrid b {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.statgrid span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--paper-faint);
}

.download-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.download-filters a {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.78rem;
  color: var(--paper-dim);
  text-decoration: none;
}
.download-filters a:hover { border-color: var(--amber); color: var(--amber); }
.download-filters a.on {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  font-weight: 600;
}

.download-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.download-search input[type='text'] { flex: 1; }

.download-table { table-layout: fixed; }
.download-table th:nth-child(1) { width: 8.5rem; }
.download-table th:nth-child(3) { width: 5.5rem; }
.download-table th:nth-child(5) { width: 8rem; }
.download-table th:nth-child(6) { width: 10rem; }
.download-table th:nth-child(7) { width: 5.5rem; }

.dl-title { font-weight: 600; }
.url-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 校验失败的行：这是「有人在扫」的唯一视觉锚点，必须一眼看到 */
.row-bad { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.row-bad td { color: var(--danger); }

.checkline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--paper-dim);
  cursor: pointer;
}
.checkline input { width: auto; }

.hint {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--paper-faint);
}

/* ══════════════════════════════════════════════════════════════
   详情页 · 档案卡
   ─────────────────────────────────────────────────────────────
   放在海报正下方，占据「左栏底部」这块最容易空着的位置。形制取自
   **电影海报背面的资料条**：年份大而右对齐，下方是带分隔线的细行，
   等宽数字对齐到同一根竖线 —— 扫一眼就能比大小与日期。

   之前的版本是一块 `color-mix(paper 60%)` 的浅色底 + 深色字。在一个
   暖调墨黑的页面里，那是个刺眼的白补丁，看着像贴错了的截图；而改成
   深色底之后 dt/dd 又几乎同色，「标签」比「值」还弱 —— 现在三者的
   对比度是明确分级的：标签最弱、值最实、强调只在年份与分类上。
   ══════════════════════════════════════════════════════════════ */

.detail-card {
  margin-top: 14px;
  border: 1px solid var(--rule);
  background: var(--ink-raise);
  /* 左边一道琥珀细边：与卡片其余边框一起读成「贴在版面上的一个标签」，
     而不是又一块浮起来的方块 */
  border-left: 2px solid var(--amber-deep);
}

/* 年份：这个页最值得扫一眼的事实 —— 它决定这是不是你找的那一部 */
.detail-card-year {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.3em;
  margin: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rule-soft);
}
.detail-card-year-n {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.detail-card-year-u {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--paper-faint);
}

.detail-facts { margin: 0; padding: 4px 16px 2px; }
.detail-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.detail-facts > div:last-child { border-bottom: 0; }
.detail-facts dt {
  color: var(--paper-faint);
  font-size: 11.5px;
  letter-spacing: .18em;
  white-space: nowrap;
}
.detail-facts dd {
  margin: 0;
  color: var(--paper-dim);
  font-size: 13px;
  text-align: right;
  min-width: 0;
}

/* 分类是这一块里唯一的可点项 —— 做成胶囊而不是裸链，
   好让人一眼认出「这里能点进去」 */
.fact-pill {
  display: inline-block;
  background: var(--ink-lift);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--amber);
  padding: 2px 11px;
  font-size: 12px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.fact-pill:hover { border-color: var(--amber-deep); color: var(--amber-hot); }

/* 来源：这一块最次要的信息，压到最小 —— 它对访客没有决策价值 */
.detail-card-foot {
  margin: 0;
  padding: 8px 16px 11px;
  border-top: 1px solid var(--rule-soft);
  color: var(--paper-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 后台入口只在页脚，且弱化 —— 它是运维路径，不是访客导航 */
.foot-admin {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}
.foot-admin a {
  color: var(--paper-faint);
  text-decoration: none;
  margin-right: 1.1rem;
}
.foot-admin a:hover { color: var(--amber); }


.pruneform {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.pruneform .checkline { margin: 0; }
.pruneform button {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  color: var(--paper-dim);
  font-size: 0.8rem;
  cursor: pointer;
}
.pruneform button:hover { border-color: var(--danger); color: var(--danger); }

/* 热门标签配置表单 */
.hotform { margin-top: 0.9rem; }
.hotform-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hotform-row .hint { margin-top: 0; }
.hotform input[type='text'] { width: 100%; max-width: 520px; }

/* 文件选择器：原生那个 "Choose File / No file chosen" 是整套设计里唯一的
   系统控件，样式和面板完全对不上。只重画按钮，文字交给浏览器。 */
.field input[type='file'] {
  display: flex; align-items: center; gap: 10px;
  padding: 0; height: auto;
  background: none; border: none;
  color: var(--paper-faint);
  font-size: 12.5px; font-family: var(--font-sans);
  line-height: 1.6;
}
.field input[type='file']::file-selector-button {
  flex: none;
  padding: 8px 16px;
  background: var(--ink-lift);
  border: 1px solid var(--rule);
  color: var(--paper-dim);
  font-family: var(--font-sans);
  font-size: 12px; letter-spacing: .12em;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.field input[type='file']::file-selector-button:hover {
  border-color: var(--amber); color: var(--amber);
}
