/* ============================================================================
   夜半社 · 创作者中心（console）
   ----------------------------------------------------------------------------
   这一份样式只作用于 /creator/* 这些页面，与主站（首页、剧本库、详情页的
   styles.css）完全隔离。两套视觉不共享变量、不共享类名 —— 主站是给玩家看的
   作品橱窗，这里是给作者和审核者用的工作台，本来就该长得不一样。

   下面的版式说明与配色决策原样来自设计稿（prototype/creator-console-portal）：
   顶栏（细带 + 白条）→ 居中 1200 → 二级标签条 → 左右两栏。

   与设计稿的唯一差别：删掉了底部「预览状态」那条原型专用的切换器，
   并补了一段窄屏回退（设计稿只有桌面尺寸，而创作者可能用手机看报告）。
   ========================================================================== */

:root {
  /* 底 / 面 */
  --page:     #F4F5F7;
  --card:     #FFFFFF;

  /* 线：三种粗细，各管一件事 */
  --line:     #E9EBEE;   /* 卡片外框 */
  --line-2:   #F0F2F4;   /* 行分隔（更淡，只做切分） */
  --line-3:   #D9DDE3;   /* 表单控件描边 */

  /* 字：三档灰，色相偏冷 */
  --ink:      #1D2129;
  --ink-2:    #4E5969;
  --ink-3:    #86909C;
  --ink-4:    #C9CDD4;

  /* 主色：印章红。整页占比 3%，但从不让位 */
  --brand:    #A82B24;
  --brand-2:  #8C201B;
  --brand-bg: #FBEFED;

  /* 状态：淡底 + 深字 + 细框。门户一律这种做法，不用圆点 */
  --ok-bg:#EAF5EC;   --ok-bd:#CBE4D1;   --ok-fg:#2F7A3E;
  --warn-bg:#FDF6E3; --warn-bd:#F0DFB0; --warn-fg:#8A6100;
  --bad-bg:#FCEDEC;  --bad-bd:#F0CBC8;  --bad-fg:#B3261E;
  --idle-bg:#F2F3F5; --idle-bd:#E5E6EB; --idle-fg:#4E5969;

  --mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  --w: 1200px;
}

* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--page); }
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Source Han Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; transition: color .12s; }
a:hover { color: var(--brand); }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ul, ol { padding-left: 0; list-style: none; }
button { font-family: inherit; }
table { border-collapse: collapse; }

.mono { font-family: var(--mono); font-size: .94em; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.sp { flex: 1; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: var(--w); max-width: calc(100% - 40px); margin: 0 auto; }


/* ══════════════════════════ 顶栏（两级） ══════════════════════════ */

/* 32px 的浅灰细带。没有它，白条会直接贴到浏览器边上，像一张被裁掉的图。 */
.utility {
  height: 32px;
  background: #FBFBFC;
  border-bottom: 1px solid #EFEFF1;
  font-size: 12px;
  color: var(--ink-3);
}
.utility .wrap { display: flex; align-items: center; height: 100%; }
.utility .l { letter-spacing: .02em; }
.utility .r { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.utility .r a { color: var(--ink-3); }
.utility .r a:hover { color: var(--brand); }
.utility .badge {
  display: inline-block; min-width: 15px; height: 15px; padding: 0 4px;
  margin-left: 3px; border-radius: 8px;
  background: var(--brand); color: #fff;
  font-size: 11px; line-height: 15px; text-align: center;
}

/* 白条：logo + 一级导航 + 右侧动作 */
.head { background: #fff; border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; align-items: center; height: 66px; }

.logo {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 21px; font-weight: 600; letter-spacing: .1em;
  color: var(--brand); line-height: 1;
}
.logo:hover { color: var(--brand); }
.logo span {
  font-size: 12px; font-weight: 400; letter-spacing: .04em;
  color: var(--ink-3);
}

.topnav { display: flex; margin-left: 40px; height: 66px; }
.topnav a {
  position: relative;
  display: block; height: 66px; line-height: 66px;
  padding: 0 4px; margin-right: 30px;
  font-size: 14px; color: var(--ink-2);
}
.topnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: transparent;
}
.topnav a:hover { color: var(--brand); }
.topnav a.on { color: var(--brand); font-weight: 500; }
.topnav a.on::after { background: var(--brand); }

.head .acts { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.head .acts .who { font-size: 13px; color: var(--ink-2); }
.head .acts .who b { color: var(--ink); font-weight: 500; }


/* ══════════════════════════ 页面骨架 ══════════════════════════ */

.page { padding: 12px 0 40px; }

.crumb {
  display: flex; align-items: center;
  font-size: 12px; color: var(--ink-3);
  padding: 6px 0 14px;
}
.crumb .dt { margin-left: auto; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { margin: 0 7px; color: var(--ink-4); }

/* 二级导航：一整条白带，选中项底下一条红。门户最常见的一级/二级结构。 */
.subnav {
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 10px; margin-bottom: 16px;
  overflow-x: auto;
}
.subnav a {
  position: relative; display: block;
  padding: 13px 16px; font-size: 14px; color: var(--ink-2);
  white-space: nowrap;
}
.subnav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0;
  height: 2px; background: transparent;
}
.subnav a:hover { color: var(--brand); }
.subnav a.on { color: var(--brand); font-weight: 500; }
.subnav a.on::after { background: var(--brand); }
.subnav .n {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  border-radius: 2px; background: var(--idle-bg);
  font-size: 11px; color: var(--ink-3); line-height: 16px;
}
.subnav a.on .n { background: var(--brand-bg); color: var(--brand); }
.subnav .role {
  margin-left: 6px; font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line-3); border-radius: 2px; padding: 0 4px;
  line-height: 15px; font-weight: 400;
}

/* 两栏。aside 只在概览与状态页出现 —— 列表页需要整幅宽度装表格。 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 16px;
  align-items: start;
}
.layout.full { grid-template-columns: minmax(0, 1fr); }
.layout.full .aside { display: none; }

.main { min-width: 0; }
.aside { min-width: 0; }


/* ══════════════════════════ 页头 ══════════════════════════ */

h1 {
  font-size: 20px; font-weight: 600; letter-spacing: .01em;
  line-height: 1.4;
}
.lead {
  margin: 6px 0 18px;
  font-size: 13px; color: var(--ink-3); line-height: 1.8;
  max-width: 820px;
}
.lead b { color: var(--ink-2); font-weight: 500; }
.lead code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }


/* ══════════════════════════ 卡片（.panel） ══════════════════════════ */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 16px;
}
.panel > header {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-2);
}
.panel > header h2 {
  position: relative;
  padding-left: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
/* 标题左侧那道红竖条。整站唯一允许"装饰"的地方，也是门户的签名。 */
.panel > header h2::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 14px; margin-top: -7px;
  background: var(--brand); border-radius: 1px;
}
.panel > header .hint { font-size: 12px; color: var(--ink-3); }
.panel > .body { padding: 18px 20px; }
.panel > .body.flush { padding: 0; }
.panel > .body + .body.flush { border-top: 1px solid var(--line-2); }

/* 表单不跟着主栏一起变宽。840px 的输入框看起来像一条横线，不像能打字的地方。 */
.panel > .body.narrow { max-width: 640px; }
.panel > .foot {
  padding: 10px 20px;
  border-top: 1px solid var(--line-2);
  background: #FCFCFD;
  border-radius: 0 0 4px 4px;
  font-size: 12px; color: var(--ink-3); line-height: 1.7;
}


/* ══════════════════════════ 表格 ══════════════════════════ */

.tbl { width: 100%; font-size: 13px; }
.tbl thead th {
  padding: 9px 16px;
  background: #FAFAFB;
  border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 400; color: var(--ink-3);
  text-align: left; white-space: nowrap;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FBFBFC; }

.tbl caption {
  caption-side: top;
  padding: 12px 16px 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-align: left;
  background: #FAFAFB;
  border-bottom: 1px solid var(--line);
}

.t-title { font-size: 13px; color: var(--ink); line-height: 1.5; }
.t-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
td.acts { white-space: nowrap; text-align: right; }
td.acts .btn + .btn { margin-left: 6px; }
.tbl .hot, td.hot { color: var(--brand); font-variant-numeric: tabular-nums; }

/* 可展开的行 */
.tbl tr.expandable { cursor: pointer; }
.tbl tr.detail-row > td {
  padding: 0;
  background: #FAFBFC;
  border-bottom: 1px solid var(--line);
}
.tbl tr.detail-row:hover > td { background: #FAFBFC; }

.exp { padding: 18px 20px; }
.exp-h {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line-3);
}
.exp-h b { font-size: 13px; font-weight: 600; }

.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty b { display: block; color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }


/* ══════════════════════════ 标签 ══════════════════════════ */

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 12px; line-height: 18px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag-ok   { background: var(--ok-bg);   border-color: var(--ok-bd);   color: var(--ok-fg); }
.tag-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.tag-bad  { background: var(--bad-bg);  border-color: var(--bad-bd);  color: var(--bad-fg); }
.tag-idle { background: var(--idle-bg); border-color: var(--idle-bd); color: var(--idle-fg); }
.tag.plain { padding: 0 5px; font-size: 11px; }


/* ══════════════════════════ 按钮 ══════════════════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 15px;
  border: 1px solid var(--line-3); border-radius: 3px;
  background: #fff; color: var(--ink);
  font-size: 13px; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: #B8BFC8; background: #FAFAFB; }
.btn:active { background: #F2F3F5; }

.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.primary:active { background: #7A1A16; }

.btn.danger { color: var(--bad-fg); border-color: #E8C4C0; background: #fff; }
.btn.danger:hover { background: #FDF3F2; border-color: #DCA9A4; }

.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--line-3); color: var(--ink); }
.btn:disabled { color: var(--ink-4); border-color: var(--line); background: #FAFAFB; cursor: not-allowed; }
.btn:disabled:hover { background: #FAFAFB; border-color: var(--line); }

.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-row .small { color: var(--ink-3); }


/* ══════════════════════════ 表单 ══════════════════════════ */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--brand); margin-left: 2px; }
.field .help { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

.input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-3); border-radius: 3px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: 13px;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 8px 10px; line-height: 1.7; resize: vertical; }
.input::placeholder { color: var(--ink-4); }
.input:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(168, 43, 36, .08);
}

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); }
.check input { margin: 4px 0 0; accent-color: var(--brand); }

.agreement {
  border: 1px solid var(--line); border-radius: 3px;
  background: #FAFBFC; padding: 14px 16px; margin: 4px 0 16px;
}
.agreement .hd {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.agreement ol { padding-left: 18px; list-style: decimal; }
.agreement li { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }

.steps-list { padding-left: 18px; list-style: decimal; }
.steps-list li { font-size: 13px; color: var(--ink-2); line-height: 2; }
.steps-list li b { color: var(--ink); font-weight: 500; }


/* ══════════════════════════ 键值表（.kv） ══════════════════════════ */

.kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 9px 12px;
  font-size: 13px;
}
.kv dt { color: var(--ink-3); }
.kv dd { color: var(--ink); line-height: 1.7; }
.kv dd.mono { font-size: 12px; }


/* ══════════════════════════ 提示条（.note） ══════════════════════════ */

.note {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 3px;
  background: #FAFBFC;
  font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.note > div { flex: 1; min-width: 0; }
.note b { color: var(--ink); font-weight: 500; }
.note.bad  { background: var(--bad-bg);  border-color: var(--bad-bd);  border-left-color: var(--bad-fg); }
.note.warn { background: var(--warn-bg); border-color: var(--warn-bd); border-left-color: #D8A200; }
.note.info { background: #F3F7FC; border-color: #D6E3F2; border-left-color: #3E6A9E; }


/* ══════════════════════════ 上传区 ══════════════════════════ */

.drop {
  border: 1px dashed var(--line-3);
  border-radius: 4px;
  background: #FCFCFD;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.drop:hover { border-color: var(--brand); background: var(--brand-bg); }
.drop .big { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.drop .sub { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }

.bar { height: 6px; background: #EDEFF2; border-radius: 3px; overflow: hidden; margin-top: 14px; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .12s linear; }


/* ══════════════════════════ 预检报告 ══════════════════════════ */

.issues li {
  display: flex; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.issues li:last-child { border-bottom: 0; }
.issues .lv {
  flex: none; height: 20px; padding: 0 6px;
  border-radius: 2px; border: 1px solid;
  font-size: 11px; line-height: 18px;
}
.issues .lv.err  { background: var(--bad-bg);  border-color: var(--bad-bd);  color: var(--bad-fg); }
.issues .lv.warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
/* 「通过」也要有一种样子：只有 err/warn 两种标签时，一条问题都没有的报告
   会顶着一个没有底色的裸标签，看起来像"没渲染完"。 */
.issues .lv.ok   { background: var(--ok-bg);   border-color: var(--ok-bd);   color: var(--ok-fg); }

/* 表单旁的一句错话（上传失败、字数超了之类）。单独一个类，因为
   .note 是整块提示，塞在字段下面会把表单撑开一大截。 */
.txt-bad { color: var(--bad-fg); }
.issues .code {
  font-family: var(--mono); font-size: 12px;
  color: var(--ink); background: #F2F3F5;
  padding: 1px 5px; border-radius: 2px; margin-right: 4px;
}
.issues .where { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-family: var(--mono); }


/* ══════════════════════════ 发布区 ══════════════════════════ */

.pub { border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.pub > .head {
  display: flex; align-items: center; gap: 8px;
  height: auto;
  padding: 10px 14px;
  background: #FAFAFB;
  border: 0; border-bottom: 1px solid var(--line);
}
.pub > .head b { font-size: 13px; font-weight: 600; }
.pub > .body { padding: 14px; }

/* 三步进度 */
.steps { display: flex; align-items: center; gap: 5px; margin-bottom: 12px; }
.step {
  padding: 2px 9px; border-radius: 2px;
  border: 1px solid var(--line-3); background: #fff;
  font-size: 12px; color: var(--ink-3);
}
.step.done { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.step.now  { background: var(--brand-bg); border-color: #EFCFCB; color: var(--brand); font-weight: 500; }
.steps .arrow { color: var(--ink-4); font-size: 12px; }

/* 三步操作指引 */
.pub ol.how {
  margin: 10px 0 14px; padding-left: 18px;
  list-style: decimal;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.95;
}
.pub ol.how code, .pub .note code {
  font-family: var(--mono); font-size: 11.5px;
  background: #F2F3F5; color: var(--ink);
  padding: 1px 5px; border-radius: 2px;
}

.sub-box {
  margin-top: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: 3px;
  background: #FAFBFC;
}
.sub-box .sub-h {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 6px;
}

.ver-list { border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.ver {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.ver:last-child { border-bottom: 0; }
.ver .nm { width: 150px; color: var(--ink); }
.ver .mt { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ver .btn { margin-left: auto; }
.ver.now { background: var(--brand-bg); }
.ver.now .nm { color: var(--brand); font-weight: 500; }
.ver.off .nm, .ver.off .mt { color: var(--ink-4); }

/* 分段控件（上架方式） */
.seg { display: inline-flex; border: 1px solid var(--line-3); border-radius: 3px; overflow: hidden; }
.seg button {
  height: 30px; padding: 0 12px;
  border: 0; border-right: 1px solid var(--line-3);
  background: #fff; color: var(--ink-2);
  font-size: 12px; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: #FAFAFB; }
.seg button.on { background: var(--brand); color: #fff; }


/* ══════════════════════════ 筛选条 ══════════════════════════ */

.filters {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
}
.filters .fl { font-size: 12px; color: var(--ink-3); margin-right: 8px; width: 52px; flex: none; }
.f {
  height: 26px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; color: var(--ink-2);
  font-size: 12px; cursor: pointer;
  transition: background-color .12s, color .12s;
}
.f:hover { background: #F5F6F8; }
.f.on { background: var(--brand-bg); border-color: #EFCFCB; color: var(--brand); }
.f .c { color: var(--ink-4); margin-left: 4px; font-variant-numeric: tabular-nums; }
.f.on .c { color: var(--brand); }


/* ══════════════════════════ 通知流 ══════════════════════════ */

.feed li {
  display: flex; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
}
.feed li:last-child { border-bottom: 0; }
.feed li:hover { background: #FBFBFC; }
.feed .dotc {
  flex: none; width: 6px; height: 6px; margin-top: 8px;
  border-radius: 50%; background: var(--ink-4);
}
.feed li.unread .dotc { background: var(--brand); }
.feed .cs { flex: 1; min-width: 0; }
.feed .ttl { font-size: 13px; color: var(--ink); }
.feed li.unread .ttl { font-weight: 500; }
.feed .bd {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.75;
  margin-top: 3px;
}
/* 正文按段落排（脚本把空行去掉了）。段距 5px —— 比行距略大一点就够分段，
   设计稿里一条通知是紧凑的，不该被空行撑成半屏。 */
.feed .bd p { margin: 0 0 5px; }
.feed .bd p:last-child { margin-bottom: 0; }
.feed .mt {
  display: flex; align-items: center; gap: 14px;
  margin-top: 6px; font-size: 12px; color: var(--ink-3);
}
.feed .mt a { color: var(--ink-3); }
.feed .mt a:hover { color: var(--brand); }


/* ══════════════════════════ 消息（两栏） ══════════════════════════ */

.mail {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.mail .list { border-right: 1px solid var(--line); background: #FCFCFD; }
.mail .list .hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
}
.mail .it { padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.mail .it:hover { background: #F7F8FA; }
.mail .it.on { background: var(--brand-bg); border-left: 3px solid var(--brand); padding-left: 13px; }
.mail .it .nm { font-size: 13px; font-weight: 500; color: var(--ink); }
.mail .it .pv {
  margin-top: 3px;
  font-size: 12px; color: var(--ink-3); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.mail .thread { display: flex; flex-direction: column; min-width: 0; }
.mail .thread > .hd {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.mail .thread > .hd b { font-size: 14px; font-weight: 600; }
.mail .thread > .bd { flex: 1; padding: 20px; overflow-y: auto; }

.msg { max-width: 620px; margin-bottom: 18px; }
.msg .who { font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.msg .txt {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #FAFBFC;
  font-size: 13px; color: var(--ink); line-height: 1.8;
}
.msg.from-me { margin-left: auto; }
.msg.from-me .who { text-align: right; }
.msg.from-me .txt {
  background: var(--brand-bg);
  border-color: #EFCFCB;
}

.mail .composer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: #FCFCFD;
}
.mail .composer textarea { margin-bottom: 10px; }
.mail .composer .row { display: flex; align-items: center; gap: 10px; }


/* ══════════════════════════ 统计（.stats） ══════════════════════════ */

/* 门户的数字区：不是"卡片网格"，是一张面被细线切开。
   卡片网格会长成一堵墙，切开的格子更像"表格的另一种形态"。 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-2);
}
.stats .stat {
  padding: 20px 16px 18px;
  text-align: center;
  border-right: 1px solid var(--line-2);
}
.stats .stat:last-child { border-right: 0; }
.stat .v {
  font-size: 30px; font-weight: 400; line-height: 1.1;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat .v small { font-size: 13px; margin-left: 2px; color: var(--ink-3); font-weight: 400; }
/* 数字为零就变灰 —— 一眼看出"哪些是真的有内容"。这一条 JS 加 class。 */
.stat .v.zero { color: var(--ink-4); }
.stat .k { margin-top: 6px; font-size: 13px; color: var(--ink-3); }

.period {
  margin-left: 8px; padding: 1px 8px;
  border-radius: 10px;
  background: var(--brand-bg); color: var(--brand);
  font-size: 12px; font-weight: 400;
}

/* 12 个计数用 3 列 × 2 行的密表，不用 12 个卡片 */
.statgrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line-2);
}
.statgrid .cell {
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.statgrid .cell:nth-child(6n) { border-right: 0; }
.statgrid .cell:nth-child(n+7) { border-bottom: 0; }
.statgrid .cell .v {
  font-size: 22px; font-weight: 400; line-height: 1.2;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.statgrid .cell .v.zero { color: var(--ink-4); }
.statgrid .cell .v.hot { color: var(--brand); }
.statgrid .cell .k { margin-top: 3px; font-size: 12px; color: var(--ink-3); }


/* ══════════════════════════ 流程条 ══════════════════════════ */

/* 用 grid 而不是 flex：flex 里四段虽然各 flex:1，但图标位置会被
   内容宽度带偏，四个图标对不齐一条竖线 —— 那种"差一点"最容易看出是拼的。 */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  padding: 16px 8px;
}
.flow .s {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; min-width: 0;
}
.flow .s .ic {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #F2F3F5; color: var(--ink-3);
}
.flow .s .ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.flow .s .tx { min-width: 0; }
.flow .s .tx b { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.flow .s .tx span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
/* 四步都做成红圈 = 四个一样的东西 = 另一种均匀。
   流程是说明，不是进度，所以图标一律中性；红色留给标题条和数字。 */
.flow .s .tx b { color: var(--ink); }
.flow .arw { color: var(--ink-4); font-size: 13px; padding: 0 2px; }


/* ══════════════════════════ 侧栏 ══════════════════════════ */

.aside .panel { margin-bottom: 16px; }
.aside .panel > header { padding: 12px 16px; }
.aside .panel > .body { padding: 16px; }

/* 账号卡 */
.me { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 18px; line-height: 1;
}
.me .nm { font-size: 14px; font-weight: 500; color: var(--ink); }
.me .rl { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.me .rl .vbadge {
  font-size: 11px; line-height: 15px; padding: 0 4px;
  border: 1px solid #E8C4C0; border-radius: 2px;
  color: var(--brand); background: #fff;
}
.me .rl span { font-size: 12px; color: var(--ink-3); }

.me-rows { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.me-rows div {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3); line-height: 2.1;
}
.me-rows div b { font-weight: 400; color: var(--ink-2); }

/* 快捷入口：3 列圆形图标。门户的固定配件，缺了这页会显得"空"。 */
.quick {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px 0;
}
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 9px 2px;
  font-size: 12px; color: var(--ink-2);
}
.quick a:hover { color: var(--brand); }
.quick i {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #F5F6F8; color: var(--ink-2);
  transition: background-color .12s, color .12s;
}
.quick a:hover i { background: var(--brand-bg); color: var(--brand); }
.quick svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 侧栏待办 */
.todo-list li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 12.5px; line-height: 1.65;
}
.todo-list li:last-child { border-bottom: 0; }
.todo-list .mk {
  flex: none; width: 5px; height: 5px; margin-top: 8px;
  border-radius: 50%; background: var(--ink-4);
}
.todo-list .mk.bad { background: var(--bad-fg); }
.todo-list .mk.warn { background: #D8A200; }
.todo-list a { color: var(--ink-2); }
.todo-list a:hover { color: var(--brand); }
.todo-list .at { display: block; font-size: 11.5px; color: var(--ink-4); margin-top: 1px; }

/* 浅红提示块（门户常见于侧栏底部） */
.tipbox {
  background: var(--brand-bg);
  border-radius: 3px;
  padding: 12px 14px;
  font-size: 12.5px; line-height: 1.75;
  color: #7C3B35;
}
.tipbox b { color: var(--brand-2); font-weight: 500; }
.tipbox a { color: var(--brand); }


/* ══════════════════════════ 公告条 ══════════════════════════ */

.notice-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  overflow: hidden;
}
.notice-bar .bdg {
  flex: none;
  font-size: 11px; line-height: 16px; padding: 0 5px;
  border: 1px solid #E8C4C0; border-radius: 2px;
  color: var(--brand); background: var(--brand-bg);
}
.notice-bar .tx { flex: 1; min-width: 0; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-bar .dt { flex: none; font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }


/* ══════════════════════════ 页脚 ══════════════════════════ */

.page-foot {
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3); line-height: 1.9;
}
.page-foot .sep { margin: 0 8px; color: var(--ink-4); }
.page-foot a { color: var(--ink-3); }
.page-foot a:hover { color: var(--brand); }
.page-foot .fine { margin-top: 4px; color: var(--ink-4); font-size: 11.5px; }


/* ══════════════════════════ 预览状态（原型专用） ══════════════════════════ */



/* ══════════════════════════ 详情/审核 小配件 ══════════════════════════ */

/* 审核概览的待办列表：左右结构，不用表格 */
.todo {
  padding: 0;
}
.todo > li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
}
.todo > li:last-child { border-bottom: 0; }
.todo > li:hover { background: #FBFBFC; }
.todo .flag { flex: none; }
.todo .tx { flex: 1; min-width: 0; }
.todo .tx .ttl { display: block; font-size: 13px; color: var(--ink); line-height: 1.5; }
.todo .tx .sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.todo .go { flex: none; }
.todo .tx > span { display: block; }


/* ══════════════════════════ 窄屏回退 ══════════════════════════
   设计稿只给桌面尺寸（1200 固定 + 40 边距）。创作者在手机上看预检报告是
   真实会发生的场景（报告是「刚才传的那个包有什么问题」，人们会用手机看），
   所以这里补一层：右栏落到正文下方、信箱与表格改成可横滚。

   只做「不塌」这一件事 —— 不为窄屏重新设计版式。桌面才是主场景，
   在小屏上再排一版等于维护两套视觉。 */

@media (max-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  /* 右栏在概览页是补充信息，落到正文之后；在窄屏上它不该先占掉一整屏 */
  .layout > .aside { order: 2; }
  .mail { grid-template-columns: minmax(0, 1fr); }
  /* 对话列表横向排一行，避免「通讯录占满一屏、正文要滚很远」 */
  .mail > .list { display: flex; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .mail > .list .hd { flex: none; border-bottom: 0; }
  .mail > .list .it { flex: none; width: 180px; border-bottom: 0; border-right: 1px solid var(--line-2); }
  /* 表格横滚而不是压扁：列被挤到 3 个字宽之后，数字就读不出来了 */
  .panel > .body.flush > .tbl,
  .panel > .body.flush > .statgrid { display: block; overflow-x: auto; }
  .utility .wrap { height: auto; padding: 6px 0; flex-wrap: wrap; gap: 8px; }
  .head .wrap { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .subnav { overflow-x: auto; }
  .subnav a { white-space: nowrap; }
}

/* ============================================================================
   投稿预览（sandbox iframe）
   ----------------------------------------------------------------------------
   为什么用 iframe 而不用"新窗口"：预览跑的是作者自己写的 HTML/JS，对平台来说
   是不可信代码。同源新窗口里它能读到创作者中心存在 localStorage 里的登录令牌
   ⇒ 账号可被接管。所以只能进 sandbox 且不给同源许可
   （js 那边有同样的注释，两处一起看）。代价是沙箱里 localStorage 会抛错，
   这一点写在下面那条 hint 里，别让作者以为是自己的代码坏了。

   宽度按手机比例给（390×780 上限）—— 站点轨在手机上就是竖屏体验，
   在宽屏里铺满反而不像它真实的样子。「放大」是给要看细节的人。
   ========================================================================== */
.pv-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 22, 20, .62);
}

.pv-box {
  display: flex;
  flex-direction: column;
  width: min(390px, 100%);
  height: min(780px, 92vh);
  background: var(--card);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
}

.pv-box.wide { width: min(1100px, 100%); }

.pv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  background: #FBFBFC;
}

.pv-name { font-weight: 600; color: var(--ink); }
.pv-entry { font-size: 12px; color: var(--ink-3); }
.pv-spacer { flex: 1; }

.pv-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #F5F3EF;
}

.pv-hint {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  background: #FBFBFC;
}
