/* 颜色、尺寸和动效取自设计稿的「控件标准」。间距只用 4 的倍数。 */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans.woff2") format("woff2");
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 这一套和下面的深色是全站的颜色变量。节点区域按节点主挑的底色重新套一整套（浅底用浅色那套、深底用深色那套）：
   浅色模式看底色本身（.nlook-light / .nlook-dark），深色模式看它的深色样子（.nlook-dk-*）；.nlook-pin-* 对置顶轮播（.npin）同理。
   见文件末尾「节点外观」。 */
:root, :root:not([data-theme="dark"]) :is(.nlook-light, .nlook-pin-light .npin), :root[data-theme="dark"] :is(.nlook-dk-light, .nlook-pin-dk-light .npin) {
  --bg: #FFFFFF; --ink: #0F1A1C; --body: #1A282D; --soft: #2A3C42; --muted: #576F76;
  --outline: #8BA2AD; --line: #DCE3E6; --thread: #B8C5CC; --fill: #E5EBEE; --surface: #F6F8F9;
  /* --outline-text 是用描边色写的字（占位、次要图标）；--hover 是菜单项、列表行悬停时的底；--seg-on 是分段开关选中的那一格。
     浅色下分别等于 --outline、--surface、--bg，深色下设计稿各给了单独的值。 */
  --outline-text: #8BA2AD; --hover: #F6F8F9; --seg-on: #FFFFFF;
  /* 右栏卡片的底：照设计稿是半透明的一层（不是实心的 --surface），节点设了基础色时透出底下的颜色。 */
  --panel: rgba(15, 26, 28, .035);
  --primary: #007A52; --primary-hover: #00573B; --primary-bg: #007A52; --on-primary: #FFFFFF;
  --signal: #FF9C38; --on-signal: #0B1F18; --signal-text: #A85400;
  --danger: #A33A00; --danger-bg: #FFEDE2;
  --night: #0B1F18; --on-night: #FFFFFF; --night-soft: #B9D8CB; --banner: #00573B;
  --level-bg: #FFF1DF; --level-fg: #6B3D00; --unread: #EEF7F2; --mark: #FFE2BF;
  --chip-on-bg: #0F1A1C; --chip-on-fg: #FFFFFF;
  /* 标签和用户标识：彩字往白色里调多少（深色底上才看得清）、浅色样式的底色浓度。 */
  --tg-lift: 0%; --tg-tint: 12%;
  --toast-bg: #0B1F18; --toast-fg: #FFFFFF; --toast-ok: #5CC79A; --toast-shadow: 0 8px 24px rgba(11, 31, 24, .3);
  --scrim: rgba(11, 31, 24, .55);
  --shadow-pop: 0 8px 28px rgba(15, 26, 28, .18), 0 0 0 1px var(--line);
  --shadow-modal: 0 16px 48px rgba(11, 31, 24, .3);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
/* 正文字体，按界面语言（<html lang>）挑，只用系统字体、不引外部字体。拉丁字母先用 IBM Plex Sans（只含基本拉丁，见上面的 unicode-range）。
   日文、韩文、繁体中文的汉字字形和简体不一样，各自的系统字体排在简体前面；泰文点名系统里的泰文字体；
   越南文、土耳其文的带调字母 Plex 没有，一个词里换两种字体很难看，整段用系统字体。 */
:root { --font: "IBM Plex Sans", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
:root:lang(zh-TW) { --font: "IBM Plex Sans", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, -apple-system, sans-serif; }
:root:lang(ja) { --font: "IBM Plex Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, -apple-system, sans-serif; }
:root:lang(ko) { --font: "IBM Plex Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, -apple-system, sans-serif; }
:root:lang(th) { --font: "IBM Plex Sans", "Noto Sans Thai", "Noto Sans Thai UI", "Leelawadee UI", Thonburi, Tahoma, system-ui, -apple-system, sans-serif; }
:root:is(:lang(vi), :lang(tr)) { --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
/* 深色取值照设计稿顶栏里那张深色对照表（中性的深灰，不带绿）：白底 #141618、Surface #1B1E21、Fill #272B2F、Line #30353A、
   Ink #E6E9EB、Muted #99A3A8、链接 #3FB98A；主按钮仍是 #007A52 底白字。对照表没列的（--body、--thread、--mark、--banner、遮罩、阴影）按相邻的两个色取中间。 */
:root[data-theme="dark"], :root:not([data-theme="dark"]) :is(.nlook-dark, .nlook-pin-dark .npin), :root[data-theme="dark"] :is(.nlook-dk-dark, .nlook-pin-dk-dark .npin) {
  --bg: #141618; --ink: #E6E9EB; --body: #D6DADD; --soft: #C4CACD; --muted: #99A3A8;
  --outline: #4A5056; --line: #30353A; --thread: #3A3F44; --fill: #272B2F; --surface: #1B1E21;
  --outline-text: #7D878D; --hover: #25292C; --seg-on: #3A3F44;
  /* 深色那一层用浅色叠：在深色底上和 --surface 差不多深。 */
  --panel: rgba(230, 233, 235, .04);
  --primary: #3FB98A; --primary-hover: #6FCFA8; --primary-bg: #007A52; --on-primary: #FFFFFF;
  --signal-text: #F0A860;
  --danger: #F28B5B; --danger-bg: #2F211D;
  --night: #22262A; --night-soft: #A9B3B8; --banner: #1C4735;
  --level-bg: #2E261D; --level-fg: #F2C9A8; --unread: #1F2724; --mark: #6B4A16;
  --chip-on-bg: #E6E9EB; --chip-on-fg: #141618;
  --tg-lift: 45%; --tg-tint: 24%;
  --toast-bg: #22262A; --toast-fg: #FFFFFF; --toast-ok: #5CC79A; --toast-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 0 1px var(--line);
  --scrim: rgba(0, 0, 0, .6);
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, .5), 0 0 0 1px var(--line);
  --shadow-modal: 0 16px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); }
h1, h2, h3, p, ol, ul { margin: 0; }
h1 { font-size: 18px; font-weight: 700; line-height: 1.4; }
h2 { font-size: 15px; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
small { font-size: 12px; color: var(--muted); }
hr { height: 1px; margin: 12px 0; border: 0; background: var(--line); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
:root, :root:not([data-theme="dark"]) :is(.nlook-light, .nlook-pin-light .npin), :root[data-theme="dark"] :is(.nlook-dk-light, .nlook-pin-dk-light .npin) { --focus-ring: 0 0 0 3px rgba(0, 122, 82, .14); }
:root[data-theme="dark"], :root:not([data-theme="dark"]) :is(.nlook-dark, .nlook-pin-dark .npin), :root[data-theme="dark"] :is(.nlook-dk-dark, .nlook-pin-dk-dark .npin) { --focus-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
:is(input, select, textarea):focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
/* 外框里套着一个没有边框的输入（聊天输入、回帖框、编辑器、带前缀的框、带图标的搜索框……）：焦点框画在外框上，
   里面的输入框不再画一圈。只看输入框有没有焦点，点外框里的按钮不算。新加这类控件就把外框加进这两条。
   外框那条的特异性固定在 (0,2,0)（列表套在 :where 里），各控件后面自己的写法（出错的红框、全屏编辑器去掉外框等）照常盖过它。 */
:where(.chat-compose, .chat-new-to, .replybox:not(:has(> .ed)), .prefixed, .nc-prefixed, .trade-amount, .tag-box, .acd-md, .search-box.scoped, .ns-search-field, .tl-search, .people-search, .game-stepper, .nlook-hex):focus-within:has(:where(input, textarea):focus-visible),
.ed:has(:where(.ed-source, .ed-rich):focus) { border-color: var(--primary); box-shadow: var(--focus-ring); }
:where(.chat-compose, .chat-new-to, .replybox:not(:has(> .ed)), .prefixed, .nc-prefixed, .trade-amount, .tag-box, .acd-md, .search-box.scoped, .ns-search-field, .tl-search, .people-search, .game-stepper, .nlook-hex) :is(input, textarea):focus-visible:focus,
.ed :where(.ed-source):focus-visible { outline: none; box-shadow: none; }
a, button, .btn, .pill, .chip, .iconbtn, .side-item, .menu-item { transition: background-color .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease, scale .12s ease, filter .18s ease; }
button:active, .btn:active, .pill:active, .chip:active, a.iconbtn:active, a.side-item:active, a.menu-item:active { scale: .95; }
/* 点不了的按钮按下去不该有反馈。 */
:is(button, .btn):disabled:active, .btn.off:active { scale: 1; }
/* 关闭按钮不缩放（按类名认，不靠中文的 aria-label：英文界面里它不是「关闭」）。 */
:is(.modal-head, .drawer-head, .drawer-panel-head, .confirm-head) .iconbtn:active { scale: 1; }
/* 像输入框的宽字段（下拉、日期、时间）按下不缩放：缩放中量到的尺寸会让弹出的列表比字段窄。胶囊样式的小下拉照旧缩放。 */
:is(.sel-button, .dp-trigger):active { scale: 1; }
.sel:has(> select:is(.pill, .outline, .ghost)) > .sel-button:active { scale: .95; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.i { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grow { flex: 1; }
.quiet { color: var(--muted); }
.small { font-size: 12px; }
.strong { color: var(--ink); font-weight: 700; }
.clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 节点名旁边的认证标记：蓝色是认证节点，金色是官方节点。跟着文字大小走，名字被截断时标记不跟着被截。 */
.node-verified { display: inline-flex; flex: none; margin-left: .2em; color: #0a84ff; vertical-align: -.14em; line-height: 1; }
.node-verified svg { width: 1em; height: 1em; }
.node-verified.is-official { color: #d4a017; }
:root[data-theme="dark"] .node-verified.is-official { color: #f0c04a; }
/* 放在 flex 容器里时抵掉容器的间距，标记紧跟着名字。 */
.side-item .node-verified { margin-left: -8px; }
.meta-who .node-verified { margin-left: -5px; }
.nodemark .node-verified { margin-left: -3px; }
.clip-mark { display: flex; min-width: 0; align-items: center; }
.only-narrow { display: none !important; }

/* 头像：用户和节点都是圆形，没有图片时显示首字。 */
.avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; color: #FFFFFF; font-weight: 700; line-height: 1; }

/* 按钮：高 44，全圆角。所有按钮都带 1px 的边（描边、开关型按钮换状态时不跳动），所以内边距比控件标准少写 1：
   主、次、危险按钮文字离边 18，描边按钮 17（1 + 16），文字按钮 12，开关型 19（1 + 18）。 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.btn:hover { filter: brightness(.95); color: var(--ink); }
.btn.primary { background: var(--primary-bg); color: var(--on-primary); }
.btn.outline { padding: 0 16px; background: var(--bg); border-color: var(--ink); }
.btn.ghost { background: transparent; padding: 0 14px; font-weight: 500; }
.btn.ghost:hover { background: var(--fill); filter: none; }
.btn.text { background: transparent; color: var(--primary); padding: 0 11px; }
.btn.text:hover { background: var(--hover); filter: none; }
.btn.text.flush { margin-left: -12px; font-size: 13px; color: var(--ink); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.block { display: flex; width: 100%; }
.btn.tall { height: 48px; border-radius: 24px; font-size: 15px; }
.btn.off, .btn:disabled { background: var(--fill); color: var(--muted); cursor: default; filter: none; }
.btn.off { opacity: .45; }
/* 开关型按钮：未选是实心，已选退成描边。 */
.btn.toggle { min-width: 84px; padding: 0 18px; font-size: 14px; background: var(--primary-bg); border-color: var(--primary-bg); color: var(--on-primary); }
.btn.toggle.on { background: var(--bg); border-color: var(--ink); color: var(--ink); }

.iconbtn { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--fill); color: var(--ink); }
.iconbtn.filled { background: var(--fill); }
.iconbtn.filled:hover { filter: brightness(.95); }
.iconbtn.square { border-radius: 8px; }
/* 顶栏的签到：一个日历加爱心的图标。今天还没签是醒目的颜色，签过了变淡。 */
.checkin-btn { color: var(--signal-text); }
.checkin-btn:hover { color: var(--signal-text); }
.checkin-btn[data-checked] { color: var(--muted); opacity: .7; }
.checkin-btn[data-checked]:hover { color: var(--muted); }
.count { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--bg); border-radius: 9px; background: var(--signal); color: var(--on-signal); font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; }
.count.inline { position: static; display: inline-block; margin-left: 6px; border: 0; line-height: 18px; }

.textbtn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 0; border-radius: 22px; background: transparent; color: inherit; font-size: 13px; font-weight: 700; }
.textbtn:hover { background: var(--fill); color: var(--ink); }
.textbtn.danger { color: var(--danger); }

/* 胶囊：帖子下方的操作。 */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; }
.pill:hover { filter: brightness(.95); color: var(--ink); }
.pill.static { height: 36px; padding: 0 14px; border-radius: 18px; }
.pill.static:hover { filter: none; }
.pill.save.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pill.save.on .i { fill: currentColor; }

/* 投票：帖子用胶囊，回复用行内版。 */
.votes { display: inline-flex; align-items: center; }
.votes .vote { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.votes .score { min-width: 28px; text-align: center; font-size: 13px; font-weight: 700; }
.votes.pill { gap: 0; padding: 0; }
.votes.pill .vote:hover { background: rgba(15, 26, 28, .1); }
.votes.pill[data-vote="1"] { background: var(--primary-bg); color: var(--on-primary); }
.votes.pill[data-vote="-1"] { background: var(--signal); color: var(--on-signal); }
.votes.inline { color: var(--muted); }
.votes.inline .i { width: 18px; height: 18px; }
.votes.inline .score { min-width: 20px; }
.votes.inline .vote:hover { background: var(--fill); }
.votes.inline[data-vote="1"] .up, .votes.inline[data-vote="1"] .score { color: var(--primary); }
.votes.inline[data-vote="-1"] .down, .votes.inline[data-vote="-1"] .score { color: var(--signal-text); }
/* 设计稿：投过的那个箭头填实，一眼看出投的是哪边。 */
.votes[data-vote="1"] .vote.up svg, .votes[data-vote="-1"] .vote.down svg { fill: currentColor; }

/* 筛选胶囊、下划线标签、分段开关。 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.pad { padding: 8px 16px 12px; }
.chip { display: inline-flex; flex: none; align-items: center; height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip:hover { filter: brightness(.95); color: var(--ink); }
.chip.on { background: var(--chip-on-bg); color: var(--chip-on-fg); filter: none; }
.chip.quiet { background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.chip.quiet:hover { background: var(--hover); filter: none; }
.chip.quiet.on { background: var(--fill); color: var(--ink); font-weight: 700; }
.main-head .chips { gap: 4px; }
.tabs { display: flex; gap: 4px; }
.tabs.line { margin: 8px 0 16px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.tab:hover { color: var(--ink); }
.tab.on { border-bottom-color: var(--primary); color: var(--ink); }
/* 分段开关（控件标准）：轨道总高 44——Fill 底、内边距 3、圆角 22；选项高 38、圆角 19、左右 14、字 13。
   选中的那一格用 --seg-on 做底、深字 700、轻投影；其余透明、Muted 500，悬停时字变深、垫一层半透明的底。
   只有图标的选项（.view-toggle）是 38 的圆。小号（.small，卡片里用）轨道 32、选项 28。 */
.segmented { display: flex; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.segmented :is(button, a) { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.segmented :is(button, a):hover { background: color-mix(in srgb, var(--seg-on) 60%, transparent); color: var(--ink); }
.segmented :is(button[aria-pressed="true"], button[aria-selected="true"], a[aria-current]), .segmented :is(button[aria-pressed="true"], button[aria-selected="true"], a[aria-current]):hover { background: var(--seg-on); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.segmented.view-toggle button { width: 38px; padding: 0; border-radius: 50%; }
.segmented:is(.small, .promo-seg) { padding: 2px; border-radius: 16px; }
.segmented:is(.small, .promo-seg) :is(button, a) { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px; }

/* 标识：帖子分类、等级、话题标签、节点标记。 */
.tagpill { display: inline-block; padding: 1px 10px; border-radius: 12px; background: var(--fill); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
a.tagpill:hover { filter: brightness(.95); color: var(--ink); }
.levelpill { display: inline-block; padding: 2px 10px; border-radius: 12px; background: var(--level-bg); color: var(--level-fg); font-size: 12px; font-weight: 700; }
.count-pill { display: inline-block; padding: 1px 10px; border-radius: 12px; background: var(--signal); color: var(--on-signal); font-size: 12px; font-weight: 700; }
.op-mark { color: var(--primary); font-weight: 700; }
.hashtags { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: 12px; }
.hashtags a { color: var(--muted); }
.hashtags a:hover { color: var(--ink); }
.hashtags.roomy { gap: 6px 12px; margin-top: 8px; font-size: 13px; }
.nodemark { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); font-weight: 500; }
.nodemark .sq { width: 10px; height: 10px; border-radius: 2px; }

/* 顶栏。 */
.top { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-height: 57px; padding: 6px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; min-height: 44px; }
.logo img { display: block; height: 38px; width: auto; }
/* 顶栏三段：标志、搜索、操作。两边等宽地伸缩，搜索框就始终在正中间。 */
.top-brand { display: flex; flex: 1 1 0; min-width: max-content; align-items: center; gap: 8px; }
.top-search { position: relative; flex: 0 1 560px; min-width: 200px; }
.top-search.open { z-index: 2; }
.search-field { position: relative; z-index: 1; }
.search-mark { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 50%; pointer-events: none; }
.top-search input[type="search"] { display: block; padding: 0 46px; border: 0; font-size: 15px; text-align: left; }
.top-search input[type="search"]:placeholder-shown { text-align: center; }
.top-search.open input[type="search"] { background: var(--surface); text-align: left; }
.top-search input[type="search"]:focus { background: var(--surface); }
/* 只搜当前节点时，灰底胶囊换到外面这一层：左边站标，再是节点小块，输入框接在后面。 */
.search-box { display: contents; }
.search-box.scoped { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px 0 44px; border-radius: 22px; background: var(--fill); }
.top-search.open .search-box.scoped, .search-box.scoped:focus-within { background: var(--surface); }
.top-search .search-box.scoped input[type="search"], .top-search .search-box.scoped input[type="search"]:focus { flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 2px; border: 0; background: transparent; box-shadow: none; text-align: left; }
.search-scope { display: inline-flex; flex: none; max-width: 50%; height: 30px; align-items: center; gap: 6px; padding: 0 8px 0 5px; border: 0; border-radius: 15px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .12); }
.search-scope > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-scope .i { flex: none; width: 14px; height: 14px; color: var(--muted); }
.search-scope:hover .i { color: var(--ink); }
/* 面板垫在输入框后面，比它四周各大出一圈，看起来是输入框自己展开了。 */
.search-panel { position: absolute; z-index: 0; top: -6px; right: -8px; left: -8px; padding-top: 56px; overflow: hidden; border-radius: 24px; background: var(--bg); box-shadow: var(--shadow-pop); animation: fade .16s ease-out; }
.search-scroll { max-height: min(560px, calc(100vh - 96px)); overflow-y: auto; padding-bottom: 8px; border-top: 1px solid var(--line); }
.search-label { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.search-label button { height: 28px; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.search-label button:hover { color: var(--ink); }
.search-row { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 14px; padding: 0 16px; border: 0; background: transparent; color: var(--ink); font-size: 15px; text-align: left; }
.search-row:hover, .search-row:focus-visible { background: var(--hover); color: var(--ink); }
.search-row .i { flex: none; width: 20px; height: 20px; }
.search-row.go { margin-top: 8px; font-weight: 700; }
.search-row.tall { padding-top: 6px; padding-bottom: 6px; }
.search-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-two { display: flex; flex-direction: column; line-height: 1.4; }
.search-two small { color: var(--muted); font-size: 13px; }
.search-recent { display: flex; align-items: center; }
.search-recent .search-row { flex: 1; min-width: 0; }
.search-recent .avatar { font-size: 11px; }
.search-remove { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: 6px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.search-remove:hover { background: var(--fill); color: var(--ink); }
.search-remove .i { width: 18px; height: 18px; }
.search-away { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: default; }
.search-away[hidden], .search-panel[hidden] { display: none; }
/* 搜索结果里的节点和用户。 */
input[type="search"] { width: 100%; height: 44px; padding: 0 20px; border: 2px solid transparent; border-radius: 22px; background: var(--fill); outline: none; }
input[type="search"]:focus { border-color: var(--primary); background: var(--bg); }
.top-actions { display: flex; flex: 1 1 0; min-width: max-content; align-items: center; justify-content: flex-end; gap: 4px; }
.top-actions .btn.primary, .top-actions .btn:not(.ghost):not(.primary) { margin-left: 4px; }

/* 菜单：浮层，点菜单外关闭。 */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--fill); }
/* 关着的菜单面板不参与排版：手机上面板是贴底的整宽浮层，里面的内容不能在关着时把页面撑宽。 */
details.menu:not([open]) > .menu-panel { display: none; }
.menu-panel { position: absolute; z-index: 40; right: 0; top: 50px; width: 220px; padding: 6px; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-pop); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.menu-panel.wide { width: 280px; padding: 8px; border-radius: 16px; }
.menu-panel hr { margin: 6px 0; }
.menu-group + .menu-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.menu-item { display: flex; width: 100%; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 400; text-align: left; }
.menu-item:hover { background: var(--hover); color: var(--ink); }
.menu-item.danger { color: var(--danger); font-weight: 700; }
.menu-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.menu-user { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--ink); line-height: 1.35; }
.menu-user:hover { background: var(--hover); color: var(--ink); }
.menu-user strong, .menu-user small { display: block; }
/* 账号菜单、手机抽屉头上的一块（设计稿 Header / MobileTop）：底是自己的封面（上面压一层由浅到深的暗色，字才看得清），
   没设封面用深绿渐变加两个淡圆；深浅模式都一样（封面图上的字总是白的）。 */
.acct-head { position: relative; padding: 16px 16px 14px; overflow: hidden; background: linear-gradient(120deg, #0B1F18 0%, #0E5A47 55%, #2F8F6B 100%); color: #FDFDFD; }
.acct-head::before, .acct-head::after { position: absolute; border-radius: 50%; content: ""; pointer-events: none; }
.acct-head::before { top: -50px; right: -28px; width: 150px; height: 150px; background: rgba(255, 255, 255, .1); }
.acct-head::after { right: 70px; bottom: -44px; width: 90px; height: 90px; background: rgba(255, 255, 255, .07); }
.acct-head.has-cover { background: linear-gradient(180deg, rgba(11, 31, 24, .35), rgba(11, 31, 24, .72)), var(--acct-cover) center / cover no-repeat, #0B1F18; }
.acct-head.has-cover::before, .acct-head.has-cover::after { display: none; }
.acct-row { position: relative; display: flex; align-items: center; gap: 12px; }
.acct-face { display: flex; flex: none; border-radius: 50%; }
.acct-face .avatar { box-sizing: border-box; width: 48px; height: 48px; border: 2px solid #FDFDFD; font-size: 19px; }
.acct-names { flex: 1; min-width: 0; line-height: 1.35; }
.acct-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-name { min-width: 0; overflow: hidden; color: #FDFDFD; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.acct-sub { display: block; overflow: hidden; color: #B9D8CB; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.acct-name:hover, .acct-sub:hover { color: #FFFFFF; }
.acct-sub .tier-ico { margin: -2px 2px 0 0; }
.acct-chip { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 6px; border: 1px dashed rgba(253, 253, 253, .6); border-radius: 13px; background: transparent; color: #FDFDFD; font: inherit; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.acct-chip .i { width: 16px; height: 16px; }
.acct-chip.on { padding: 0 6px; border-color: transparent; background: rgba(253, 253, 253, .2); }
.acct-chip:hover { background: rgba(253, 253, 253, .28); }
.acct-chip-emo { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 15px; line-height: 1; }
.acct-chip img { display: block; width: 18px; height: 18px; object-fit: contain; }
.acct-line { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; margin-top: 10px; padding: 4px 10px; border: 0; border-radius: 4px 12px 12px 12px; background: rgba(253, 253, 253, .14); color: #FDFDFD; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.acct-line:hover { background: rgba(253, 253, 253, .22); }
.acct-line-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-line-meta { display: inline-flex; flex: none; align-items: center; gap: 5px; color: #B9D8CB; font-size: 12px; }
.acct-paused { display: inline-flex; }
.acct-paused .i { width: 14px; height: 14px; }
/* 「我的交易」里等自己处理的笔数：橙色的数字。 */
.acct-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 10px; background: #F07A1A; color: #FFFFFF; font-size: 11px; font-weight: 700; }
.acct-panel .acct-head { margin: -8px -8px 6px; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.switch { display: flex; align-items: center; width: 40px; height: 24px; margin-left: auto; padding: 2px; border-radius: 12px; background: var(--outline); }
.switch::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; transition: translate .18s ease; }
[aria-checked="true"] > .switch { background: var(--primary-bg); }
[aria-checked="true"] > .switch::after { translate: 16px 0; }

/* 整体布局：左侧导航，中间内容，右侧信息栏。 */
/* 设计稿的页面是铺满整个窗口宽度的：左边导航固定 220px，其余的都给内容，不设最大宽度、不居中。 */
.shell { display: grid; grid-template-columns: 220px 1px minmax(0, 1fr); gap: 0 24px; padding: 0 16px; transition: grid-template-columns .24s ease; }
/* 侧边栏和内容之间的分隔线，上面是收起、展开侧边栏的按钮。 */
.rail { align-self: stretch; width: 1px; background: var(--line); }
.rail-toggle { position: sticky; z-index: 2; top: 67px; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin: 10px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.rail-toggle span { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 26, 28, .12); }
.rail-toggle:hover span { background: var(--hover); }
.side { transition: opacity .18s ease, visibility .24s; }
[data-nav="closed"] .shell { grid-template-columns: 0 1px minmax(0, 1fr); }
[data-nav="closed"] .side { overflow: hidden; visibility: hidden; opacity: 0; }
/* 页面的宽度。只有列帖子的页面（首页、全部主题、节点、自定义信息流）和帖子页会铺满整个窗口，而且只在读者选了紧凑视图的时候；
   这几页的外层带 .fluid。别的页面一律限在 1124 以内（760 的主栏 + 24 + 340 的侧栏）、居中，不管选的是哪种视图。
   用 :where 是为了不抬高优先级：个别页面自己定了更窄的宽度（说明页 860），照它自己的来。 */
.page > :where(main, .cols, .node-page) { max-width: 1124px; margin-inline: auto; }
:root[data-feed="compact"] .page > .fluid { max-width: none; }
@media (min-width: 1000px) {
  /* 两栏的阅读版式：主栏 760，读起来不用横着扫整屏。带 .fluid 的在紧凑视图下不用它，铺满。 */
  .cols.reading { grid-template-columns: minmax(0, 760px) minmax(280px, 340px); justify-content: center; }
  :root[data-feed="compact"]:not([data-reader]) .cols.reading.fluid { grid-template-columns: minmax(0, 1fr) 300px; justify-content: normal; }
}
/* 列表模式下的全宽（设计稿「全宽」，2026-11-23）：读者在首页选了列表视图（根上的 data-list-view，theme.js 设），带侧栏的桌面页面
   跟着变全宽——页面里限宽的那几层都带 data-wide，限宽一律去掉，铺满正文区域。卡片视图下各页照旧限宽。
   带右栏的（.cols）改成弹性排：多出来的宽度几乎全给主栏，右栏 280 起、最宽 340，和首页一样。帖子页的阅读模式不受影响。
   长文和表单页（说明、条款、发帖、创建节点、新人指引等）不带 data-wide，保持原宽度。
   节点页的两栏在横幅、节点头下面（.node-page > .cols），一样弹性排（设计稿「节点」2026-11-23）。 */
@media (min-width: 861px) {
  :root[data-list-view]:not([data-reader]) .page [data-wide] { max-width: none; }
}
@media (min-width: 1000px) {
  :root[data-list-view]:not([data-reader]) :is(.page, .page > .node-page) > .cols[data-wide] { display: flex; justify-content: center; }
  :root[data-list-view]:not([data-reader]) :is(.page, .page > .node-page) > .cols[data-wide] > .main { flex: 999 1 480px; min-width: 0; max-width: none; }
  :root[data-list-view]:not([data-reader]) :is(.page, .page > .node-page) > .cols[data-wide] > .aside { flex: 1 1 280px; min-width: 0; max-width: 340px; }
}
.rail-toggle .i { width: 16px; height: 16px; }
.side { position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto; padding: 16px 0; }
/* 宽屏上侧边栏的盒子一直伸到中间那条分割线，浏览器自己的滚动条不要；滚动条是自己画的一根 4 宽的滑块（.side-thumb，
   位置和长短由 app.js 跟着滚动算），贴着分割线的左边，鼠标在侧边栏上才显出来，移开就隐去。
   自己画是因为各家浏览器在悬停变化时重画原生滚动条的表现不一样，这样行为是确定的。 */
@media (min-width: 861px) {
  .side { margin-right: -24px; padding-right: 24px; overflow-x: hidden; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  /* 收起的时候不留那 24：侧边栏的宽度是实实在在的 0。 */
  [data-nav="closed"] .side { margin-right: 0; padding-right: 0; }
  /* 这一格不占高度，粘在侧边栏可见区域的顶上，滑块以它为基准摆。 */
  .side-scroll { position: sticky; z-index: 1; top: 0; height: 0; pointer-events: none; }
  .side-thumb { position: absolute; top: 0; right: -24px; width: 4px; border-radius: 2px; background: var(--thread); opacity: 0; transition: opacity .18s ease, background-color .18s ease; pointer-events: auto; touch-action: none; }
  /* 滑块只有 4 宽，抓它的地方往左多给一些。 */
  .side-thumb::before { position: absolute; inset: 0 0 0 -10px; content: ""; }
  .side:hover .side-thumb, .side:has(:focus-visible) .side-thumb, .side-thumb.dragging { opacity: 1; }
  .side-thumb:hover, .side-thumb.dragging { background: var(--outline); }
}
@media (max-width: 860px) { .side-scroll { display: none; } }
.side-items { display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; width: 100%; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.side-item:hover { background: var(--hover); color: var(--ink); }
.side-item[aria-current="page"] { background: var(--fill); font-weight: 700; }
/* 已归档的节点：成员关系还在，侧栏里标灰。 */
.side-item.side-archived { color: var(--muted); }
.side-item.side-archived .avatar { opacity: .5; }
.side-label { padding: 0 12px 4px; font-size: 12px; color: var(--muted); }
.page { min-width: 0; padding: 12px 0 40px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px 24px; align-items: start; }
.main { min-width: 0; }
.main.padded { padding: 4px 16px 0; }
.main.solo { display: flex; flex-direction: column; gap: 16px; padding: 12px 0 0; }
.main.form-page { padding: 12px 0 0; }
.main-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.main-head h1 { margin: 0 12px 0 16px; }
.main-head.plain { padding: 0 16px; border-bottom: 0; }
.main-head.plain h1 { margin-left: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
h1.big { font-size: 24px; line-height: 1.4; }
.aside { display: flex; flex-direction: column; gap: 16px; }
.aside .panel { background: var(--panel); }
.more { display: flex; justify-content: center; padding: 16px; }
.more.start { justify-content: flex-start; padding: 12px 0 0; }
.list-nav { gap: 12px; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty.big h1 { margin-bottom: 4px; font-size: 24px; color: var(--ink); }
.empty.big p { margin-bottom: 16px; }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--surface); color: var(--soft); }
.alert { padding: 10px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); }

/* 右侧信息栏的卡片。 */
.panel { padding: 16px; border-radius: 16px; background: var(--surface); }
.panel p { margin-top: 6px; color: var(--soft); }
.panel > .btn.block { margin-top: 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-banner { height: 72px; background: var(--banner); }
.panel-body { padding: 16px; }
.panel-label { margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--muted); }
.panel > .panel-label:first-child { margin-top: 0; }
.panel-list { display: flex; flex-direction: column; margin-top: 4px; }
.panel-node { display: flex; align-items: center; gap: 12px; min-height: 52px; color: var(--ink); line-height: 1.35; }
.panel-node > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.panel-user { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-row .strong { font-size: 15px; }
.panel-topic { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 700; line-height: 1.45; }
.panel-topic:last-child { padding-bottom: 0; border-bottom: 0; }
.panel-topic small { display: block; font-weight: 400; }
/* 主题页回复列表后面的「相关主题」（设计稿 Post / Mobile-Post，宽屏窄屏都有）：来源标签、换一批、一批 5 条。
   --rel-line 是条目之间的细线（比 --line 浅一档），--rel-meta 是作者、时间那一行的字，--rel-hot 是回帖数多的醒目色。 */
.related-topics { --rel-line: #EDF1F3; --rel-meta: #7C9099; --rel-hot: #D9480F; --rel-ok-bg: #E3F4EC;
  margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
:root[data-theme="dark"] .related-topics { --rel-line: color-mix(in srgb, var(--line) 70%, var(--bg)); --rel-meta: color-mix(in srgb, var(--muted) 60%, var(--outline-text));
  --rel-hot: #F28B5B; --rel-ok-bg: color-mix(in srgb, var(--primary) 18%, var(--bg)); }
.rel-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px; }
.rel-head h2 { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.rel-note { font-size: 12px; color: var(--outline-text); }
.rel-shuffle { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 36px; margin-right: -6px; padding: 0 12px; border: 0; border-radius: 18px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.rel-shuffle:hover { background: var(--hover); color: var(--ink); }
.rel-shuffle .i { width: 16px; height: 16px; stroke-width: 2; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.rel-tabs { display: flex; gap: 8px; padding: 0 16px 10px 18px; overflow-x: auto; scrollbar-width: none; }
.rel-tabs::-webkit-scrollbar { display: none; }
.rel-tabs [role=tab] { flex: none; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.rel-tabs [role=tab]:hover { color: var(--ink); }
.rel-tabs [role=tab][aria-selected=true] { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); }
.rel-list { margin: 0; padding: 0; border-top: 1px solid var(--rel-line); list-style: none; }
.rel-list > li + li { border-top: 1px solid var(--rel-line); }
.rel-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: inherit; transition: background .15s; }
.rel-item:hover { background: var(--hover); color: inherit; }
.rel-item:hover .rel-title { text-decoration: underline; text-decoration-color: var(--outline); text-underline-offset: 3px; }
.rel-node { display: flex; flex: none; align-self: flex-start; margin-top: 2px; }
.rel-node .avatar { border-radius: 10px; }
.rel-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.rel-title { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rel-item.read .rel-title { color: var(--rel-meta); font-weight: 500; }
.rel-solved { display: inline-flex; align-items: center; gap: 2px; height: 18px; margin-right: 6px; padding: 0 6px 0 4px; border-radius: 9px;
  background: var(--rel-ok-bg); color: var(--primary); font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 2px; }
.rel-solved .i { width: 11px; height: 11px; stroke-width: 3; }
.rel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--rel-meta); font-size: 12px; line-height: 1.5; }
.rel-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-by b { color: var(--muted); font-weight: 700; }
.rel-stat { display: inline-flex; align-items: center; gap: 3px; }
.rel-stat .i { width: 14px; height: 14px; stroke-width: 2; }
.rel-stat + .rel-stat { color: var(--muted); font-weight: 500; }
.rel-stat.hot { color: var(--rel-hot); font-weight: 700; }
.rel-stat.none { color: var(--outline-text); }
.rel-read { color: var(--outline-text); }
.rel-thumb { flex: none; width: 88px; height: 60px; overflow: hidden; border-radius: 10px; background: var(--fill); }
.rel-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rel-more { display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; border-top: 1px solid var(--rel-line);
  color: var(--primary); font-size: 13px; font-weight: 700; }
.rel-more .i { width: 16px; height: 16px; stroke-width: 2; }
@media (max-width: 860px) {
  /* 手机：通栏，上面一道和首帖下面一样的 8px 分隔带，没有外框。 */
  .related-topics { margin: 20px -16px 0; padding-top: 4px; border: 0; border-top: 8px solid var(--surface); border-radius: 0; }
  .rel-head { padding: 12px 16px 8px; }
  .rel-head h2 { font-size: 16px; }
  .rel-tabs { padding-left: 16px; }
  .rel-item { padding: 12px 16px; }
  .rel-title { font-size: 14px; }
  .rel-thumb { width: 64px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .rel-shuffle .i, .rel-item { transition: none; } }
.stats { display: grid; gap: 12px 8px; margin-top: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.stats:last-child { padding-bottom: 0; border-bottom: 0; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats b { display: block; font-size: 16px; }
.stats small { display: block; }
.stats + p { margin-top: 12px; }
.rules { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-left: 20px; color: var(--soft); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hot { color: var(--signal-text); }

/* 信息流里的一条帖子。 */
.card-post, .snippet, .review { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.meta-who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }
.meta-quiet { color: var(--muted); }
.meta-quiet:hover, .meta-who:hover { color: var(--primary); }
.card-title { display: block; margin-top: 6px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.card-title:hover { color: var(--primary); }
.card-excerpt { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--soft); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
/* 紧凑视图：只留标题和操作。 */
/* 卡片上的媒体。卡片视图：首帖的应用、视频、图片摆在标题下面；紧凑视图：只在右边留一张小图。 */
.card-main { display: flex; align-items: flex-start; gap: 16px; }
.card-text { flex: 1; min-width: 0; }
.card-thumb { position: relative; display: none; flex: none; width: 112px; height: 84px; margin-top: 6px; overflow: hidden; border-radius: 12px; background: var(--fill); }
.card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-count { position: absolute; top: 12px; right: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(11, 31, 24, .8); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1.5; pointer-events: none; }
.card-thumb .media-count { top: auto; right: 6px; bottom: 6px; padding: 0 6px; border-radius: 8px; font-size: 11px; }
.card-media { margin-top: 10px; }
.card-media .app-embed, .card-media .video-embed { margin: 0; }
/* 卡片上的视频下面那行原链接不要。 */
.card-media .video-link { display: none; }
/* 卡片上的图片轮播（设计稿「组件 · 图片轮播」）：图片按比例整张放进框里，框比图宽出来的地方垫一层这张图的模糊底；
   多张时左右有按钮、右上角是「第几张 / 共几张」、下面一排圆点，可以按住拖。行内样式给的是宽高比和图出来之前垫的主色。 */
.cr { position: relative; display: block; width: 100%; max-height: 520px; box-sizing: border-box; overflow: hidden; isolation: isolate; border-radius: 16px; background: #111517; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cr:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cr img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.cr-blur { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cr-blur img { position: absolute; top: -12%; left: -12%; width: 124%; max-width: none; height: 124%; object-fit: cover; filter: blur(32px) saturate(1.25); opacity: 0; transition: opacity .6s ease; will-change: opacity; }
.cr-blur img.on { opacity: 1; }
.cr-blur::after { position: absolute; inset: 0; background: rgba(15, 26, 28, .16); content: ""; }
.cr-link { position: absolute; inset: 0; display: block; overflow: hidden; }
.cr.multi .cr-link { cursor: grab; }
.cr-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.22, .72, .2, 1); will-change: transform; }
.cr-slide { display: flex; flex: 0 0 100%; min-width: 0; height: 100%; align-items: center; justify-content: center; opacity: .5; scale: .96; transition: opacity .5s ease, scale .5s cubic-bezier(.22, .72, .2, 1); }
.cr-slide.on { opacity: 1; scale: 1; }
.cr-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cr-arrow { position: absolute; z-index: 2; top: 50%; display: flex; width: 40px; height: 40px; margin-top: -20px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 26, 28, .68); color: #FFFFFF; cursor: pointer; transition: opacity .25s ease, background-color .2s ease, scale .2s cubic-bezier(.2, .8, .2, 1); }
.cr-arrow.prev { left: 16px; }
.cr-arrow.next { right: 16px; }
.cr-arrow:hover { background: rgba(15, 26, 28, .92); scale: 1.08; }
.cr-arrow:active { scale: .94; }
.cr-arrow:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.cr-arrow.off { opacity: 0; pointer-events: none; }
.cr-count { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(15, 26, 28, .68); color: #FFFFFF; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.5; opacity: .92; pointer-events: none; transition: opacity .25s ease; }
.cr:hover .cr-count { opacity: 1; }
.cr-dots { position: absolute; z-index: 2; bottom: 12px; left: 50%; padding: 7px 9px; border-radius: 12px; background: rgba(15, 26, 28, .6); translate: -50% 0; pointer-events: none; }
/* 照设计稿：窗口最多露出五个圆点的宽度、6px 高、四边都裁。当前那个放大 1.25 倍后被削掉上下（贴边时连那一边），
   成了上下平、两头圆的小胶囊——这个样子就是设计稿要的，不要改成不裁或者椭圆。 */
.cr-dots-win { display: block; width: calc(min(var(--cr-n, 5), 5) * 12px - 6px); height: 6px; overflow: hidden; transition: width .3s ease; }
.cr-dots-row { display: flex; gap: 6px; transition: transform .4s cubic-bezier(.22, .72, .2, 1); }
.cr-dots i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #FDFDFD; opacity: .5; transition: opacity .3s ease, scale .3s cubic-bezier(.22, .72, .2, 1); }
.cr-dots i.edge { scale: .6; }
.cr-dots i.on { opacity: 1; scale: 1.25; }
.cr-dots i.out { opacity: 0; scale: .2; }
/* 有图片或者视频的卡片，摘要让位给它们。 */
:root:not([data-feed="compact"]) .card-post:is([data-media="images"], [data-media="video"]) .card-excerpt { display: none; }
/* 手机上没有「紧凑视图」（设计稿手机只有卡片）：桌面上选了紧凑，带到手机上也照卡片画。 */
@media (min-width: 861px) {
  :root[data-feed="compact"] .card-media { display: none; }
  :root[data-feed="compact"] .card-thumb { display: block; }
  :root[data-feed="compact"] .card-post { padding: 8px 16px; }
  :root[data-feed="compact"] .card-post .card-excerpt, :root[data-feed="compact"] .card-post .hashtags { display: none; }
  :root[data-feed="compact"] .card-post .card-title { margin-top: 2px; font-size: 15px; }
  :root[data-feed="compact"] .card-post .actions { margin-top: 4px; }
  /* 紧凑视图里应用不摆出来，它的「全屏」「举报」也不要。 */
  :root[data-feed="compact"] .card-post .app-tool { display: none; }
}
@media (max-width: 860px) {
  :root[data-feed="compact"] .card-post:is([data-media="images"], [data-media="video"]) .card-excerpt { display: none; }
}
/* 宽屏上的紧凑视图（照设计稿首页）：左边一张 64×48 的小图（文字帖是一个文档图标），右边三行——
   「n/节点 · 时间 · u/作者」、标题（最多两行）、32 高的小操作（投票、「N 条评论」、分享）。没有摘要。 */
.card-thumb.text { align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--outline-text); }
.card-thumb.text .i { width: 20px; height: 20px; }
.compact-only { display: none; }
@media (min-width: 861px) {
  :root[data-feed="compact"] .card-post { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 12px; align-items: start; padding: 12px 16px 8px; }
  :root[data-feed="compact"] .card-post :is(.card-main, .card-text) { display: contents; }
  :root[data-feed="compact"] .card-post .card-thumb { display: flex; grid-column: 1; grid-row: 1 / 5; width: 64px; height: 48px; margin: 2px 0 0; border-radius: 8px; }
  :root[data-feed="compact"] .card-post .card-thumb .media-count { right: 3px; bottom: 3px; padding: 0 5px; font-size: 10px; }
  :root[data-feed="compact"] .card-post .meta { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 6px; overflow: hidden; white-space: nowrap; }
  :root[data-feed="compact"] .card-post .meta-who { gap: 6px; }
  /* 紧凑视图顶行的顺序是「n/节点 · u/作者 · 时间」（卡片视图是节点、时间、作者）：把作者那一段挪到时间前面。 */
  :root[data-feed="compact"] .card-post .meta > .meta-by { order: 1; gap: 6px; }
  :root[data-feed="compact"] .card-post .meta:has(> .meta-by) > :is(span[aria-hidden], span[title]) { order: 2; }
  :root[data-feed="compact"] .card-post .meta:has(> .meta-by) > :is(.kind-tag, .tagpill) { order: 3; }
  :root[data-feed="compact"] .card-post .meta-who .avatar { width: 18px !important; height: 18px !important; font-size: 10px !important; }
  /* 标题下面可能多出来的一行（成人内容的「点击显示」、类别）也放在右边一栏，不掉进左边 64 宽的缩略图那一栏。 */
  :root[data-feed="compact"] .card-post :is(.adult-reveal, .kind-tag) { grid-column: 2; justify-self: start; }
  /* 折叠着的成人内容不露缩略图。 */
  :root[data-feed="compact"] .card-post.adult-fold .card-thumb { visibility: hidden; }
  :root[data-feed="compact"] .card-post .adult-reveal { min-height: 0; height: 28px; margin: 2px 0 0; padding: 0 8px 0 0; }
  :root[data-feed="compact"] .card-post .card-title { display: -webkit-box; grid-column: 2; grid-row: 2; margin: 2px 0 0; overflow: hidden; font-size: 15px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  :root[data-feed="compact"] .card-post .actions { grid-column: 2; grid-row: 4; gap: 2px; margin: 4px 0 0 -4px; }
  :root[data-feed="compact"] .card-post .votes.pill { height: 32px; border-radius: 16px; }
  :root[data-feed="compact"] .card-post .votes.pill .vote { width: 32px; height: 32px; }
  :root[data-feed="compact"] .card-post .votes.pill .i { width: 16px; height: 16px; stroke-width: 2.2; }
  :root[data-feed="compact"] .card-post .votes.pill .score { min-width: 20px; font-size: 12px; }
  :root[data-feed="compact"] .card-post .actions > :is(a.pill, .share, .pill.static) { height: 32px; gap: 6px; padding: 0 10px; border-radius: 16px; background: transparent; color: var(--muted); font-size: 12px; }
  :root[data-feed="compact"] .card-post .actions > :is(a.pill, .share):hover { background: var(--fill); color: var(--ink); filter: none; }
  :root[data-feed="compact"] .card-post .actions > :is(a.pill, .share) .i { width: 16px; height: 16px; }
  :root[data-feed="compact"] .card-post .compact-only { display: inline; }
}

/* 全部主题：表格。 */
.ttable { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 56px 72px 64px 80px; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.trow.head { padding: 8px 16px; border-bottom-width: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.trow .c { text-align: center; }
.trow .r { text-align: right; }
.trow-title { display: block; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.trow-title:hover { color: var(--primary); }
.trow-title .tagpill { margin-left: 8px; }
.trow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.trow-meta a:not(.nodemark) { color: var(--muted); }
.trow-author { display: flex; }
.trow-replies { display: flex; align-items: center; justify-content: center; height: 44px; color: var(--ink); font-size: 15px; font-weight: 700; }
.trow-replies .i { display: none; }
.trow-replies.hot { color: var(--signal-text); }
.trow-views { text-align: center; color: var(--muted); }
.trow-time { text-align: right; color: var(--muted); font-size: 13px; }

/* 节点广场。 */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rank { flex: none; width: 22px; text-align: center; font-weight: 700; }
.rank-main { display: flex; flex: 1; min-width: 0; flex-direction: column; line-height: 1.4; }
.rank-main a { color: var(--ink); font-weight: 700; }
.rank-main .desc { overflow: hidden; color: var(--soft); text-overflow: ellipsis; white-space: nowrap; }

/* 节点页。 */
.node-banner { height: 112px; margin-top: 4px; border-radius: 12px; overflow: hidden; background: var(--banner); }
.node-banner.has-image { height: 160px; }
.node-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 节点的主色：只用在底色和实心按钮上，文字颜色不动，这样深浅两种主题下都读得清。 */
.tinted .node-banner { background: color-mix(in srgb, var(--key) 70%, #0B1F18); }
.tinted .btn.key { border-color: var(--key); background: var(--key); color: var(--key-ink); }
.tinted .chip.on { background: var(--key); color: var(--key-ink); }
.node-notice { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-weight: 500; }
.node-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: -36px; padding: 0 16px; }
.node-head > .avatar, .nlook-face > .avatar { border: 4px solid var(--bg); }
.node-head h1 { flex: 1 1 200px; min-width: 0; font-size: 30px; line-height: 1.5; overflow-wrap: anywhere; }
.node-head h1 .tagpill { margin-left: 10px; vertical-align: middle; }
.node-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.node-head + .cols, .node-lead + .cols { margin-top: 20px; }

/* 帖子详情页。 */
.post-top { display: flex; align-items: center; gap: 8px; }
.post-top-meta { flex: 1; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.post-top-meta > a { color: var(--soft); }
.post-title { margin-top: 12px; font-size: 24px; overflow-wrap: anywhere; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.op { margin-top: 12px; }
.op .actions { margin-top: 16px; }
.placeholder { padding: 10px 16px; border-radius: 8px; background: var(--surface); color: var(--muted); }
.comments { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; scroll-margin-top: 72px; }
.comments-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.replybox { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid var(--outline); border-radius: 22px; }
.replybox textarea { flex: 1 1 200px; min-width: 0; min-height: 44px; max-height: 50vh; padding: 10px 12px; border: 0; background: transparent; resize: none; outline: none; }
.replybox.inline { flex-direction: column; align-items: stretch; margin: 0 0 8px; border-radius: 16px; animation: pop .18s ease-out; }
.replybox.inline textarea { flex: none; padding: 6px 8px; }
.replybox-bar { display: flex; align-items: center; gap: 8px; }
.replies { display: flex; flex-direction: column; gap: 4px; padding: 0; list-style: none; }
.reply { display: flex; gap: 10px; scroll-margin-top: 72px; }
.reply[hidden] { display: none; }
.reply-col { position: relative; display: flex; flex: none; width: 32px; flex-direction: column; align-items: center; }
.comments-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.segmented.labeled .i { width: 20px; height: 20px; }
/* 嵌套视图：每一层缩进一格，竖线穿过后面还有回帖的层，拐弯接到头像上。 */
.replies.nested { gap: 0; }
.replies.nested .reply { gap: 0; }
.replies.nested .reply[data-depth="0"], .replies.nested .action-line { margin-top: 16px; }
.replies.nested .reply-body { padding-left: 10px; }
.gut { position: relative; flex: none; width: 32px; }
.vline, .own-line { position: absolute; left: 15px; top: 0; bottom: 0; width: 1px; background: var(--thread); }
.own-line { top: 32px; }
.elbow { position: absolute; top: 0; left: 15px; width: 17px; height: 16px; border-bottom: 1px solid var(--thread); border-left: 1px solid var(--thread); border-bottom-left-radius: 12px; }
.vline.hot, .own-line.hot { background: var(--soft); }
.elbow.hot { border-color: var(--soft); }
.fold-toggle { position: relative; z-index: 1; display: flex; flex: none; width: 32px; height: 44px; align-items: center; justify-content: center; margin-top: auto; padding: 0; border: 0; background: transparent; color: var(--ink); }
.fold-toggle .i { width: 18px; height: 18px; }
.fold-toggle circle { fill: var(--bg); }
.unfold { min-height: 32px; color: var(--ink); font-size: 12px; font-weight: 700; }
.unfold .i { width: 18px; height: 18px; }
.reply.folded .prose, .reply.folded .reply-actions, .reply.folded .reply-quote, .reply.folded .own-line, .reply.folded .fold-toggle, .reply.folded .replybox { display: none; }
.reply:target .reply-body { border-radius: 8px; background: var(--unread); box-shadow: 0 0 0 8px var(--unread); }
.reply-avatar { display: flex; flex: none; align-self: flex-start; }
.reply-body { flex: 1; min-width: 0; }
.reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 32px; font-size: 12px; color: var(--muted); }
.reply-head .author { color: var(--ink); font-weight: 700; }
/* 作者亮出来的用户组：一个带组颜色的小圆点和组名，点了去组的页面。 */
.groupmark { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
.groupmark > i { width: 8px; height: 8px; border-radius: 50%; background: var(--group, var(--muted)); }
.groupmark:hover { color: var(--ink); text-decoration: underline; }
.profile-groups { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.floor { color: var(--muted); font-family: var(--mono); }
.reply-quote { display: block; margin: 2px 0 4px; padding: 6px 12px; overflow: hidden; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.reply-quote:hover { color: var(--muted); filter: brightness(.97); }
.reply-quote strong { color: var(--soft); }
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; margin-left: -12px; color: var(--muted); }
.action-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--surface); color: var(--soft); font-size: 13px; scroll-margin-top: 72px; }
.action-line .i { width: 16px; height: 16px; color: var(--muted); }
.reply.collapsed .prose { display: none; }
.fold-note { margin-left: -12px; color: var(--muted); }
.reply:not(.collapsed) .fold-note { display: none; }
/* 分页（设计稿「控件标准」）：左边是第几页，右边是上一页、页码、下一页，三样等高 44；到头的按钮降到 45% 透明度。 */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pager.plain { padding: 16px; border-top: 0; }
.pager-note { color: var(--muted); font-size: 12px; }
.pager-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager .btn { padding: 0 15px; }
.pager-page { color: var(--muted); font-size: 13px; }
.pager-page strong { color: var(--ink); }
.pager-nums { display: flex; flex-wrap: wrap; gap: 6px; }
/* 嵌套视图底下的「加载更多」：滚到这里脚本就接着取下一批。 */
.load-more { display: flex; justify-content: center; padding: 16px 0 4px; }
.load-more.done { color: var(--muted); font-size: 13px; }
/* personal: 帖子页按第二版设计稿——顶上「更多操作」、嵌套的「另外 N 条回复」「继续这个对话」、手机顶栏、底部评论条和「写回复」面板。 */
.topic-menu > summary { flex: none; }
.post-top-meta > a.author { font-weight: 400; }
.op-body[hidden] { display: none; }
.adult-cover { display: flex; width: 100%; align-items: center; gap: 12px; margin-top: 4px; padding: 16px; border: 1px dashed var(--outline); border-radius: 12px; background: var(--surface); color: var(--soft); font-size: 14px; text-align: left; cursor: pointer; }
.adult-cover .i { flex: none; width: 24px; height: 24px; color: var(--warn-ink); }
.adult-cover strong { display: block; color: var(--ink); }
.adult-cover:hover { border-color: var(--soft); }
/* 回帖的 NSFW 遮罩：比首帖的小一号；回帖被折叠（低分、屏蔽了作者）时先只露「点击展开」，展开了才看到遮罩。 */
.reply-adult-cover { margin: 4px 0 0; padding: 10px 12px; gap: 10px; font-size: 13px; }
.reply-adult-cover .i { width: 20px; height: 20px; }
.reply.collapsed .reply-adult-cover { display: none; }
.reply-adult-body[hidden] { display: none; }
/* 列表、搜索结果、最佳答案卡片上顶替 NSFW 摘要的那一句。 */
:is(.act-text, .sv-quote, .srch-excerpt).nsfw-folded, .ba-text.ba-folded { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.nsfw-folded .i, .ba-folded .i { flex: none; width: 16px; height: 16px; color: var(--warn-ink); }
.sv-quote.nsfw-folded { border-left: 0; padding-left: 0; }
.act-who .tagpill.adult, .sv-ctx .tagpill.adult { vertical-align: 1px; }
.reply-face, .fold-text { display: none !important; }
.reply-more { display: flex; scroll-margin-top: 72px; }
.reply-more[hidden] { display: none; }
.elbow.tall { height: 22px; }
.more-row { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 2px; color: var(--ink); font-size: 13px; font-weight: 700; }
.more-row .i { width: 18px; height: 18px; }
.more-row .i circle { fill: var(--bg); }
.more-row:hover { color: var(--primary); }
.thread-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); color: var(--soft); font-size: 13px; }
.thread-note > span { flex: 1; }
.thread-note .btn.text { height: 36px; font-size: 13px; }
.topicbar, .comment-bar { display: none; }
.share-image { display: block; width: 100%; max-width: 420px; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; }
/* 写回复（设计稿 Mobile-Post）：手机上从底部升起，圆角 20 20 0 0。顶上一根拖动条（点一下展开、拖动改高度、往下拖关闭），
   正文没有框、左右贴边，底下一排 Aa @ # $ 表情 图片 字数 发送；Aa、表情各切出一排。键盘弹起时脚本把 bottom 设成键盘的高度。
   overflow 放开：@ # $ 的引用下拉在正文上面弹出，会超出面板的上沿。 */
dialog.reply-sheet { position: fixed; inset: auto 0 0; box-sizing: border-box; width: 100%; max-width: 100%; max-height: none; margin: 0; padding: 0 16px calc(12px + env(safe-area-inset-bottom)); overflow: visible; border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--ink); animation: sheet .28s cubic-bezier(.2, .8, .2, 1); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
dialog.reply-sheet.kb { padding-bottom: 12px; }
dialog.reply-sheet.dragging { transition: none; }
dialog.reply-sheet::backdrop { background: rgba(11, 31, 24, .55); }
.reply-sheet-grip { display: flex; justify-content: center; width: calc(100% + 32px); margin: 0 -16px; padding: 10px 0 8px; border: 0; background: transparent; cursor: grab; touch-action: none; }
.reply-sheet-grip span { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--thread); }
.reply-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reply-sheet-head h2 { min-width: 0; margin: 0; overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reply-sheet-head .iconbtn { margin-right: -10px; }
.reply-sheet-form { display: flex; flex-direction: column; }
.reply-sheet-form > .draft-restored, .reply-sheet-form > .draft-conflict { margin: 0 0 8px; }
.reply-sheet-quote { display: -webkit-box; margin: 0 0 8px; padding: 8px 12px; overflow: hidden; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
dialog.reply-sheet .ed { margin: 0 -16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
dialog.reply-sheet .ed-bar, dialog.reply-sheet .ed-corner { display: none; }
dialog.reply-sheet .ed .ed-source, dialog.reply-sheet textarea[name="raw"] { display: block; box-sizing: border-box; width: 100%; min-height: 0; padding: 6px 16px 8px; border: 0; border-radius: 0; outline: none; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; resize: none; }
dialog.reply-sheet .ed-status { padding: 4px 16px; }
.reply-sheet-row:not([hidden]), .reply-sheet-tools { display: flex; align-items: center; gap: 2px; margin: 0 -16px; border-top: 1px solid color-mix(in srgb, var(--line) 55%, var(--bg)); }
.reply-sheet-row { padding: 4px 6px; overflow-x: auto; scrollbar-width: none; }
.reply-sheet-row::-webkit-scrollbar { display: none; }
.reply-sheet-tools { height: 52px; padding: 0 6px 0 4px; }
.reply-sheet-tool { display: flex; width: 40px; height: 44px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 19px; font-weight: 500; cursor: pointer; }
.reply-sheet-tool[aria-pressed="true"] { background: var(--fill); }
.reply-sheet-tool.reply-sheet-aa { font-size: 17px; font-weight: 700; }
.reply-sheet-row .reply-sheet-tool { height: 40px; }
.reply-sheet-tool.reply-sheet-emo { font-size: 22px; }
.reply-sheet-count { flex: 1; min-width: 4px; padding-right: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.reply-sheet-count.over { color: var(--danger); }
.reply-sheet-send.btn.primary { flex: none; height: 38px; padding: 0 18px; border-radius: 19px; font-size: 14px; font-weight: 700; }
.reply-sheet-send.btn.primary:disabled { border-color: var(--fill); background: var(--fill); color: var(--muted); opacity: 1; }
.reply-sheet-err { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--danger) 9%, var(--bg)); color: var(--danger); font-size: 13px; }
.reply-sheet-err[hidden] { display: none; }
.pagenum { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; }
.pagenum.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pagenum.gap { background: transparent; color: var(--muted); }

/* 正文：15 / 行高 1.8。 */
.prose { color: var(--body); font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.reply .prose, .snippet .prose, .prose.small { font-size: 14px; line-height: 1.7; }
.prose > * { margin: 0 0 12px; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3 { margin-top: 20px; color: var(--ink); line-height: 1.4; }
.prose h1 { font-size: 20px; } .prose h2 { font-size: 18px; } .prose h3 { font-size: 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
/* 表情（设计稿 Emoji）：大小都按字高算。Emoji 是字符，跟正文字号；表情包是图片，行内 1.5 倍字高、底部略低于基线；
   整条内容只有表情时放大（1–3 个 em-l，4 个以上 em-m，由渲染时判断）；标题和列表摘要里 1.25 倍（em-sm）。 */
.prose img.emoji, img.em-img { display: inline-block; width: 1.5em; height: 1.5em; margin: 0 2px; border-radius: 0; object-fit: contain; vertical-align: -.35em; }
img.em-img.em-sm { width: 1.25em; height: 1.25em; vertical-align: -.25em; }
.prose p.em-only { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", var(--font); }
.prose p.em-only.em-l { font-size: 36px; line-height: 1.3; }
.prose p.em-only.em-m { font-size: 28px; line-height: 1.4; }
.prose p.em-only img.emoji { vertical-align: top; }
.prose p.em-only.em-l img.emoji { width: 72px; height: 72px; }
.prose p.em-only.em-m img.emoji { width: 40px; height: 40px; }
.em-kao { white-space: nowrap; }
/* 悬停表情包（手机上长按）出现的浮层：大图、名字、分组和代码。Emoji 不出浮层。 */
.em-tip { position: fixed; z-index: 90; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 16px); padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-fg); box-shadow: var(--toast-shadow); font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; }
.em-tip img { flex: none; width: 40px; height: 40px; object-fit: contain; }
.em-tip b { display: block; font-size: 13px; }
.em-tip span { overflow: hidden; text-overflow: ellipsis; }
/* 正文里单独成段的图（markup.Figures）：圆角框，四周一圈细线（白底截图也和页面分得开），鼠标移上去右下角出「查看大图」，下面一行说明。 */
.prose figure { margin: 0 0 12px; }
.pic-open, .pic-tile { position: relative; padding: 0; border: 0; background: var(--fill); cursor: zoom-in; }
.pic-open { display: block; width: fit-content; max-width: min(640px, 100%); overflow: hidden; border-radius: 12px; }
.pic-open::after { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .08); content: ""; pointer-events: none; }
:root[data-theme="dark"] .pic-open::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pic-open img { display: block; border-radius: 0; }
.pic-open img:not([height]) { max-height: 480px; }
.pic-hint { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; background: rgba(11, 31, 24, .72); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1; opacity: 0; transition: opacity .18s ease; }
.pic-hint::after { content: attr(data-label); }
.pic-hint .i { width: 14px; height: 14px; }
.pic-open:hover > .pic-hint, .pic-open:focus-visible > .pic-hint { opacity: 1; }
.prose figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pic-note::before { content: attr(data-note); }
/* 连着的几张合成图集：两张左右分；三张以上第一张占左边两行，最多五格，多出来的在最后一格上写「+N」。 */
.pic-grid { display: grid; gap: 4px; max-width: 640px; overflow: hidden; border-radius: 12px; }
.pic-grid.n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 220px; }
.pic-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 140px); }
.pic-grid:is(.n4, .n5) { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 140px); }
.pic-grid:not(.n2) > .pic-tile:first-child { grid-row: span 2; }
.pic-grid.n4 > .pic-tile:nth-child(4) { grid-column: span 2; }
.pic-tile { display: block; min-width: 0; overflow: hidden; }
.pic-tile[hidden] { display: none; }
.pic-tile :is(img, .gif-still) { display: block; width: 100%; height: 100%; max-width: none; border-radius: 0; object-fit: cover; transition: transform .2s ease; }
.pic-tile:hover img { transform: scale(1.03); }
.pic-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 31, 24, .55); color: #FFFFFF; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .pic-grid.n2 { grid-template-rows: 180px; }
  .pic-grid:not(.n2) { grid-template-rows: repeat(2, 110px); }
}
/* 富文本编辑器里的图片（editor.js decoratePics）：大小和帖子里一样；图集不收起，五张以后的接着往下排，每张都能选中、删掉。
   div.ed-pics 里每段占一格（一段里有几张就在格子里并排）；p.ed-pics 是一段里连着几张图，图片直接排进格子。 */
.ed-rich p.ed-pic img { max-width: min(640px, 100%); border-radius: 12px; }
.ed-rich p.ed-pic.ed-tall img { width: auto; height: auto; max-height: 480px; }
.ed-rich p.ed-pic[data-caption]::after { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; content: attr(data-caption); }
.ed-rich .ed-pics { display: grid; grid-auto-rows: 140px; gap: 4px; max-width: 640px; margin: 0 0 12px; overflow: hidden; border-radius: 12px; }
.ed-rich div.ed-pics > p { min-width: 0; margin: 0; overflow: hidden; }
.ed-rich div.ed-pics > p:has(> img ~ img) { display: flex; gap: 4px; }
/* 一段里几张图之间的换行不占格子。只有一张图的格子里不藏：图删掉以后光标要落在这个空段落里。 */
.ed-rich p.ed-pics > br, .ed-rich div.ed-pics > p:has(> img ~ img) > br { display: none; }
.ed-rich .ed-pics img { display: block; flex: 1 1 0; width: 100%; height: 100%; min-width: 0; max-width: none; border-radius: 0; object-fit: cover; }
.ed-rich .ed-pics.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
.ed-rich .ed-pics.n3 { grid-template-columns: 2fr 1fr; }
.ed-rich .ed-pics:is(.n4, .n5) { grid-template-columns: 2fr 1fr 1fr; }
.ed-rich .ed-pics:not(.n2) > :first-child { grid-row: span 2; }
.ed-rich .ed-pics > [data-ed-wide] { grid-column: span 2; }
@media (max-width: 860px) {
  .ed-rich .ed-pics { grid-auto-rows: 110px; }
  .ed-rich .ed-pics.n2 { grid-auto-rows: 180px; }
}
/* 大图浏览：铺满屏幕的深色层，上面一条（第几张、说明、放大、原图、下载、关闭），中间大图和左右翻页，下面缩略图。 */
.pv { position: fixed; inset: 0; display: flex; flex-direction: column; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 12, 10, .94); color: #FFFFFF; animation: fade .18s ease-out; }
.pv:not([open]) { display: none; }
.pv::backdrop { background: transparent; }
.pv:focus { outline: none; }
.pv-bar { display: flex; flex: none; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 16px; }
.pv-count { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-cap { flex: 1; min-width: 0; overflow: hidden; color: rgba(255, 255, 255, .75); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pv-btn { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.pv-btn:hover { background: rgba(255, 255, 255, .18); color: #FFFFFF; }
.pv-btn .i { width: 20px; height: 20px; }
/* 没放大时左右滑是翻页（features.js 自己处理），不交给浏览器：不然手机浏览器会当成「滑动返回上一页」。 */
.pv-stage { position: relative; display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; padding: 0 72px; overflow: hidden; touch-action: none; }
/* 放大缩小照设计稿用 0.25 秒的缩放过渡；拖着挪的时候不要过渡，跟手。 */
.pv-img { display: block; max-width: min(900px, 100%); max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: zoom-in; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-radius .25s ease; }
.pv-img.pv-moving { transition: none; }
.pv-img.pv-in { animation: fade .18s ease-out; }
.pv-stage.zoomed .pv-img { border-radius: 0; cursor: zoom-out; }
.pv-stage.dragging .pv-img { cursor: grabbing; }
.pv.pv-out { animation: fade-out .16s ease-in forwards; }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
.pv-nav { position: absolute; top: 50%; display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #FFFFFF; translate: 0 -50%; }
.pv-nav:hover { background: rgba(255, 255, 255, .2); }
.pv-nav:disabled { opacity: .3; cursor: default; }
.pv-nav .i { width: 24px; height: 24px; }
.pv-prev { left: 16px; } .pv-next { right: 16px; }
.pv-thumbs { display: flex; flex: none; justify-content: safe center; gap: 8px; padding: 12px 16px 16px; overflow-x: auto; overscroll-behavior: contain; }
.pv-thumb { flex: none; width: 64px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: rgba(255, 255, 255, .08); opacity: .55; }
.pv-thumb[aria-current="true"] { border-color: #FFFFFF; opacity: 1; }
.pv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .pv-stage { padding: 0 8px; }
  .pv-nav { display: none; }
  .pv-thumbs { justify-content: flex-start; }
}
.prose blockquote { padding: 10px 16px; border-radius: 8px; background: var(--surface); color: var(--soft); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--fill); font-family: var(--mono); font-size: .9em; }
.prose pre { padding: 12px 16px; overflow-x: auto; border-radius: 12px; background: var(--surface); line-height: 1.6; }
.prose pre code { padding: 0; background: none; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { border-bottom-width: 2px; font-size: 12px; color: var(--muted); }
.prose hr { margin: 16px 0; }
/* 引用（设计稿 Mention）：@人是绿色的文字链接，提到自己的那一处换成绿底加粗（refs.js 按当前用户加 mn-me）；
   #标签是浅灰底的小标签；$节点是带节点头像的小胶囊，显示成 n/地址。头像上的字在 data-letter 里，链接文字只有 n/地址。 */
.prose a.mention { color: var(--primary); font-weight: 500; }
.prose a.mention:hover { color: var(--primary-hover); text-decoration: underline; }
.prose a.mention.mn-me { padding: 1px 6px; border-radius: 6px; background: var(--unread); color: var(--primary-hover); font-weight: 700; text-decoration: none; }
.prose a.mn-tag { padding: 1px 7px; border-radius: 6px; background: var(--fill); color: var(--ink); font-size: .93em; font-weight: 400; white-space: nowrap; }
.prose a.mn-tag:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.prose a.mn-node { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .93em; line-height: 1.55; white-space: nowrap; vertical-align: baseline; }
.prose a.mn-node:hover { border-color: var(--outline); color: var(--ink); text-decoration: none; }
.mn-av { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: #FDFDFD; font-size: 11px; font-weight: 700; line-height: 1; object-fit: cover; }
.mn-av[data-letter]::before { content: attr(data-letter); }
.mn-av.mn-av-dk { color: #0B1F18; }
.prose img.mn-av { margin: 0; border-radius: 50%; }
/* 列表里的摘要：不加底色、不带头像，只留文字和颜色（refExcerpt）。 */
.mn-hl-user { color: var(--primary); font-weight: 500; }
.mn-hl-ref { color: var(--ink); font-weight: 500; }
.prose a.mention-group::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; opacity: .55; vertical-align: middle; }
.prose.quoted { margin: 8px 0; padding: 10px 16px; border-radius: 8px; background: var(--surface); }

/* 用户主页。 */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 8px 16px 0; line-height: 1.35; }
.profile-head h1 { font-size: 24px; }
.profile-head + .main-head { margin-top: 16px; padding: 0 16px 12px; }
/* 个人主页（照设计稿「用户主页」）：名字下面一排栏目，再下面是排序和列表；右边是资料卡。 */
.profile-names { flex: 1; min-width: 0; }
.profile-level { display: inline-flex; align-items: center; gap: 3px; color: var(--primary-hover); font-weight: 700; vertical-align: bottom; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.profile-tabs .chip { white-space: nowrap; }
.act-post { display: flex; align-items: flex-start; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.act-thumb { display: flex; width: 104px; height: 78px; flex: none; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: var(--fill); color: var(--muted); }
.act-thumb img { width: 100%; height: 100%; object-fit: cover; }
.act-thumb .i { width: 24px; height: 24px; stroke-width: 1.5; }
.act-body { flex: 1; min-width: 0; }
.act-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.act-meta .meta-who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; }
.act-title { display: block; margin-top: 2px; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.act-title:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); text-underline-offset: 3px; }
.act-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.act-actions.tight { gap: 4px; margin: 2px 0 0 -12px; color: var(--muted); }
.act-link { display: inline-flex; height: 44px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.act-link:hover { color: var(--ink); }
.act-link.save.on { color: var(--primary); font-weight: 700; }
.act-comment { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px 6px; border-bottom: 1px solid var(--line); }
.act-comment > .avatar { flex: none; }
.act-where, .act-who { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.act-where a { color: var(--soft); }
.act-where a.act-node { color: var(--ink); font-weight: 700; }
.act-who { margin-top: 4px; }
.act-who strong { color: var(--ink); }
.act-who .op-mark { margin: 0; }
.act-text { margin: 8px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.profile-points { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 16px 0; padding: 12px 16px; border-radius: 12px; background: var(--surface); }
.profile-points > div { flex: 1 1 160px; }
.profile-points small { display: block; color: var(--muted); font-size: 12px; }
.profile-points b { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.ledger-row { display: flex; min-height: 56px; align-items: center; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.ledger-what { flex: 1; min-width: 0; }
.ledger-what span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-what small { display: block; color: var(--muted); font-size: 12px; }
.ledger-row strong { flex: none; }
.ledger-row .plus { color: var(--primary-hover); }
.ledger-row .minus { color: var(--danger); }
.profile-side h2 { font-size: 18px; }
.profile-side .panel-row .iconbtn { margin-right: -6px; }
.profile-side .profile-actions { flex-wrap: wrap; margin: 8px 0 0; }
.profile-side .profile-actions .btn { font-size: 14px; }
.profile-side .prose { margin-top: 12px; color: var(--soft); }
.profile-side .stats { gap: 16px 8px; margin-top: 16px; }
.profile-side .stats a { color: var(--ink); }
.profile-side .stats a:hover b { text-decoration: underline; text-decoration-color: var(--thread); text-underline-offset: 3px; }
.profile-side h3.panel-label { letter-spacing: .04em; }
.profile-side hr { margin: 12px 0; }
.trophy-stack { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.trophy-tiles { display: flex; flex: none; }
.trophy-tiles .badge-tile { width: 40px; height: 40px; border: 2px solid var(--surface); }
.trophy-tiles .badge-tile + .badge-tile { margin-left: -12px; }
.trophy-names { color: var(--soft); font-size: 13px; }
.panel-link { display: flex; min-height: 44px; align-items: center; font-size: 13px; font-weight: 500; }
.trophy-list { margin-top: 4px; }
.trophy, .owned-node { display: flex; min-height: 48px; align-items: center; gap: 12px; line-height: 1.35; }
.trophy .badge-tile { width: 40px; height: 40px; }
.trophy > span:last-child > *, .owned-node > span > * { display: block; }
.trophy small, .owned-node small { color: var(--muted); font-size: 12px; }
.owned-node { min-height: 52px; gap: 10px; color: var(--ink); }
.owned-node:hover { color: var(--ink); }
.profile-side .panel-label + .owned-node { margin-top: 4px; }
.profile-m-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface); }
.profile-m-stats b { display: block; font-size: 18px; font-weight: 800; }
.profile-m-stats small { display: block; color: var(--muted); font-size: 12px; }
.profile-m-row { display: flex; min-height: 48px; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 12px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.profile-m-row:hover { color: var(--ink); }
.profile-m-row > span { color: var(--muted); }
.profile-m-row > .i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); rotate: -90deg; }
/* personal: 主页封面（宽屏只在设了封面时出现）、头像上的在线绿点、手机成就行、加入的节点、能量记录的「全部明细」。 */
.profile-cover { display: none; }
.profile-cover.has-image { display: block; height: 160px; margin: 0 16px 12px; overflow: hidden; border-radius: 16px; background: var(--night); }
.profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.online-wrap { position: relative; display: inline-flex; flex: none; }
.online-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid var(--bg); border-radius: 50%; background: var(--online, #2E9E6B); }
.profile-m-stats { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.profile-m-stats b, .profile-points b { font-feature-settings: "tnum"; letter-spacing: -.01em; }
.ach-row .ach-tiles { display: flex; flex: none; gap: 6px; }
.ach-row .ach-tiles .badge-tile { width: 44px; height: 44px; }
.ach-row .ach-count { color: var(--muted); }
.ach-row .ach-count strong { color: var(--ink); }
div.ach-row { min-height: 56px; }
.profile-points .chip.primary-chip { background: var(--primary-bg); color: #FFFFFF; }
.joined-nodes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.joined-node { display: inline-flex; max-width: 100%; height: 32px; align-items: center; gap: 6px; padding: 0 10px 0 4px; border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 13px; }
.joined-node:hover { color: var(--ink); filter: brightness(.97); }
.joined-node > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-recipient { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px; border-radius: 12px; background: var(--surface); line-height: 1.35; }
.dm-recipient .avatar { width: 40px; height: 40px; font-size: 16px !important; }
.dm-recipient small { display: block; color: var(--muted); font-size: 12px; }
.field-count { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; text-align: right; }
@media (max-width: 860px) {
  /* 手机上：顶上一条深色的封面，头像压在上面，私信和关注在头像右边，名字另起一行。 */
  .profile-cover { height: 64px; background: var(--night); }
  .profile-head { align-items: flex-end; gap: 8px; margin-top: -32px; padding: 0 16px; }
  .profile-head .profile-face .avatar { border: 3px solid var(--bg); box-sizing: border-box; }
  .profile-cover, .profile-cover.has-image { display: block; height: 64px; margin: 0; border-radius: 0; }
  .profile-head .profile-actions { display: flex !important; order: 1; width: auto; margin-left: auto; }
  .profile-head .profile-names { order: 2; flex-basis: 100%; }
  .profile-head h1 { font-size: 22px; }
  .profile-m { padding: 0 16px; }
  .profile-m .prose { margin-top: 6px; color: var(--soft); }
  .profile-tabs { margin-top: 12px; padding: 0 12px 10px; gap: 8px; }
  .notif-top .notif-title { flex-basis: 0; }
  .profile-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .act-thumb { width: 72px; height: 54px; }
  .act-title { font-size: 16px; }
}
.snippet .card-title { font-size: 16px; }
.snippet .prose { margin-top: 4px; }

/* 通知。 */
/* 通知页：标题和「全部标为已读」，一排筛选，按天分组的通知。照设计稿「全部通知」。 */
.notif-page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }
.notif-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.notif-title { flex: 1 1 160px; min-width: 0; }
.notif-title h1 { margin: 0; }
.notif-filters { flex-wrap: nowrap; margin-top: 16px; padding-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.notif-filters .chip { gap: 6px; font-size: 14px; }
.notif-filters .count-pill { min-width: 20px; padding: 0 6px; border-radius: 10px; line-height: 20px; text-align: center; }
.notif-group { margin: 20px 0 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.notif-row { display: flex; align-items: flex-start; gap: 12px; margin: 0 -12px; padding: 12px; border-radius: 12px; }
.notif-row.unread { background: var(--unread); }
.notif-row.leaving { display: none; }
.notif-face { position: relative; flex: none; width: 40px; height: 40px; }
.notif-face .avatar, .notif-face .notif-sys { width: 40px; height: 40px; border-radius: 50%; }
.notif-type { position: absolute; right: -4px; bottom: -4px; display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; border: 2px solid var(--bg); border-radius: 50%; background: var(--primary-bg); color: var(--on-primary); }
.notif-row.unread .notif-type { border-color: var(--unread); }
.notif-type .i { width: 11px; height: 11px; stroke-width: 3; }
.notif-type.t-mention { background: #6D28D9; color: #FFFFFF; }
.notif-type.t-up { background: var(--signal); color: var(--on-signal); }
.notif-type.t-follow { background: #0E7490; color: #FFFFFF; }
.notif-type.t-tip { background: #A16207; color: #FFFFFF; }
.notif-type.t-system { background: #0B1F18; color: #5CC79A; }
/* personal: 通知页上系统通知的头像是站点首字母「n」的深色圆。 */
.notif-sys.site { background: var(--night); box-shadow: inset 0 0 0 1px var(--thread); color: var(--on-night); font-size: 20px; font-weight: 800; line-height: 1; }
.notif-main { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.notif-main:hover { color: var(--ink); }
.notif-main:hover .notif-line { text-decoration: underline; text-decoration-color: var(--thread); text-underline-offset: 3px; }
.notif-line { display: block; }
.notif-row.unread .notif-line { font-weight: 500; }
.notif-quote { display: -webkit-box; margin-top: 4px; padding-left: 10px; overflow: hidden; border-left: 2px solid var(--line); color: var(--body); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notif-when { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.notif-follow { flex: none; }
.notif-follow .btn { font-size: 14px; }
.notif-toggle, .notif-remove { flex: none; margin: -2px -6px 0 0; color: var(--muted); }
.notif-remove .i { width: 18px; height: 18px; }
.notif-dot { display: block; width: 12px; height: 12px; border: 2px solid var(--outline); border-radius: 50%; }
.notif-row.unread .notif-dot { border-color: var(--primary); background: var(--primary); }
.notif-empty { padding: 72px 24px; color: var(--muted); text-align: center; }
.notif-empty p { margin: 0; }
.notif-empty-title { color: var(--ink); font-size: 18px; font-weight: 700; }
.notif-empty-title + p { margin-top: 4px; }
.notif-end { margin: 20px 0 8px; font-size: 13px; text-align: center; }
/* 财富排行榜：标题和三张榜单的切换，前三名的领奖台，自己的位置，下面是表。照设计稿「财富排行榜」。 */
.rank-main { padding: 12px 16px 24px; }
.rank-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; }
.rank-title { flex: 1 1 220px; min-width: 0; }
.rank-title h1 { margin: 0; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 16px; margin-top: 20px; }
.podium-seat { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 16px; background: var(--surface); color: var(--ink); text-align: center; }
.podium-seat:hover { color: var(--ink); filter: brightness(.97); }
.podium-seat .avatar { width: 64px !important; height: 64px !important; margin-top: 8px; border: 3px solid var(--outline); border-radius: 50%; font-size: 22px; }
.podium-medal { display: flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 14px; background: var(--line); color: var(--soft); font-size: 15px; font-weight: 800; }
.podium-name { max-width: 100%; margin-top: 8px; overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.podium-sub { color: var(--muted); font-size: 12px; }
.podium-value { margin-top: 6px; font-size: 22px; font-weight: 800; line-height: 1.2; }
.podium-seat.place-1 { padding-top: 24px; background: var(--night); color: var(--on-night); }
.podium-seat.place-1:hover { color: var(--on-night); }
.podium-seat.place-1 .avatar { width: 80px !important; height: 80px !important; border-color: var(--signal); font-size: 28px !important; }
.podium-seat.place-1 .podium-medal { background: var(--signal); color: var(--on-signal); }
.podium-seat.place-1 .podium-sub { color: #C9D6D0; }
.podium-seat.place-3 .avatar { border-color: #C98B5E; }
.podium-seat.place-3 .podium-medal { background: #F1E3D6; color: #92400E; }
.rank-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding: 12px 16px; border-radius: 16px; background: var(--unread); box-shadow: 0 0 0 1px #5CC79A; }
.rank-mine-text { flex: 1 1 160px; min-width: 0; }
.rank-mine-text strong, .rank-mine-text span { display: block; }
.rank-mine-text span { color: var(--soft); font-size: 13px; }
.rank-table { margin-top: 16px; }
.rank-line { display: flex; min-height: 60px; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--fill); }
.rank-line.head { min-height: 0; padding-bottom: 8px; border-bottom-color: var(--line); color: var(--muted); font-size: 12px; }
.rank-line.me { background: var(--unread); }
.rank-no { flex: none; width: 44px; color: var(--muted); font-size: 16px; font-weight: 800; text-align: center; }
.rank-line.head .rank-no { font-family: inherit; font-size: 12px; font-weight: 400; }
.rank-who { display: flex; min-width: 0; min-height: 52px; flex: 1; align-items: center; gap: 12px; color: var(--ink); }
.rank-line.head .rank-who { min-height: 0; color: inherit; }
.rank-who:hover { color: var(--ink); }
.rank-names { min-width: 0; }
.rank-names strong, .rank-names small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-names small { color: var(--muted); font-size: 12px; }
.rank-trend { display: flex; width: 96px; flex: none; align-items: center; justify-content: flex-end; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.rank-trend .i { width: 14px; height: 14px; stroke-width: 2.5; }
.rank-trend.up { color: var(--primary-hover); }
.rank-trend.down { color: var(--danger); }
.rank-value { flex: none; width: 120px; font-weight: 700; text-align: right; }
.rank-line.head .rank-value { font-weight: 400; }
.rank-side-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.rank-side-label .i { width: 16px; height: 16px; }
.rank-balance { margin-top: 4px; font-size: 32px; font-weight: 800; line-height: 1.2; }
.rank-side hr { margin: 16px 0 12px; }
.rank-side h2 { margin: 0 0 4px; font-size: 14px; }
.rank-way { display: flex; min-height: 40px; align-items: center; gap: 12px; }
.rank-way span { flex: 1; }
.rank-way strong { color: var(--primary-hover); text-align: right; }
.rank-side p.small { margin-top: 8px; }
/* personal: 财富榜、通知页的页面标题 28/800（手机 24）；右栏的「查看能量明细」和签到按钮。 */
.rank-title h1.big, .notif-title h1.big { font-size: 28px; font-weight: 800; line-height: 1.25; }
.rank-side .rank-ledger { display: inline-flex; min-height: 32px; align-items: center; margin-top: 4px; color: var(--primary); font-size: 13px; font-weight: 700; }
.rank-side .rank-ledger:hover { color: var(--primary-hover); }
.rank-side .rank-checkin { margin-top: 12px; }
@media (max-width: 860px) {
  .rank-title h1.big, .notif-title h1.big { font-size: 24px; }
  .rank-side.only-narrow { display: block !important; margin-top: 24px; }
  .rank-main { padding: 12px 16px 16px; }
  .podium { gap: 8px; }
  .podium-seat .avatar { width: 48px !important; height: 48px !important; }
  .podium-seat.place-1 .avatar { width: 60px !important; height: 60px !important; }
  .podium-value { font-size: 17px; }
  .rank-line { padding: 0; }
  .rank-no { width: 32px; }
  .rank-value { width: auto; }
}
/* ===== 特殊帖子：投票、红包、抽奖、交易的卡片（设计稿「特殊帖子样式」） ===== */
.game-slot:empty { display: none; }
.k-poll { --k-bg: #EEF7F2; --k-ink: #00573B; --k-solid: #007A52; }
.k-envelope { --k-bg: #FFEDE0; --k-ink: #C2410C; --k-solid: #C2410C; }
.k-lottery { --k-bg: #FDE6E4; --k-ink: #B3121B; --k-solid: #C81E1E; }
.k-trade { --k-bg: #E3F2F6; --k-ink: #0E7490; --k-solid: #0E7490; }
:root[data-theme="dark"] .k-poll { --k-bg: #14261F; --k-ink: #5CC79A; --k-solid: #5CC79A; }
:root[data-theme="dark"] .k-envelope { --k-bg: #3A2015; --k-ink: #FB923C; --k-solid: #FB923C; }
:root[data-theme="dark"] .k-lottery { --k-bg: #3A1517; --k-ink: #F87171; --k-solid: #F87171; }
:root[data-theme="dark"] .k-trade { --k-bg: #13323A; --k-ink: #5EC4D6; --k-solid: #5EC4D6; }
.game { --game-warn: #A86200; display: flex; flex-direction: column; gap: 14px; margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; }
:root[data-theme="dark"] .game { --game-warn: var(--note-fg); }
.game .btn { height: 42px; border-radius: 21px; }
.game .btn.small { height: 32px; border-radius: 16px; }
.btn.k-fill { background: var(--k-solid); color: #FFFFFF; }
:root[data-theme="dark"] .btn.k-fill { color: var(--bg); }
.btn.dim, .btn.dim:hover { background: var(--fill); color: var(--muted); cursor: default; filter: none; }
.game-head { display: flex; align-items: center; gap: 10px; }
.game-ico { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 10px; background: var(--k-bg); color: var(--k-ink); }
.game-ico .i { width: 18px; height: 18px; }
.game-head-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.game-title { overflow-wrap: anywhere; font-size: 15px; font-weight: 700; }
.game-sub { color: var(--muted); font-size: 12px; }
.game-status { flex: none; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 24px; white-space: nowrap; }
.game-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; vertical-align: 1px; }
.game-row > .game-tag { margin-left: 0; padding: 0 8px; font-size: 12px; line-height: 22px; }
:is(.game-status, .game-tag).ok { background: var(--unread); color: var(--primary-hover); }
:is(.game-status, .game-tag).warn { background: var(--note-bg); color: var(--game-warn); }
.game-tag.mine { background: var(--primary-bg); color: var(--on-primary); }
.game-status.bad { background: var(--error-bg); color: var(--danger); }
.game-bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--fill); }
.game-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--k-solid); transition: width .4s ease; }
/* 红包上那块橙色的：金额、进度和按钮。 */
.game.game-bare { padding: 0; border: 0; background: none; }
.game-hero { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #C2410C, #E0561F); color: #FFFFFF; }
.game-hero-main { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.game-hero-hint, .game-hero-line { font-size: 12px; opacity: .88; }
.game-hero-hint { font-size: 13px; }
.game-hero-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.game-hero-num strong { font-size: 40px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.game-hero-num span { font-size: 15px; font-weight: 700; }
.game-hero-num.pop { transform-origin: left center; animation: game-pop .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes game-pop { 0% { opacity: 0; scale: .6; } 60% { opacity: 1; scale: 1.08; } 100% { scale: 1; } }
.game-hero .game-bar { max-width: 560px; background: rgba(255, 255, 255, .3); }
.game-hero .game-bar > span { background: #FFFFFF; }
.game-hero .btn { flex: none; height: 48px; padding: 0 24px; border-radius: 24px; background: #FFFFFF; color: #C2410C; font-size: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.game-hero .btn.dim { background: rgba(255, 255, 255, .25); color: #FFFFFF; box-shadow: none; }
/* 领取记录、奖项、砍价记录：一行一条，上面一条细线。 */
.game-list { display: flex; flex-direction: column; }
.game-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; font-size: 13px; font-weight: 700; }
.game-list-head .quiet { font-size: 12px; font-weight: 400; }
.game-row { display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 8px 0; border-top: 1px solid var(--fill); }
.game-row.me { background: #FFF6EF; }
:root[data-theme="dark"] .game-row.me { background: color-mix(in srgb, var(--k-solid) 10%, transparent); }
.game-row .grow { min-width: 0; overflow-wrap: anywhere; }
.game-row a { color: var(--ink); }
.game-row a:hover { color: var(--primary-hover); }
.game-time { flex: none; color: var(--outline-text); font-size: 12px; white-space: nowrap; }
.game-amount { flex: none; min-width: 64px; font-weight: 700; text-align: right; white-space: nowrap; }
.game-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.game-note { margin: 2px 0 0; color: var(--soft); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 抽奖的倒计时和人数、交易的价格：浅灰底的一块。 */
.game-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.game-cell { display: flex; flex: 1 1 220px; flex-direction: column; gap: 6px; min-width: 0; }
.game-cell:has(> .game-countdown) { flex: none; }
.game-label { color: var(--muted); font-size: 12px; }
.game-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; color: var(--muted); font-size: 12px; }
.game-big { font-size: 18px; font-weight: 700; }
.game-countdown { display: flex; gap: 8px; }
.game-countdown > span { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 53px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.game-countdown strong { font-size: 22px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.game-countdown small { color: var(--muted); font-size: 11px; }
.game-notice { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: var(--soft); font-size: 13px; }
.game-notice > .i { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.game-notice > div { display: flex; flex-direction: column; gap: 2px; }
.game-notice strong { font-size: 15px; }
.game-notice.ok { background: var(--unread); color: var(--primary-hover); }
.game-notice.bad { background: var(--error-bg); color: var(--danger); }
.game-row.prize { flex-wrap: wrap; }
.game-prize-tag { flex: none; min-width: 52px; padding: 0 8px; border-radius: 8px; background: var(--fill); color: var(--soft); font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.game-prize-tag.t1 { background: #FFE9CF; color: #8A4B00; }
.game-prize-tag.t3 { background: #F3E3D3; color: #7A3E10; }
:root[data-theme="dark"] .game-prize-tag.t1 { background: #3A2A12; color: #FFCF94; }
:root[data-theme="dark"] .game-prize-tag.t3 { background: #33241A; color: #E8B98F; }
.game-prize-qty { flex: none; color: var(--muted); font-size: 13px; }
.game-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
.game-foot.line { padding-top: 14px; border-top: 1px solid var(--fill); }
.game-foot-note { margin: 0; color: var(--muted); font-size: 12px; }
.game-foot-note strong { color: var(--ink); }
.game-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.game-stepper { display: inline-flex; flex: none; align-items: center; width: 114px; height: 42px; border: 1px solid var(--outline); border-radius: 21px; }
.game-stepper button { flex: none; width: 36px; height: 100%; padding: 0; border: 0; border-radius: 21px; background: transparent; color: var(--ink); font-size: 18px; }
.game-stepper button:not(:disabled):hover { background: var(--fill); }
.game-stepper button:disabled { opacity: .35; cursor: default; }
.game-stepper input[type="number"] { flex: 1; width: 0; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; font-weight: 700; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.game-stepper input::-webkit-inner-spin-button, .game-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.trade-panel { align-items: flex-start; }
.trade-panel .game-cell { flex: 0 1 160px; }
.trade-panel .game-cell.price { flex-basis: 200px; }
.trade-panel .game-cell.wide { flex: 1 1 240px; }
.trade-price { display: flex; align-items: baseline; gap: 4px; }
.trade-price strong { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.trade-price span { color: var(--muted); font-size: 13px; }
.trade-delivery { overflow-wrap: anywhere; }
.game-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); font-size: 12px; }
.game-meta > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.game-meta .i { width: 14px; height: 14px; }
/* 抽奖：红底金点的整张卡片（右上角一个金色的圈、两颗小菱形），里面是一块块白的。 */
.game.k-lottery { --lot-panel: #FFFFFF; position: relative; gap: 12px; padding: 18px; overflow: hidden; border: 0; border-radius: 18px; color: #FFFFFF;
  background: radial-gradient(circle at 8% -10%, rgba(255, 214, 120, .45), transparent 38%), radial-gradient(circle at 105% 110%, rgba(255, 200, 90, .35), transparent 42%), radial-gradient(rgba(255, 222, 150, .22) 1.4px, transparent 1.6px) 0 0 / 16px 16px, linear-gradient(135deg, #A80F18 0%, #D2231C 55%, #E5482A 100%);
  box-shadow: 0 10px 30px rgba(168, 15, 24, .25); }
:root[data-theme="dark"] .game.k-lottery { --lot-panel: var(--bg); }
.lot-ring { position: absolute; top: -22px; right: -18px; width: 120px; height: 120px; border: 10px solid rgba(255, 214, 120, .25); border-radius: 50%; pointer-events: none; }
.lot-spark { position: absolute; top: 14px; right: 70px; width: 8px; height: 8px; rotate: 45deg; background: #FFD58A; opacity: .8; pointer-events: none; }
.lot-spark.b { top: 8px; right: auto; left: 46%; width: 6px; height: 6px; background: #FFE7B0; opacity: .7; }
.k-lottery .game-head { position: relative; z-index: 2; }
.k-lottery .game-ico { background: rgba(255, 255, 255, .18); color: #FFD58A; box-shadow: inset 0 0 0 1px rgba(255, 214, 120, .5); }
.k-lottery .game-title { font-size: 16px; letter-spacing: .02em; }
.k-lottery .game-sub { color: #FFE1C2; font-variant-numeric: tabular-nums; }
.game-head-end { position: relative; display: flex; flex: none; align-items: center; gap: 6px; }
:is(.game-status, .game-notice).closed { background: #FBEAE2; color: #A33A00; }
:root[data-theme="dark"] :is(.game-status, .game-notice).closed { background: #3A2216; color: #F0A27A; }
.lot-close { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid #E7B9A3; border-radius: 14px; background: #FFFFFF; color: #A33A00; font-size: 12px; font-weight: 700; }
.lot-close:hover { background: #FFF4EE; }
.lot-close .i { width: 12px; height: 12px; }
.lot-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: 280px; padding: 14px; border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: 0 8px 28px rgba(15, 26, 28, .18), 0 0 0 1px var(--line); text-align: left; }
.lot-pop[hidden] { display: none; }
.lot-pop strong { font-size: 14px; }
.lot-pop p { margin: 4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.lot-pop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.game .lot-pop-actions .btn { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; }
.game .lot-pop-actions .lot-pop-go { background: #A33A00; color: #FFFFFF; }
.lot-panel { padding: 14px 16px; border-radius: 14px; background: var(--lot-panel); color: var(--ink); }
.k-lottery .game-panel { gap: 12px 20px; }
.k-lottery .game-cell:has(> .game-countdown) { flex: 1 1 200px; }
.k-lottery .game-countdown { gap: 6px; }
.k-lottery .game-countdown > span { width: auto; min-width: 48px; height: auto; padding: 6px 4px; background: var(--lot-panel); }
:root[data-theme="dark"] .k-lottery .game-countdown > span { background: var(--surface); }
.k-lottery .game-countdown strong { font-family: "Bricolage Grotesque", var(--font); line-height: 1.1; }
.k-lottery .game-bar > span { background: linear-gradient(90deg, #D2231C, #F08A24); }
.k-lottery .game-split > span:first-child { font-variant-numeric: tabular-nums; }
/* 参与者：一排叠着的头像，多出来的折成「+N」，点开是全部参与者。 */
.lot-people { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.lot-label { flex: none; font-size: 13px; font-weight: 700; }
.lot-empty { color: var(--muted); font-size: 13px; }
.lot-people-btn { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; height: 40px; padding: 0 4px; overflow: hidden; border: 0; border-radius: 20px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lot-people-btn:hover { background: var(--hover); }
.lot-all { display: inline-flex; flex: none; align-items: center; gap: 2px; color: #B3121B; font-size: 13px; font-weight: 700; }
:root[data-theme="dark"] .lot-all { color: #F87171; }
.lot-all .i { width: 14px; height: 14px; }
.game-faces { display: flex; flex: 1; min-width: 0; align-items: center; overflow: hidden; }
.game-faces > * { flex: none; box-sizing: border-box; margin-left: -8px; border: 2px solid var(--lot-panel, var(--bg)); }
.game-faces > :first-child { margin-left: 0; }
.game-faces > .narrow-only { display: none; }
@media (max-width: 560px) {
  .game-faces > .wide-only { display: none; }
  .game-faces > .narrow-only { display: inline-flex; }
}
.game-faces-more { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; background: #0F1A1C; color: #FFFFFF; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 奖项：开奖了，每一行后面是中奖的人。 */
.lot-prizes { padding: 12px 16px 4px; }
.lot-prizes .game-list-head { padding-bottom: 6px; }
.k-lottery .game-row.prize { gap: 8px 12px; min-height: 56px; padding: 8px 0; }
.game-prize-name { flex: 1 1 140px; font-weight: 500; }
.game-winner-chip { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.game-winner-chip:hover { filter: brightness(.97); }
.game-winner-chip.me { background: var(--unread); }
.game-winner-chip > span:last-child { font-weight: 700; white-space: nowrap; }
.game-winner-chip .game-faces { flex: none; }
.game-winner-chip .game-faces-more { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; font-size: 11px; }
/* 买票：张数、快捷张数、按住 3 秒的「随缘」和「买票」。 */
.lot-buy { display: flex; flex-direction: column; gap: 12px; }
.lot-buy-note { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.lot-buy-note strong { color: var(--ink); }
.lot-buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lot-buy-acts { display: flex; gap: 8px; margin-left: auto; }
.lot-buy-hint { color: var(--muted); font-size: 12px; }
.game-stepper.big { width: auto; height: 44px; border-radius: 22px; }
.game-stepper.big button { width: 40px; border-radius: 22px; }
.game-stepper.big input[type="number"] { flex: none; width: 56px; font-size: 16px; }
.lot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lot-chip { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--lot-panel, var(--bg)); color: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lot-chip:hover { background: var(--hover); }
.lot-chip[aria-pressed="true"] { border-color: #F4C77A; background: #FFF1D6; color: #9A3412; }
.game .lot-hold { position: relative; min-width: 120px; height: 44px; padding: 0 18px; overflow: hidden; border-radius: 22px; background: #FFF1D6; color: #9A3412; box-shadow: inset 0 0 0 1px #F4C77A; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.game .lot-hold:hover { filter: brightness(.97); }
.game .lot-hold:active { scale: 1; }
.lot-hold-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #FFD58A; }
:root[data-theme="dark"] .game-faces-more { background: #E8EEEE; color: #0F1A1C; }
:root[data-theme="dark"] .game .lot-hold { background: #3A2A12; color: #FFCF94; box-shadow: inset 0 0 0 1px #6B4A1A; }
:root[data-theme="dark"] .lot-hold-fill { background: #6B4A1A; }
:root[data-theme="dark"] .lot-chip[aria-pressed="true"] { border-color: #6B4A1A; background: #3A2A12; color: #FFCF94; }
:root[data-theme="dark"] .lot-close { border-color: #6B3A22; background: var(--bg); color: #F0A27A; }
:root[data-theme="dark"] .lot-close:hover { background: #2A1A12; }
.lot-hold-label { position: relative; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.lot-hold-label .i { width: 16px; height: 16px; }
.game .lot-buy-go { min-width: 96px; height: 44px; border-radius: 22px; background: #C81E1E; color: #FFFFFF; }
.game .lot-buy-go:hover { background: #B01A1A; color: #FFFFFF; }
.k-lottery .lot-buy .btn.dim { height: 44px; border-radius: 22px; }
/* 抽奖结束后的那一句：中了绿、没中灰、流拍和关闭赭石。 */
.k-lottery .game-notice { align-items: center; gap: 12px; background: var(--surface); color: var(--soft); }
.k-lottery .game-notice.ok { background: var(--unread); color: var(--primary-hover); }
.k-lottery .game-notice.closed { background: #FBEAE2; color: #A33A00; }
:root[data-theme="dark"] .k-lottery .game-notice.closed { background: #3A2216; color: #F0A27A; }
.k-lottery .game-notice > .i { width: 22px; height: 22px; margin: 0; }
.k-lottery .game-notice strong { font-size: 14px; }
.k-lottery .game-notice span { opacity: .85; }
@media (max-width: 560px) {
  .lot-buy-acts { flex: 1 1 100%; }
  .game .lot-hold, .game .lot-buy-go { flex: 1; }
  .lot-pop { right: -8px; width: min(280px, calc(100vw - 48px)); }
}
/* 全部参与者、中奖名单：上面搜索和排序，下面一长串人；手机上从底下升起来。 */
dialog.modal.people-modal { width: min(440px, calc(100vw - 32px)); max-height: 76vh; padding: 0; }
dialog.modal.people-modal[open] { display: flex; flex-direction: column; overflow: hidden; }
.people-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px 20px; }
.people-head > div { flex: 1; min-width: 0; }
.people-head h2 { margin: 0; font-size: 18px; }
.people-head .iconbtn { flex: none; }
.people-sub { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.people-tools { padding: 0 16px 10px; }
.people-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); }
.people-search .i { flex: none; width: 16px; height: 16px; }
.people-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.people-tools .segmented { display: inline-flex; margin-top: 8px; }
.people-scroll { flex: 1; min-height: 0; padding: 0 8px 12px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--fill); }
.people-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border-radius: 12px; }
.people-row.me { background: #FFF6EF; }
:root[data-theme="dark"] .people-row.me { background: color-mix(in srgb, #C81E1E 12%, transparent); }
.people-rank { flex: none; width: 24px; color: var(--outline-text); font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.people-name { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.people-name a { overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.people-name a:hover { color: var(--primary-hover); }
.people-name small { color: var(--muted); font-size: 12px; }
.people-count { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.people-group { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px; }
.people-group strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.people-group .quiet { flex: none; margin-left: auto; font-size: 12px; }
.people-empty { margin: 0; padding: 20px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.people-empty[hidden] { display: none; }
@media (max-width: 560px) {
  dialog.modal.people-modal { width: 100vw; max-width: 100vw; max-height: 85vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
}
/* 红包领到的金额写在回帖上：「领到 62 能量」「手气最佳」，没领到的「没抢到」。自己领到的那条回帖底色暖一点。 */
.rp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 10px; background: #FFEDE0; color: #C2410C; font-size: 12px; font-weight: 700; line-height: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-badge .i { width: 12px; height: 12px; }
.rp-badge.best { background: #FFF1E0; color: #A86200; }
.rp-badge.miss { background: var(--surface); color: var(--outline-text); font-weight: 400; }
.rp-badge.fresh { animation: rp-open .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes rp-open { 0% { opacity: 0; scale: .5; } 60% { opacity: 1; scale: 1.12; } 100% { scale: 1; } }
:root[data-theme="dark"] .rp-badge { background: #3A2015; color: #FB923C; }
:root[data-theme="dark"] .rp-badge.best { background: var(--note-bg); color: var(--note-fg); }
:root[data-theme="dark"] .rp-badge.miss { background: var(--surface); color: var(--outline-text); }
.reply.rp-mine { background: #FFF9F5; }
:root[data-theme="dark"] .reply.rp-mine { background: color-mix(in srgb, #FB923C 6%, transparent); }
.rp-note { font-weight: 400; }@media (max-width: 560px) {
  .game-hero { flex-direction: column; align-items: stretch; }
  .game-countdown > span { width: 52px; }
  .game-actions { justify-content: flex-start; margin-left: 0; }
}
/* 标题前和列表里的类型标签：「投票」「红包 · 剩 6 份」…… */
.kind-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--k-bg); color: var(--k-ink); font-size: 12px; font-weight: 700; line-height: 22px; white-space: nowrap; vertical-align: 2px; }
.kind-badge.big { flex: none; height: 26px; margin: 3px 0 0; padding: 0 8px; border-radius: 8px; font-size: 13px; line-height: 26px; }
.kind-badge .i { width: 14px; height: 14px; }
.post-title-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.post-title-row > .post-title { margin-top: 0; }.tagpill.featured { background: var(--level-bg); color: var(--level-fg); }
/* personal: 成人内容的标记；没打开「显示成人内容」时卡片折叠（摘要和图片点了才露出来）。 */
.tagpill.adult { margin-left: 6px; background: var(--warn-bg); color: var(--warn-ink); vertical-align: 2px; }
/* 折叠着的成人内容：摘要、图片、视频、缩略图一律不露。用 !important 是因为卡片视图、紧凑视图各有显示它们的规则，折叠要压过全部。 */
.card-post.adult-fold :is(.card-excerpt, .card-media, .card-thumb, .hashtags) { display: none !important; }
.adult-reveal { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.card-post:not(.adult-fold) .adult-reveal { display: none; }
.gif-still { max-width: 100%; height: auto; cursor: pointer; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
/* 已解决：标题下面的标记，和被标为答案的那条回复。 */
.tagpill .i { width: 14px; height: 14px; margin-right: 2px; vertical-align: -2px; stroke-width: 2.5; }
a.tagpill.ok:hover { color: var(--primary); filter: brightness(.96); }
/* 被采纳的回复：浅绿底、绿描边（设计稿 Post 的 bestBd / bestBg），样式在文件末尾「最佳答案」一节。 */
.card-title .tagpill, .trow-title .tagpill { margin-left: 8px; vertical-align: middle; }
/* 表单里并排的两项，和收着的「更多」。 */
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-more > summary { display: inline-flex; min-height: 44px; align-items: center; color: var(--primary); font-weight: 500; cursor: pointer; }
.form-more[open] > summary { margin-bottom: 4px; }
.form-more .form-pair { margin-top: 8px; }
.prize-rows { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 8px; }
.prize-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 76px 44px; gap: 8px; align-items: center; }
@media (max-width: 860px) { .form-pair { grid-template-columns: 1fr; } .prize-row { grid-template-columns: 1fr 1fr; } }
/* 登录、注册、找回密码表单里的人机验证（templates/captcha.html，static/captcha.js）：先占好组件的高度，加载出来时表单不跳。
   组件本身是那一家画的固定宽度（约 300px），窄屏上也放得下。 */
.captcha-field[hidden] { display: none; }
.captcha-box { min-height: 78px; max-width: 100%; overflow: hidden; }
.captcha-field .au-msg { margin-top: 4px; }
.set-buttons { display: inline-flex; gap: 8px; }
/* 帖内标签页：上面一排标题，下面一次只显示一页。脚本没起作用时各页依次排开，标题写在每一页前面。 */
.post-tabs { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.tabs-bar { display: flex; gap: 4px; padding: 6px 6px 0; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs-tab { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tabs-tab:hover { background: var(--hover); color: var(--ink); }
.tabs-tab[aria-selected="true"] { border-bottom-color: var(--primary); color: var(--ink); font-weight: 700; }
.tab-pane { padding: 12px 16px; }
.tab-pane > :first-child { margin-top: 0; }
.tab-pane > :last-child { margin-bottom: 0; }
.post-tabs:not([data-ready]) .tab-pane::before { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 700; content: attr(data-tab-title); }
.post-tabs:not([data-ready]) .tab-pane + .tab-pane { border-top: 1px solid var(--line); }
/* 长帖的目录。点目录滚过去时，小标题停在顶栏下面，不被它挡住。 */
.prose :is(h1, h2, h3, h4) { scroll-margin-top: 72px; }
.toc nav { display: flex; flex-direction: column; margin-top: 6px; }
.toc-link { display: block; padding: 5px 0; overflow: hidden; color: var(--soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.toc-link:hover { color: var(--ink); }
.toc-link.on { color: var(--ink); font-weight: 700; }
/* 目录在吸顶的右栏最上面（见「右侧栏吸顶」）；首帖整个滚出屏幕后淡出、收起，滚回来再淡入（features.js 加减 .toc-out）。 */
.toc { transition: opacity .2s ease; }
.toc.toc-out { opacity: 0; }
/* 阅读模式：只留正文。 */
:root[data-reader] .side, :root[data-reader] .rail, :root[data-reader] [data-topic] .aside { display: none; }
:root[data-reader] .shell { grid-template-columns: minmax(0, 1fr); }
:root[data-reader] [data-topic].cols { grid-template-columns: minmax(0, 760px); justify-content: center; }
:root[data-reader] .op .prose { font-size: 17px; line-height: 1.8; }
[data-action="reader-mode"][aria-pressed="true"] { background: var(--fill); }
/* 「加到主屏幕」的提示，贴在屏幕底部。 */
.a2hs { position: fixed; z-index: 55; right: 12px; bottom: 12px; left: 12px; display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-radius: 16px; background: var(--night); color: var(--on-night); font-size: 13px; box-shadow: var(--shadow-pop); }
.a2hs span { flex: 1; }
.a2hs .iconbtn { color: inherit; }
/* 提示条上的按钮（「撤销」）。 */
.toast-action { height: 36px; margin: -6px -12px -6px 4px; padding: 0 14px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .16); color: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.notif-item { display: flex; gap: 12px; padding: 10px 16px; color: var(--ink); line-height: 1.45; }
.notif-item:hover { background: var(--hover); color: var(--ink); }
.notif-item.unread { background: var(--unread); }
.notif-item .avatar, .notif-sys { flex: none; width: 36px; height: 36px; border-radius: 50%; }
.notif-sys { display: flex; align-items: center; justify-content: center; background: var(--night); color: var(--on-night); }
.notif-sys .i { width: 18px; height: 18px; }
.notif-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notif-text small { display: block; color: var(--muted); font-size: 12px; }
/* 顶栏的通知面板：标题和「全部标为已读」，最近的几条，底下一行去通知页。 */
/* 通知里可能有很长的英文词、链接：一律可以断开换行，不把面板撑出屏幕。 */
.notif-panel { width: min(380px, calc(100vw - 32px)); padding: 0; overflow: hidden; border-radius: 16px; overflow-wrap: anywhere; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 4px 16px; }
.notif-head h2 { min-width: 0; margin: 0; font-size: 16px; font-weight: 700; }
.notif-head .btn { flex: none; font-size: 13px; }
.notif-body { max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.notif-blank { margin: 0; padding: 28px 16px; text-align: center; }
.notif-all { display: flex; height: 48px; align-items: center; justify-content: center; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.notif-all:hover { background: var(--hover); color: var(--ink); }
.dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--signal); }

/* 表单：标签在上方，输入框高 44、圆角 12。 */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form + .form { padding-top: 20px; border-top: 1px solid var(--line); }
.form h2 { font-size: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.form label .hint { font-weight: 400; color: var(--muted); }
.form label > :is(input, select, textarea), .form .prefixed { font-size: 14px; font-weight: 400; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="datetime-local"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink);
}
textarea { padding: 10px 14px; line-height: 1.6; resize: vertical; }
:is(input, select, textarea):focus-visible { border-color: var(--primary); }
::placeholder { color: var(--muted); opacity: 1; }
input[type="color"] { width: 64px; height: 44px; padding: 4px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 21px) 19px, calc(100% - 15px) 19px; background-repeat: no-repeat; background-size: 6px 6px; }
.prefixed { display: flex; align-items: center; height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; }
.prefixed > span { color: var(--muted); font-weight: 700; }
.prefixed input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0 4px; border: 0; outline: none; }
.form :is(input, textarea, select)[aria-invalid="true"], input[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--danger); padding-left: 13px; padding-right: 13px; }
.field-error { display: block; margin-top: 4px; color: var(--danger); font-size: 12px; font-weight: 400; }
:is(input, textarea, select):disabled { border-color: var(--line); background: var(--surface); color: var(--muted); cursor: not-allowed; }
.form label:has(> :is(input, textarea, select):disabled) { color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; }

/* 登录和注册。 */
.main.auth { display: flex; justify-content: center; padding: 32px 0; }
.auth-card { display: flex; width: min(420px, 100%); flex-direction: column; padding: 28px; border-radius: 16px; box-shadow: var(--shadow-pop); }
.auth-icon { display: block; border-radius: 12px; }
.auth-card h1 { margin-top: 12px; font-size: 22px; }
.auth-card .quiet { margin-top: 4px; }
.auth-card .alert { margin-top: 12px; }
.auth-card .form { gap: 12px; }
.auth-card .btn.tall { margin-top: 4px; }
.auth-card > .btn.text { margin-top: 4px; }
.oauth { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }

/* 管理页面。 */
.review .reports { margin: 8px 0; padding-left: 20px; color: var(--soft); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; }
.table th { padding: 8px 12px; border-bottom: 2px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.table td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.row-actions { white-space: nowrap; }

/* 弹窗：圆角 16，遮罩，操作在右下。 */
dialog.modal { width: min(460px, calc(100vw - 32px)); max-height: 84vh; margin: 10vh auto auto; padding: 20px 24px 24px; overflow-y: auto; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.modal.large { width: min(680px, calc(100vw - 32px)); margin-top: 6vh; max-height: 88vh; }
dialog.modal.form { width: min(520px, calc(100vw - 32px)); }
/* ask() 的弹窗：头、中、脚三段，只有中间滚动。 */
dialog.modal.ask[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.modal.ask > .modal-head { flex: none; }
dialog.modal.ask > .modal-scroll { flex: 1; min-height: 0; padding-bottom: 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
/* 滚动区左右各让出 4px（再用负边距抵回去，内容位置不变）：输入框、编辑器聚焦时画在框外的那圈不会被左右裁掉。 */
dialog.modal.ask > .modal-scroll { margin-inline: -4px; padding-inline: 4px; }
dialog.modal.ask > .modal-actions { flex: none; margin-top: 16px; }
dialog.modal[open] { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.modal::backdrop { background: var(--scrim); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 20px; }
.modal-head .iconbtn { margin-right: -10px; }
.modal-text { margin: 4px 0 8px; color: var(--muted); overflow-wrap: anywhere; }
/* 弹窗里的东西再长也只竖着滚：一长串不带空格的字（密钥、地址）在哪儿都能折行。 */
dialog.modal { overflow-x: hidden; }
.modal-body { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; overflow-wrap: anywhere; }
/* 迁移弹窗：原因选「推广」、楼主是认证商家在自己的节点里发的，提醒一句 */
.modal-body:has(> .mv-promo-note[hidden]) { display: none; }
.mv-promo-note { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--level-bg); color: var(--level-fg); font-size: 13px; }
.mv-promo-note[hidden] { display: none; }
.mv-promo-note span { color: var(--soft); }
.modal-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.modal .label-line .hint { font-weight: 400; }
.modal .form { margin-top: 8px; }
.modal fieldset { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
.modal .choice { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 400; }
.modal .choice input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* 弹窗底下：次按钮照常（离边 18），右边的主按钮离边 22。 */
.modal-actions .btn:is(.primary, .danger) { padding: 0 21px; }

/* 提示条：底部居中，一次只显示一条。 */
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; display: flex; max-width: calc(100vw - 32px); align-items: center; gap: 8px; padding: 12px 20px; border-radius: 24px; background: var(--toast-bg); color: var(--toast-fg); font-weight: 500; box-shadow: var(--toast-shadow); translate: -50% 0; animation: toast .24s cubic-bezier(.2, .8, .2, 1); }
.toast::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--toast-ok); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.toast.error::before { background: var(--signal); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17v.5'/%3E%3C/svg%3E"); }

@keyframes pop { from { opacity: 0; scale: .96; translate: 0 10px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes toast { from { opacity: 0; translate: -50% 14px; } to { opacity: 1; translate: -50% 0; } }
@keyframes slide-in { from { translate: -100% 0; } to { translate: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 中等宽度（不到 1000）：右侧信息栏排到内容下面。 */
@media (max-width: 999px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding: 0 16px; }
}

/* 手机：导航收进左侧抽屉，右下角是发帖按钮，不用底部标签栏。 */
@media (max-width: 860px) {
  .only-wide { display: none !important; }
  .only-narrow { display: revert !important; }
  span.only-narrow, a.only-narrow { display: inline !important; }
  .iconbtn.only-narrow, .fab.only-narrow, .chip.only-narrow { display: inline-flex !important; }
  .menu-item.only-narrow { display: flex !important; }
  /* 抽屉里只在手机上出现的条目（聊天）也是一行图标加字，不能被上面的 a.only-narrow 设成 inline。 */
  .side-item.only-narrow { display: flex !important; }
  body { line-height: 1.5; }
  input, select, textarea { font-size: 16px !important; }
  .scrim[hidden] { display: none !important; }
  .search-form.only-narrow { display: flex !important; }

  .top { flex-wrap: nowrap; gap: 4px; height: 56px; min-height: 0; padding: 0 8px; }
  .logo img { height: 30px; }
  .top-actions { gap: 0; }
  .i { width: 24px; height: 24px; }
  .votes .i, .pill .i, .textbtn .i, .side-item .i, .btn .i, .pin-mark .i, .menu-item .i { width: 20px; height: 20px; }

  .shell { display: block; padding: 0; }
  [data-nav="closed"] .side { overflow: visible; visibility: visible; opacity: 1; }
  .page { padding: 0 0 96px; }
  .scrim { position: fixed; z-index: 70; inset: 0; background: var(--scrim); animation: fade .2s ease-out; }
  .side { position: fixed; z-index: 71; top: 0; bottom: 0; left: 0; display: none; align-self: auto; width: 304px; max-width: 86%; height: 100dvh; max-height: none; padding: 0; background: var(--bg); }
  .side.open { display: block; animation: slide-in .28s cubic-bezier(.2, .8, .2, 1); }
  .drawer-head { display: flex !important; align-items: center; gap: 12px; padding: 16px 8px 12px 16px; background: var(--night); color: var(--on-night); }
  /* 登录了：整块头都是账号头（封面底），关闭按钮压在右上角。 */
  .drawer-head:has(> .acct-head) { position: relative; display: block !important; padding: 0; background: none; }
  .drawer-head > .acct-head { padding: 16px 56px 14px 16px; }
  .drawer-head > .acct-head .acct-face .avatar { width: 52px; height: 52px; font-size: 20px; }
  .drawer-head > .acct-head .acct-name { font-size: 16px; }
  .drawer-head > .acct-head .acct-chip { height: 30px; border-radius: 15px; }
  .drawer-head > .acct-head .acct-line { margin-top: 12px; }
  .drawer-head:has(> .acct-head) > .iconbtn { position: absolute; z-index: 1; top: 18px; right: 8px; }
  .drawer-head .iconbtn { color: var(--on-night); }
  .drawer-head .iconbtn:hover { background: rgba(255, 255, 255, .12); }
  .drawer-user { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; color: var(--on-night); line-height: 1.35; }
  .drawer-user:hover { color: var(--on-night); }
  .drawer-user strong { display: block; font-size: 16px; }
  .drawer-user small { display: block; color: var(--night-soft); }
  .avatar.guest { width: 48px; height: 48px; background: #2A4A3E; }
  .side-items { padding: 8px; }
  .side-item { gap: 14px; height: 48px; }
  .side-label { padding: 4px 12px; }
  .side hr { margin: 8px 0; }

  .fab { position: fixed; z-index: 20; right: 16px; bottom: 20px; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--primary-bg); color: var(--on-primary); box-shadow: 0 6px 20px rgba(11, 31, 24, .3); }
  .fab:hover { color: var(--on-primary); }
  .fab:active { scale: .95; }

  .aside { display: none; }
  .main.solo, .main.form-page, .main.padded { padding: 12px 16px 0; }
  .main-head { flex-wrap: nowrap; padding: 8px 12px; overflow-x: auto; }
  .main-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .main-head.plain { padding: 12px 16px 0; overflow: visible; }
  .main-head.plain h1 { position: static; width: auto; height: auto; clip-path: none; font-size: 24px; }
  .main-head .chips, .chips { flex-wrap: nowrap; gap: 8px; overflow-x: auto; }
  .chips.pad { padding: 8px 16px 12px; }
  .chip, .chip.quiet { background: var(--fill); color: var(--ink); font-size: 14px; }
  .chip.on, .chip.quiet.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
  .tinted .chip.on { background: var(--key); color: var(--key-ink); }
  .segmented { display: none; }
  h1.big { font-size: 24px; }

  .card-title { font-size: 16px; }
  .card-excerpt { font-size: 13px; -webkit-line-clamp: 2; }
  /* 信息流里的分享只留图标，靠右。 */
  .card-post .share { width: 44px; margin-left: auto; padding: 0; justify-content: center; border-radius: 50%; }
  .card-post .share span, .card-post .app-tool span { display: none; }
  .card-post .app-tool { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }

  .ttable { border-top: 1px solid var(--line); }
  .trow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .trow.head { display: none; }
  .trow-title { font-weight: 700; }
  .trow-replies { gap: 4px; min-width: 60px; padding: 0 10px; border-radius: 22px; background: var(--fill); font-size: 13px; }
  .trow-replies .i { display: block; width: 16px; height: 16px; }

  .rank-grid { grid-template-columns: minmax(0, 1fr); }
  .rank-row { padding: 10px 0; }
  .rank { width: 18px; font-size: 13px; }

  .node-banner { height: 72px; margin: 0; border-radius: 0; }
  .node-banner.has-image { height: 96px; }
  .gut { width: 20px; }
  .gut .vline, .gut .elbow { left: 9px; }
  .gut .elbow { width: 11px; }
  .gut:last-of-type .elbow { width: 17px; }
  .segmented.labeled { display: flex; }
  .segmented.labeled a { padding: 0 12px; }
  .node-head { align-items: flex-end; margin-top: -28px; }
  .node-head > .avatar, .nlook-face > .avatar { width: 64px !important; height: 64px !important; border-width: 3px; font-size: 28px !important; }
  .node-head h1 { order: 3; flex-basis: 100%; font-size: 22px; line-height: 1.3; }
  .node-actions { margin-left: auto; }
  .node-lead { display: block !important; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
  .node-lead p { margin-top: 6px; font-size: 13px; color: var(--soft); }
  .node-lead + .cols { margin-top: 0; }

  .post-title { font-size: 20px; }
  .pager-controls { width: 100%; justify-content: space-between; }
  .profile-head + .main-head { padding: 0 12px 12px; }
  .auth-card { padding: 20px; box-shadow: none; }
  .main.auth { padding: 8px 16px; }
  .auth-card input { min-height: 48px; }

  /* 菜单和弹窗在手机上换成更容易够到的形式。 */
  .menu-panel { position: fixed; z-index: 72; top: auto; right: 0; bottom: 0; left: 0; width: auto; padding: 8px 8px 16px; border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .menu-panel::before { content: ""; display: block; width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 2px; background: var(--thread); }
  .menu-item { height: 52px; }
  .menu[open]::before { content: ""; position: fixed; z-index: 71; inset: 0; background: var(--scrim); }
  /* 通知面板从底部升起，最多占屏幕的四分之三，中间那几条自己滚。 */
  .notif-panel { display: flex; max-height: 76%; flex-direction: column; padding: 0 0 8px; }
  .notif-panel::before { flex: none; margin: 8px auto 0; }
  .notif-head { padding: 4px 8px 4px 16px; }
  .notif-body { flex: 1; min-height: 0; max-height: none; }
  .notif-item { padding: 12px 16px; }
  /* 通知页：手机上没有删除按钮（设计稿如此），两边的留白收一点。 */
  .notif-row { margin: 0 -8px; padding: 12px 8px; }
  .notif-remove { display: none; }
  /* personal: 外层 main 已经有 16 的内边距，通知页自己不再加左右留白（设计稿两边各 16）。 */
  .notif-page { padding: 0 0 32px; }
  dialog.modal, dialog.modal.large { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 12px 16px 24px; border-radius: 0; }
}
@keyframes sheet { from { translate: 0 100%; } to { translate: 0 0; } }

/* ===== 积分、私信、应用等新页面，以及帖子正文里的投票、链接卡片、视频、提示框、嵌入的应用 ===== */
.btn.signal { background: var(--signal); color: var(--on-signal); }
button.tab { border: 0; border-bottom: 3px solid transparent; background: none; }
button.side-item { width: 100%; border: 0; background: none; text-align: left; }
.side-emoji { display: inline-flex; width: 22px; justify-content: center; }
/* 左侧导航最下面的两组：标签、资源。组名是可以点的，点了收起。 */
.side-fold > summary { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; list-style: none; user-select: none; }
.side-fold > summary::-webkit-details-marker { display: none; }
.side-fold > summary .i { width: 14px; height: 14px; transition: rotate .18s ease; }
.side-fold:not([open]) > summary .i { rotate: -90deg; }
.side-icon { display: inline-flex; }
.side-fold > summary:hover { background: var(--hover); }
.side-dot { flex: none; width: 8px; height: 8px; margin-left: 2px; border-radius: 50%; background: #2BB673; }
.side-split { margin: 6px 12px; }
/* 开放登录、能量星球：自己的应用一张张卡片，新建在弹窗里。 */
.page-lead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.page-lead > p { flex: 1 1 320px; max-width: 720px; margin: 0; }
.page-lead > .btn { flex: none; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 24px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.empty-state p { margin: 0; }
.app-cards { display: flex; flex-direction: column; gap: 12px; }
.app-card { display: flex; flex-direction: column; gap: 10px; }
.app-card > p { margin: 0; overflow-wrap: anywhere; }
.app-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.app-card-title { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 16px; }
.app-facts { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 8px 16px; margin: 0; }
.app-facts dt { color: var(--muted); font-size: 13px; }
.app-facts dd { min-width: 0; margin: 0; }
.app-uris { display: flex; flex-direction: column; gap: 4px; }
.app-uris code, .copy-value { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
/* 一格可以复制的值：等宽字，再长也折行，右边是复制按钮。 */
.copy-field { display: flex; min-width: 0; align-items: center; gap: 4px; padding: 2px 2px 2px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.copy-value { flex: 1; min-width: 0; padding: 6px 0; user-select: all; }
.copy-press { width: 36px; height: 36px; color: var(--muted); }
.copy-press .i { width: 18px; height: 18px; }
.copy-press.done { color: var(--primary); }
/* 只显示一次的密钥：上面一句提醒，下面每样一格。 */
.modal-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--level-bg); color: var(--level-fg); font-size: 14px; }
.modal-note .i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.secret-list { display: flex; flex-direction: column; gap: 10px; }
.secret-row { display: flex; flex-direction: column; gap: 4px; }
.secret-name { color: var(--muted); font-size: 13px; font-weight: 700; }
/* 应用的表：名字是能点的（点了看详情），编号是等宽字、放不下就省略。 */
.name-cell { display: flex; min-width: 0; flex-direction: column; }
.name-cell small { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-link { align-self: flex-start; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.name-link:hover { color: var(--primary); text-decoration: underline; }
.code-cell { display: inline-block; max-width: 300px; overflow: hidden; font-family: var(--mono); font-size: 13px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.table td:has(> .set-buttons) { text-align: right; white-space: nowrap; }
.modal-body .app-facts { gap: 10px 16px; }
.modal-body .app-uris { gap: 6px; }
@media (max-width: 600px) { .app-facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .app-facts dd { margin-bottom: 8px; } }
/* 合作伙伴 */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.partner-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.partner-logo { display: inline-flex; flex: none; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); object-fit: contain; font-weight: 700; }
.partner-body { display: flex; min-width: 0; flex: 1; flex-direction: column; }
/* 友情推荐：项目的列表和项目页 */
.project-head { margin-bottom: 12px; }
.project-head p { margin: 0; }
.project-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 12px; }
.project-bar input[type="search"] { width: 200px; max-width: 100%; }
.chip-count { margin-left: 6px; color: var(--muted); font-size: 12px; }
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.project-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.project-card.featured { border-color: var(--primary); }
.project-card-main { display: flex; min-width: 0; flex: 1; align-items: center; gap: 14px; color: var(--ink); }
.project-card-main:hover { color: var(--ink); }
.project-card-main:hover strong { text-decoration: underline; }
.project-card-body { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.project-card-body strong { display: flex; align-items: center; gap: 8px; }
.project-logo { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface); object-fit: cover; font-size: 22px; font-weight: 700; }
.project-summary { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; }
.project-rating { display: inline-flex; align-items: center; gap: 4px; }
.stars { color: #f1a23a; letter-spacing: 1px; }
.stars-off { color: var(--line); }
.project-holder:empty, .project-mine:empty { display: none; }
.project-submit { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.project-waiting { display: flex; flex-direction: column; gap: 8px; }
.project-waiting h2 { font-size: 15px; }
.project-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.project-hero { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.project-hero-body { display: flex; min-width: 240px; flex: 1; flex-direction: column; gap: 8px; }
.project-hero-body h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 26px; }
.project-hero-body .project-summary { font-size: 16px; -webkit-line-clamp: unset; }
.project-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.project-about { max-width: 860px; margin-bottom: 28px; }
.project-reviews { display: flex; max-width: 860px; flex-direction: column; gap: 14px; }
.project-reviews > h2 { font-size: 18px; }
.project-write { display: flex; flex-direction: column; gap: 10px; }
.project-write h2 { font-size: 15px; }
.star-row { display: flex; gap: 2px; }
.star-pick { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--line); font-size: 24px; line-height: 1; }
.star-pick.on { color: #f1a23a; }
.star-pick:hover { background: var(--hover); }
.project-review { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.project-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.project-review p { margin: 0; white-space: pre-wrap; }
.project-reply { padding: 10px 14px; border-radius: 10px; background: var(--surface); font-size: 14px; }
.project-reply-edit:not(:empty) { display: flex; flex-direction: column; gap: 8px; }
/* 所有标签 */
/* 所有标签（照设计稿）：头部（标题、一句说明、筛选框）、工具行（范围、显示方式、排序）、按组或平铺的大卡片。 */
.main.solo.tags-main { gap: 0; }
.tags-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tags-title { flex: 1 1 280px; min-width: 0; }
.tags-title h1 { font-size: 30px; font-weight: 800; line-height: 1.25; }
.tags-title p { margin-top: 4px; font-size: 13px; }
.tags-filter { position: relative; display: flex; flex: 0 1 280px; align-items: center; }
.tags-filter > .i { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.tags-filter input { width: 100%; height: 44px; padding-left: 42px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); font-size: 15px; }
.tags-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0; }
.tags-scope { display: flex; gap: 8px; }
.scope-chip { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.scope-chip span { font-weight: 400; opacity: .75; }
.scope-chip.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.tags-tools .segmented { display: flex; }
.tags-section + .tags-section { margin-top: 20px; }
.tags-section[hidden] { display: none; }
.tags-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 12px; }
.tags-group-head h2 { font-size: 18px; }
.tags-group-head > .quiet { font-size: 13px; }
.tags-group-head p { flex-basis: 100%; margin: 0; font-size: 13px; }
.note-chip { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--note-bg); color: var(--note-fg); font-size: 12px; font-weight: 700; line-height: 22px; white-space: nowrap; }
.group-chip { display: inline-block; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 22px; white-space: nowrap; }
a.group-chip:hover { color: var(--ink); }
.tags-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tag-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.tag-card[hidden] { display: none; }
/* 设计稿的标签卡片停上去不变色：标签链接铺满整张卡片，别处标签停上去加深底色的效果这里去掉。 */
.tag-card-name > a.tg.tg-soft:hover { background: color-mix(in srgb, var(--tg-c) var(--tg-tint), transparent); }
.tag-card-name > a.tg.tg-solid:hover { filter: none; }
.tag-card-name > a.tg.tg-outline:hover { background: var(--bg); }
.tag-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 整张卡都能点：名字的链接盖住整张卡，关注按钮浮在上面。 */
.tag-card-name { flex: 1; min-width: 0; display: flex; }
.tag-card-name > .tg { height: 28px; padding: 0 11px; border-radius: 14px; font-size: 14px; }
/* 整张卡片都能点：标签的链接铺满卡片（关注按钮在它上面）。 */
.tag-card-name > .tg::after { position: absolute; inset: 0; border-radius: 16px; content: ""; }
.tag-card-count { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tag-card-desc { display: -webkit-box; min-height: 40px; margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 20px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tag-card-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-main:not(.flat) .flat-only { display: none; }
.tag-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.tag-today { color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.tag-today.none { color: var(--outline-text); font-weight: 400; }
.tag-follow { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--chip-on-bg); border-radius: 18px; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 13px; font-weight: 700; cursor: pointer; }
.tag-follow:hover { color: var(--chip-on-fg); filter: brightness(1.1); }
.tag-follow .i { width: 15px; height: 15px; }
.tag-follow.on { border-color: var(--outline); background: var(--bg); color: var(--ink); }
.tag-follow.on:hover { color: var(--ink); filter: brightness(.97); }
/* 说明页：关于、常见问题、服务条款、隐私政策 */
.view .view-body, .view-tab { display: flex; flex-direction: column; gap: 16px; }
.view .view-body > .tabs.line, .view-body > .tabs.line { margin-bottom: 0; }
.view h2 { margin-top: 8px; }
.view-body h3 { margin: 8px 0 -4px; font-size: 14px; }
.view-body fieldset { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; }
.view-body legend { padding: 0 0 6px; font-size: 13px; font-weight: 700; }
.form-actions.start { justify-content: flex-start; }
.modal-text { white-space: pre-line; }
.stats.wide { max-width: 420px; padding: 16px; border: 0; border-radius: 16px; background: var(--surface); }
.stats.wide b { font-size: 24px; }
.plus { color: var(--primary); } .minus { color: var(--danger); }
.calendar { display: grid; grid-template-columns: repeat(7, 40px); gap: 6px; }
.calendar .day { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; }
.calendar .day.on { background: var(--primary-bg); color: var(--on-primary); font-weight: 700; }
.calendar .day.today { outline: 2px solid var(--signal); outline-offset: 1px; }
.copyable { width: 100%; min-width: 260px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-family: var(--mono); font-size: 12px; }
.profile-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tips-line { margin-top: 8px; }


.app-logo { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--night); color: var(--on-night); font-size: 18px; }
.app-logo.big { width: 72px; height: 72px; border-radius: 20px; font-size: 32px; }
.app-admin .table { min-width: 560px; }

.prose .poll:not(.ready) { margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.prose .poll:not(.ready) ul { margin: 0; padding-left: 20px; color: var(--muted); }
.prose .poll.game { margin: 0 0 12px; }
.poll-form { display: flex; flex-direction: column; gap: 8px; }
.poll-form > .game-foot { margin-top: 6px; }
.poll-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 500; cursor: default; transition: border-color .18s, box-shadow .18s, filter .18s, scale .12s; }
.poll-option.pick { cursor: pointer; }
.poll-option.pick:hover { filter: brightness(.95); }
/* 选项是整行宽的，按下缩到 .95 会差出几十像素，跟成就卡片一样用 .98。 */
.poll-option.pick:active { scale: .98; }
.poll-option::before { position: absolute; inset: 0 auto 0 0; width: var(--fill, 0); background: #EEF2F4; content: ""; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.poll-option.mine::before { background: #D3EEDF; }
.poll-option.top::before { background: #FFE9CF; }
:root[data-theme="dark"] .poll-option::before { background: var(--fill); }
:root[data-theme="dark"] .poll-option.top::before { background: var(--note-bg); }
:root[data-theme="dark"] .poll-option.mine::before { background: color-mix(in srgb, var(--primary) 24%, transparent); }
.poll-option:is(.top, .mine) .poll-text > span:first-child { font-weight: 700; }
.poll-option:has(.poll-input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.poll-option > * { position: relative; }
.poll-option .poll-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-option .poll-count { display: flex; flex: none; align-items: baseline; gap: 5px; white-space: nowrap; }
.poll-option .poll-count strong { font-weight: 700; }
.poll-option .poll-count span { color: var(--muted); font-size: 12px; }
.poll-option .poll-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.poll-check { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid var(--outline); border-radius: 50%; background: var(--bg); color: #FFFFFF; transition: background-color .18s, border-color .18s, box-shadow .18s; }
.poll-check.square { border-radius: 5px; }
.poll-check .i { width: 12px; height: 12px; stroke-width: 3; opacity: 0; scale: .5; transition: opacity .18s, scale .18s cubic-bezier(.2, .8, .2, 1); }
.poll-input:checked + .poll-check { border-color: var(--primary-bg); background: var(--primary-bg); }
.poll-input:checked + .poll-check .i { opacity: 1; scale: 1; }
.poll-input:focus-visible + .poll-check { box-shadow: var(--focus-ring); }
:root[data-theme="dark"] .poll-check { color: var(--bg); }


.video-embed { margin: 0 0 12px; }
/* 视频：先占好 16:9 的位置，快滚到了再把视频网站的播放器放进来。 */
.video-slot { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--night); }
.video-slot iframe { display: block; width: 100%; height: 100%; border: 0; }
/* 上传的视频：位置按它自己的宽高比留，竖着拍的限高、居中。 */
.video-slot.upload { display: flex; align-items: center; justify-content: center; max-height: 80vh; }
.video-slot.upload.portrait { width: auto; max-width: 100%; height: min(70vh, 640px); margin-inline: auto; }
.video-slot video { display: block; width: 100%; height: 100%; background: #000; }
.video-note { margin: 0; padding: 16px; color: var(--on-night); font-size: 14px; text-align: center; }
/* 上传视频的播放器（设计稿「组件 · 视频播放器」，脚本在 media.js）。画面按比例整个放进框里，框比画面宽出来的地方是模糊的封面；
   控制条压在画面下沿，播着的时候指针移开就收起来，只留右下角的静音按钮。颜色不跟主题走：它压在画面上。 */
.video-slot.vp-host { display: block; aspect-ratio: auto; max-height: none; overflow: visible; border-radius: 0; background: none; }
.vp-root { position: relative; width: 100%; max-height: 520px; box-sizing: border-box; overflow: hidden; isolation: isolate; border-radius: 16px; background: #0A0D0E; color: #FDFDFD; font-size: 14px; line-height: 1.5; user-select: none; -webkit-user-select: none; }
.vp-root:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vp-root:fullscreen { width: 100vw; height: 100vh; max-height: none; border-radius: 0; aspect-ratio: auto !important; }
.vp-root:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; border-radius: 0; aspect-ratio: auto !important; }
.vp-root .vp-blur { position: absolute; top: -12%; left: -12%; width: 124%; max-width: none; height: 124%; border-radius: 0; object-fit: cover; filter: blur(32px) saturate(1.2) brightness(.42); pointer-events: none; }
.vp-root .vp-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: none; object-fit: contain; }
.vp-surface { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.vp-surface:active { scale: 1; }
.vp-surface:focus-visible { outline: none; }
.vp-root.full:not(.bar), .vp-root.full:not(.bar) .vp-surface { cursor: none; }
.vp-center { position: absolute; z-index: 2; top: 50%; left: 50%; display: flex; min-width: 64px; height: 64px; margin-top: -32px; box-sizing: border-box; align-items: center; justify-content: center; gap: 8px; border-radius: 32px; background: rgba(10, 13, 14, .62); color: #FDFDFD; font-size: 15px; font-weight: 700; translate: -50% 0; pointer-events: none; transition: opacity .22s ease, scale .28s cubic-bezier(.2, .8, .2, 1); }
.vp-center-icon { display: flex; }
.vp-root.playing .vp-center, .vp-root.failed .vp-center { opacity: 0; scale: .7; }
.vp-root.ended .vp-center { padding: 0 22px 0 18px; }
/* 卡住等数据的时候中间转一个圈（原来浏览器自带的控制条会转，换成自己的之后要补上）。 */
.vp-root.waiting.playing .vp-center { opacity: 1; scale: 1; }
.vp-root.waiting.playing .vp-center-icon { width: 28px; height: 28px; box-sizing: border-box; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #FDFDFD; border-radius: 50%; animation: vp-spin .8s linear infinite; }
.vp-root.waiting.playing .vp-center-icon svg { display: none; }
@keyframes vp-spin { to { rotate: 360deg; } }
.vp-note { position: absolute; z-index: 2; top: 50%; left: 50%; max-width: 86%; padding: 6px 14px; border-radius: 16px; background: rgba(10, 13, 14, .78); font-size: 14px; text-align: center; translate: -50% -50%; pointer-events: none; }
.vp-bar { position: absolute; z-index: 3; right: 0; bottom: 0; left: 0; display: flex; height: 72px; box-sizing: border-box; align-items: center; gap: 2px; padding: 24px 52px 0 8px; background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .42) 55%, rgba(0, 0, 0, 0) 100%); opacity: 0; translate: 0 10px; pointer-events: none; transition: opacity .25s ease, translate .25s cubic-bezier(.2, .8, .2, 1); }
.vp-root.bar .vp-bar { opacity: 1; translate: 0 0; pointer-events: auto; }
.vp-btn { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #FDFDFD; cursor: pointer; transition: background-color .18s ease, scale .18s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
.vp-btn:hover { background: rgba(255, 255, 255, .16); }
.vp-btn:active { scale: .9; }
.vp-btn:focus-visible, .vp-chip:focus-visible, .vp-track:focus-visible { outline: 2px solid #FDFDFD; outline-offset: 1px; }
.vp-gear svg { transition: rotate .35s cubic-bezier(.2, .8, .2, 1); }
.vp-root.menu-open .vp-gear svg { rotate: 60deg; }
.vp-track { display: flex; flex: 1; min-width: 40px; height: 40px; margin: 0 10px 0 6px; align-items: center; cursor: pointer; touch-action: none; }
.vp-rail { position: relative; width: 100%; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .26); transition: height .15s ease; }
.vp-track:hover .vp-rail, .vp-track[data-scrub="1"] .vp-rail { height: 6px; }
.vp-buf, .vp-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.vp-buf { background: rgba(255, 255, 255, .3); transition: width .3s linear; }
.vp-fill { background: #FDFDFD; }
.vp-thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #FDFDFD; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); scale: 0; transition: scale .15s ease; }
.vp-track:hover .vp-thumb, .vp-track:focus-visible .vp-thumb, .vp-track[data-scrub="1"] .vp-thumb { scale: 1; }
/* 播着的时候进度一格一格地报（一秒四次），中间用过渡补上；拖的时候、停着的时候要立刻到位。 */
.vp-root.playing .vp-track[data-scrub="0"] :is(.vp-fill, .vp-thumb) { transition: width .25s linear, left .25s linear, scale .15s ease; }
.vp-time { flex: none; margin-right: 6px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-vol { position: absolute; z-index: 4; right: 8px; bottom: 4px; display: flex; width: 40px; flex-direction: column; align-items: center; }
.vp-vslider { display: flex; width: 40px; height: 116px; box-sizing: border-box; justify-content: center; padding: 14px 0 10px; opacity: 0; translate: 0 8px; cursor: pointer; touch-action: none; pointer-events: none; transition: opacity .2s ease, translate .22s cubic-bezier(.2, .8, .2, 1); }
.vp-vol:hover .vp-vslider, .vp-vol:focus-within .vp-vslider, .vp-vol[data-drag="1"] .vp-vslider { opacity: 1; translate: 0 0; pointer-events: auto; }
.vp-vslider:focus-visible { border-radius: 20px; outline: 2px solid #FDFDFD; outline-offset: -4px; }
.vp-vrail { position: relative; width: 3px; height: 100%; border-radius: 2px; background: rgba(255, 255, 255, .4); box-shadow: 0 0 6px rgba(0, 0, 0, .5); }
.vp-vfill { position: absolute; right: 0; bottom: 0; left: 0; border-radius: 2px; background: #FDFDFD; transition: height .18s ease; }
.vp-vthumb { position: absolute; bottom: 0; left: 50%; width: 16px; height: 16px; margin: 0 0 -8px -8px; border-radius: 50%; background: #FDFDFD; box-shadow: 0 1px 5px rgba(0, 0, 0, .55); transition: bottom .18s ease, scale .15s ease; }
.vp-vol[data-drag="1"] :is(.vp-vfill, .vp-vthumb) { transition: scale .15s ease; }
.vp-vslider:hover .vp-vthumb, .vp-vol[data-drag="1"] .vp-vthumb { scale: 1.15; }
/* 控制条收起来之后静音按钮还在，垫一块深色好认。 */
.vp-root:not(.bar) .vp-mute { background: rgba(10, 13, 14, .5); }
.vp-menu { position: absolute; z-index: 5; right: 8px; bottom: 56px; display: flex; width: 232px; max-width: calc(100% - 16px); max-height: calc(100% - 64px); box-sizing: border-box; flex-direction: column; gap: 10px; overflow-y: auto; padding: 12px; border-radius: 14px; background: rgba(16, 20, 22, .94); box-shadow: 0 8px 28px rgba(0, 0, 0, .45); opacity: 0; scale: .92; transform-origin: 85% 100%; visibility: hidden; pointer-events: none; transition: opacity .18s ease, scale .22s cubic-bezier(.2, .8, .2, 1), visibility .22s; }
.vp-root.menu-open .vp-menu { opacity: 1; scale: 1; visibility: visible; pointer-events: auto; }
.vp-menu-title { color: rgba(255, 255, 255, .7); font-size: 12px; }
.vp-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.vp-chip { height: 32px; padding: 0; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .1); color: #FDFDFD; font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.vp-chip:hover { background: rgba(255, 255, 255, .2); }
.vp-chip[aria-checked="true"] { background: #FDFDFD; color: #101416; }
/* 放不了的视频：封面垫在下面，上面一句话和去视频网站看的按钮。 */
.video-cover { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: #FFFFFF; text-align: center; }
.video-cover:hover { color: #FFFFFF; }
.video-cover img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; }
/* 封面上压一层深色，字才看得清。 */
.video-cover::before { content: ""; position: absolute; z-index: 1; inset: 0; background: rgba(8, 14, 16, .68); }
.video-cover span { position: relative; z-index: 2; }
.video-cover-note { font-size: 15px; font-weight: 700; }
.video-cover-go { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 20px; background: #FFFFFF; color: #0B1F18; font-size: 13px; font-weight: 700; }
.video-link { display: inline-block; margin-top: 4px; font-size: 12px; }

.prose .hidden-block { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border: 1px dashed var(--outline); border-radius: 12px; color: var(--muted); }
.prose .hidden-block.unlocked { display: block; border-style: solid; border-color: var(--line); color: inherit; }

.prose blockquote.callout { padding: 12px 16px; border-left: 4px solid var(--c, var(--outline)); border-radius: 8px; background: var(--surface); }
.callout-title { margin-bottom: 4px; color: var(--c, var(--ink)); font-weight: 700; }
.callout-note, .callout-info, .callout-todo, .callout-abstract, .callout-example, .callout-quote { --c: var(--muted); }
.callout-tip, .callout-success, .callout-question { --c: var(--primary); }
.callout-warning { --c: var(--signal-text); }
.callout-failure, .callout-danger, .callout-bug { --c: var(--danger); }

.app-embed { margin: 0 0 12px; }
/* 嵌入的应用：没有标题栏、没有外框，应用自己的画面就是全部。「全屏」「举报」在它所在卡片的按钮那一排里。 */
.appbox { position: relative; overflow: hidden; border-radius: 16px; background: var(--surface); }
.appbox-area { overflow: auto; padding: 12px; }
.appbox-area:has(.appbox-frame) { padding: 0; }
.appbox-frame { display: block; width: 100%; border: 0; }
.appbox-wait { display: flex; min-height: 136px; align-items: center; justify-content: center; }
.appbox-badge { position: absolute; top: 12px; left: 12px; }
.appbox-error { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; }
.appbox-tools { display: flex; justify-content: flex-end; gap: 4px; margin-top: 4px; }
.appbox-exit { position: absolute; z-index: 1; top: 12px; right: 12px; display: none; height: 40px; background: rgba(11, 31, 24, .8); color: #FFFFFF; }
.appbox.full { position: fixed; z-index: 60; inset: 0; border-radius: 0; background: var(--bg); }
.appbox.full .appbox-exit { display: inline-flex; }
.appbox.full .appbox-area { height: 100vh; }
.appbox.full .appbox-frame { height: 100% !important; }
.ab-vstack { display: flex; flex-direction: column; }
.ab-hstack { display: flex; flex-wrap: wrap; align-items: center; }
.ab-zstack { display: grid; }
.ab-zstack > * { grid-area: 1 / 1; }
.ab-image { max-width: 100%; border-radius: 8px; }
.ab-progress { width: 100%; height: 10px; accent-color: var(--primary); }
.ab-input { height: 40px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
.appbox .btn { height: 40px; }

@media (max-width: 860px) {
  .profile-actions { width: 100%; margin-left: 0; }
  .calendar { grid-template-columns: repeat(7, 1fr); }
  .calendar .day { width: auto; }
}
.form label > .label-line { display: flex; flex-wrap: wrap; gap: 6px; }
/* 能翻译的字段：名字后面的地球图标（NL.ask 的 l10n 字段）。 */
.label-l10n { display: inline-flex; align-items: center; gap: 4px; }
.form label.choice { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; }
.form label.choice input { width: 18px; height: 18px; accent-color: var(--primary); }
/* 表单跟着页面铺满：短的输入框并排成几列，长的（多行文字、分组、按钮行）独占一行。 */
.view-body form.form, .form-page form.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 24px; align-items: start; margin-top: 0; }
.view-body form.form > :is(h2, hr, p, fieldset, .form-actions, label:has(textarea), .field-block), .form-page form.form > :is(h2, hr, p, fieldset, .form-actions, label:has(textarea), .field-block) { grid-column: 1 / -1; }
.form-page form.form { margin-top: 16px; }
.view-body form.form > .form-actions, .form-page form.form > .form-actions { justify-content: flex-start; }
/* 发帖：节点占一列，标题占这一行剩下的全部。 */
@media (min-width: 861px) { form[data-form="new-topic"] label:has(input[name="title"]) { grid-column: 2 / -1; } }

/* ===== 后台（照设计稿「后台基准样式」） =====
   后台只在桌面上用，密度比前台高一级：控件高 36、全圆角；表格行 52（紧凑 40）。侧栏 232（收窄后 64），顶栏 56，
   内容区浅灰底、内边距 24；卡片白底、1px 描边、圆角 12、内边距 20。数字等宽、右对齐。颜色只用来区分状态，含义同时写在字上。 */
:root { --admin-side: #0B1F18; --admin-side-ink: #C9D6D0; --admin-side-label: #8BA2AD; --admin-side-on: rgba(255, 255, 255, .1); --admin-side-bar: #5CC79A; --admin-side-w: 232px; }
:root[data-theme="dark"] { --admin-side: #0E1012; }
/* 侧栏那一列一直是深色的，页面再长也不露底。 */
.admin-shell { display: flex; min-height: 100vh; background: linear-gradient(to right, var(--admin-side) var(--admin-side-w), transparent 0); }
.admin-side { position: sticky; top: 0; flex: none; width: var(--admin-side-w); height: 100vh; overflow-x: hidden; overflow-y: auto; padding: 12px 8px; background: var(--admin-side); color: var(--admin-side-ink); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; transition: width .2s ease; }
/* 收起的菜单不占位置：不然手机上它从头像往右伸出去，页面能横着滚。 */
.admin-top details.menu:not([open]) > .menu-panel { display: none; }
@media (max-width: 860px) {
  .admin-shell { background: none; }
  .admin-side { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: 264px; translate: -100% 0; transition: translate .24s cubic-bezier(.2, .8, .2, 1); }
  .admin-side.open { translate: 0 0; }
}

/* 标题区：标题 26 / 800，下面一句说明；右边最多两个操作。 */
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.view-titles { flex: 1 1 320px; min-width: 0; }
.view-desc { margin-top: 4px; color: var(--muted); }
.view-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.view-actions:empty { display: none; }
.in-admin .view-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .in-admin .view-body select { min-height: 36px; }
/* 后台表单控件：输入框、下拉高 36、圆角 10（后台基准样式），聚焦边框变绿加 3px 光晕；带图标的搜索框是全圆角，不受影响。 */
.in-admin .view-body :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="search"], [type="file"]), textarea) { border-radius: 10px; }
.in-admin .view-body :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="search"], [type="file"])) { height: 36px; }
.in-admin :is(.view-body, dialog.acd) .sel:not(:has(> select.pill)) > .sel-button { height: 36px; border-radius: 10px; }
@keyframes setting-hit { from { background: var(--unread); } to { background: transparent; } }
.in-admin .table :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; }

/* 状态徽标：带一个圆点；角色标签。 */
.status { display: inline-flex; height: 24px; align-items: center; gap: 6px; padding: 0 10px; border-radius: 12px; background: var(--fill); color: var(--soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status.ok { background: var(--unread); color: var(--primary-hover); }
.status.warn { background: var(--level-bg); color: var(--level-fg); }
.status.bad { background: var(--danger-bg); color: var(--danger); }
.kpi { display: flex; flex-direction: column; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.delta { display: inline-flex; height: 20px; align-items: center; gap: 2px; padding: 0 6px; border-radius: 10px; background: var(--fill); color: var(--soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.good { background: var(--unread); color: var(--primary-hover); }
.delta.bad { background: var(--danger-bg); color: var(--danger); }
.delta svg { width: 12px; height: 12px; }
.admin-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 18px; background: var(--fill); }
.admin-seg button { height: 32px; white-space: nowrap; padding: 0 12px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-seg button[aria-pressed="true"], .admin-seg button[aria-checked="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 26, 28, .16); }
.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.dt td { height: 56px; padding: 0 12px; border-bottom: 1px solid var(--fill); vertical-align: middle; }
.dt :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; }
.dt :is(th, td).pick { width: 48px; padding: 0 0 0 6px; }
.dt :is(th, td).dt-act { width: 52px; padding: 0 8px 0 0; line-height: 0; text-align: right; }
.dt tbody tr:hover td { background: var(--hover); }
.dt tbody tr.on td { background: var(--unread); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* 编辑抽屉：从右边滑出，不离开列表。 */
.drawer-panel { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; display: flex; width: min(440px, 100vw); max-width: none; max-height: none; height: 100%; flex-direction: column; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--ink); box-shadow: -12px 0 40px rgba(11, 31, 24, .2); animation: slide-in-right .26s cubic-bezier(.2, .8, .2, 1); }
.drawer-panel::backdrop { background: rgba(11, 31, 24, .4); }
@keyframes slide-in-right { from { translate: 100% 0; } to { translate: 0 0; } }
.drawer-panel-head { display: flex; flex: none; height: 60px; align-items: center; padding: 0 12px 0 24px; border-bottom: 1px solid var(--line); }
.drawer-panel-head h2 { flex: 1; font-size: 17px; }
.drawer-panel-body { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 20px; overflow-y: auto; padding: 20px 24px; }
.drawer-panel-foot { display: flex; flex: none; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); }

/* ===== 后台的新增：弹窗和独立页面（设计稿 07 节「新增：弹窗与独立页面」、「后台 · 新建公告」） ===== */
/* 弹窗：宽 520，头、中、脚三段，只有中间滚动。 */
dialog.acd { width: min(520px, calc(100vw - 32px)); max-width: none; max-height: 84vh; margin: 8vh auto auto; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.acd[open] { display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.acd::backdrop, dialog.acp-leave::backdrop { background: var(--scrim); }
.acd-field.bad .acd-chips button:not([aria-pressed="true"]) { border-color: var(--danger); }
:is(.acd-check, .acd-check-row)[aria-checked="true"] .i { display: block; }
/* 名字旁的「新」：这一次新建出来的行。 */
.admin-new { flex: none; display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--signal); color: var(--on-signal); font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }

/* 独立新建页：标题行（返回、标题、状态胶囊），三栏 180 / 720 / 340，底部操作栏贴边。 */
.view-head.create { display: block; }
.create-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.create-title .iconbtn.round { flex: none; width: 36px; height: 36px; color: var(--ink); }
.view-head.create .view-desc { margin: 0 0 4px 48px; font-size: 13px; }
.acp-status { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: 12px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.acp-status.warn { background: var(--note-bg); color: var(--note-fg); }
.acp-status.ok { background: var(--unread); color: var(--primary-hover); }
.dt :is(th, td).anodes-nowrap { white-space: nowrap; }
.dt :is(th, td).asec-order { width: 84px; padding-right: 0; }
.dt tbody tr.fresh td { background: var(--unread); }
.dt :is(th, td).atg-col-topics { width: 170px; }
.dt :is(th, td).atg-col-act { width: 92px; text-align: right; }
.drawer-panel-foot .btn.text.danger { margin-left: -8px; }
/* 标签抽屉里的颜色：带名字的小胶囊（节点管理里还是圆点）。 */
.tl-swatch.labeled { display: inline-flex; width: auto; height: 32px; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; }
.tl-swatch.labeled i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw); }
.tl-swatch.labeled[aria-checked="true"] { border-color: var(--primary); background: var(--unread); box-shadow: none; }
/* 手机上只留标签、主题数和操作（组在左栏选，专属节点在抽屉里看），表格不用横着滑。 */
@media (max-width: 600px) {
  .dt :is(th, td):is(.atg-col-group, .atg-col-node) { display: none; }
  .dt :is(th, td).atg-col-topics { width: auto; }
  .dt :is(th, td).atg-col-act { width: 80px; padding-left: 0; }
}
/* 提示条在底部操作栏上面。 */
body:has(.acp-bar) .toast { bottom: 84px; }
@media (max-width: 860px) {
  .view-head.create .view-desc { margin-left: 0; }
}
:root[data-theme="dark"] :is(.admin-note.ok, .admin-note.warn, .admin-note.bad) { border-color: var(--line); }
.blank { padding: 40px 16px; text-align: center; color: var(--muted); }
.blank > span { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--unread); color: var(--primary); }
.blank b { display: block; margin-top: 8px; color: var(--ink); }
.log-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--fill); font-size: 13px; }
.log-row > span:first-child { flex: none; width: 88px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-row.fresh { background: var(--unread); }
.todo { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 16px; }

.btn.small { height: 32px; padding: 0 12px; border-radius: 16px; font-size: 12px; }
.btn.small.on { background: var(--bg); border-color: var(--outline); }
span.row-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; white-space: normal; }
.tagpill.ok { background: var(--unread); color: var(--primary); }
.tagpill.warn { background: var(--level-bg); color: var(--level-fg); }
.tagpill.bad { background: var(--danger-bg); color: var(--danger); }
.view .table { min-width: 0; }
.view .table td { vertical-align: middle; }

/* 全站公告、站点设置、后台的用户详情 */
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 8px 32px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
input.toggle { appearance: none; position: relative; width: 44px; height: 26px; flex: none; border: 0; border-radius: 13px; background: var(--outline); cursor: pointer; transition: background-color .18s ease; }
input.toggle::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; content: ""; transition: translate .18s ease; }
input.toggle:checked { background: var(--primary-bg); }
input.toggle:checked::after { translate: 18px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 16px; margin-top: 8px; }
.fact > div { font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 860px) { .setting { grid-template-columns: 1fr; } }

/* 节点管理页 */
.view-body > .tabs.line { overflow-x: auto; scrollbar-width: none; }
.view-body > .tabs.line .tab { flex: none; white-space: nowrap; }
.look-controls { display: flex; flex-direction: column; margin-top: 8px; }
.look-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.look-row > div:first-child { flex: 1 1 280px; min-width: 0; }
.look-row p { margin-top: 2px; }
.look-controls > .choice { padding: 14px 0; }
.rule-list { display: flex; flex-direction: column; gap: 12px; }
.rule-edit { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; padding: 12px; border-radius: 12px; background: var(--surface); }
.rule-number { padding-top: 10px; text-align: center; color: var(--muted); }
.rule-fields { display: flex; flex-direction: column; gap: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.flair { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; }
@media (max-width: 860px) { .rule-edit { grid-template-columns: 24px minmax(0, 1fr); } .rule-edit > .actions { grid-column: 2; } }

/* 深色主题下换用的图片（节点的 logo 和头图可以各有一套）。 */
[data-theme="dark"] .light-only { display: none !important; }
:root:not([data-theme="dark"]) .dark-only { display: none !important; }
/* 转让节点的提议、私密节点的申请页、手机上的「关于」、发帖页的标签。 */
.node-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; padding: 12px 16px; border-radius: 12px; background: var(--level-bg); color: var(--level-fg); }
.node-join { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
.node-join-head { display: flex; align-items: center; gap: 16px; }
.node-join-head h1 { font-size: 24px; }
.node-sanction { align-items: flex-start; }
.node-sanction > svg { flex: none; margin-top: 3px; }
.node-sanction-text { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; min-width: 0; overflow-wrap: anywhere; }
.node-sanction-text strong { flex-basis: 100%; font-weight: 600; }
.node-sanction-text span { font-weight: 400; }
.node-banned-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.node-banned-facts dt { color: var(--muted); }
.node-banned-facts dd { margin: 0; overflow-wrap: anywhere; }
.about-tab { margin-top: 12px; }
/* 发帖的标签框（设计稿「组件 · 标签输入」）：框里是选中的标签小块和输入框，下面（放不下时上面）是建议。 */
.tag-anchor { position: relative; }
/* 框上面不写「标签」：选了标签之后字数在框里最右边。 */
.tag-field-count { flex: none; margin-left: auto; padding-left: 4px; color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-field-count[hidden] { display: none; }
.tag-field-count.over { color: var(--danger); }
.tag-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); cursor: text; }
.tag-box.open { border-color: var(--primary); box-shadow: var(--focus-ring); }
.tag-box-input { flex: 1 0 120px; min-width: 0; min-height: 0 !important; height: 30px !important; padding: 0 4px !important; border: 0 !important; background: transparent; box-shadow: none !important; color: var(--ink); font: inherit; outline: none; }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 2px 0 10px; border-radius: 14px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tag-chip.fresh { background: var(--note-bg); }
.tag-chip-new { margin-left: 4px; padding: 0 5px; border-radius: 6px; background: var(--bg); color: var(--note-fg); font-size: 10px; line-height: 16px; }
.tag-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.tag-chip-x:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.tag-chip-x .i { width: 12px; height: 12px; stroke-width: 2.6; }
.tag-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); overflow-y: auto; box-sizing: border-box; padding: 6px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-pop); animation: pop .16s ease-out; }
.tag-field-up .tag-list { top: auto; bottom: calc(100% + 6px); }
.tag-list-head { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px 6px; color: var(--muted); font-size: 12px; }
.tag-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.tag-opt[aria-selected="true"]:not([aria-disabled]) { background: var(--unread); }
.tag-opt[aria-disabled] { opacity: .5; cursor: not-allowed; }
.tag-opt-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 15px; font-weight: 700; }
.tag-opt.create .tag-opt-icon { background: var(--primary-bg); color: var(--on-primary); }
.tag-opt-main { flex: 1; min-width: 0; }
.tag-opt-name, .tag-opt-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-opt-name { font-size: 14px; font-weight: 700; line-height: 1.35; }
.tag-opt-name mark { border-radius: 2px; background: var(--mark); color: inherit; }
.tag-opt-sub { color: var(--muted); font-size: 12px; }
.tag-opt-right { flex: none; color: var(--muted); font-size: 12px; }
.tag-field-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.tag-field-hint.bad { color: var(--danger); }
.tag-field-hint.ok { color: var(--primary); }
@media (max-width: 860px) { .tag-list-keys { display: none; } }
.review-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--surface); }
.review-card .prose { max-height: 180px; overflow: auto; font-size: 14px; }
.look-row.sub { padding-left: 16px; }
@media (max-width: 860px) { .about-tab { margin: 12px 16px 0; } }

/* 悬停卡片（设计稿「组件 · 悬停卡片」）：停够了先出 200 × 132 的加载框，内容到了展开成整张（人 376、节点 344、标签 308 宽）；
   往上翻的（.is-up）从下边往上展开。触屏上从底部升起（.is-sheet）。脚本在 features.js 的「悬停卡片」。 */
@keyframes hcIn { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
@keyframes hcSpin { to { rotate: 360deg; } }
.hc { position: fixed; z-index: 95; width: 200px; height: 132px; box-sizing: border-box; overflow: hidden; border-radius: 20px; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; box-shadow: 0 12px 36px rgba(15, 26, 28, .2), 0 2px 8px rgba(15, 26, 28, .08), 0 0 0 1px var(--line); transform-origin: left top; animation: hcIn .2s cubic-bezier(.2, .9, .25, 1); transition: width .34s cubic-bezier(.2, .9, .25, 1), height .34s cubic-bezier(.2, .9, .25, 1), border-radius .34s ease, opacity .16s ease; }
:root[data-theme="dark"] .hc { box-shadow: 0 12px 36px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3), 0 0 0 1px var(--line); }
.hc.is-up { transform-origin: left bottom; }
.hc.is-open { border-radius: 16px; }
.hc.is-closing { opacity: 0; }
.hc-spin { position: absolute; left: 0; top: 0; display: flex; width: 200px; height: 132px; align-items: center; justify-content: center; transition: opacity .14s ease; pointer-events: none; }
.hc.is-up .hc-spin { top: auto; bottom: 0; }
.hc-spin::before { width: 24px; height: 24px; box-sizing: border-box; border: 3px solid var(--line); border-top-color: var(--muted); border-radius: 50%; animation: hcSpin .7s linear infinite; content: ""; }
.hc.is-open .hc-spin, .hc.is-failed .hc-spin { opacity: 0; }
.hc-fail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.hc-inner { position: absolute; left: 0; top: 0; opacity: 0; translate: 0 8px; pointer-events: none; transition: opacity .22s ease, translate .34s cubic-bezier(.2, .9, .25, 1); }
.hc.is-up .hc-inner { top: auto; bottom: 0; translate: 0 -8px; }
.hc.is-open .hc-inner { opacity: 1; translate: 0 0; pointer-events: auto; transition-delay: .12s, 0s; }
.hc.is-settled { height: auto; }
.hc.is-settled .hc-inner { position: relative; }
.hc :is(a, button):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .hc, .hc * { animation-duration: .01s !important; transition-duration: .01s !important; }
  .hc-spin::before { animation-duration: 1.2s !important; }
}
/* 人 */
.hc-user { padding: 16px; }
.hc-head { display: flex; align-items: center; gap: 14px; }
.hc-face { position: relative; display: flex; flex: none; border-radius: 50%; }
/* 头像角上的段位：段位小图标放在该段位的渐变色圆里（设计稿「段位视觉」的小尺寸用法）。 */
.hc-lv { position: absolute; right: -4px; bottom: -4px; display: flex; width: 26px; height: 26px; align-items: center; justify-content: center; box-sizing: border-box; border: 3px solid var(--bg); border-radius: 50%; background: linear-gradient(145deg, var(--tier-g1, #FFF4CF) 0%, var(--tier-g2, #EBC65A) 100%); color: var(--tier-fg, #6B4700); }
.hc-online { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; box-sizing: border-box; border: 3px solid var(--bg); border-radius: 50%; background: #2FB37C; }
.hc-who { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.hc-name-row { display: flex; align-items: center; gap: 8px; }
.hc-name { min-width: 0; overflow: hidden; font-size: 20px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.hc-name-row .nm-mark-status { font-size: 18px; }
.hc-name-row .nm-mark-status img { width: 22px; height: 22px; }
.hc-handle { display: block; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hc-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.hc-fl-node { color: var(--muted); font-size: 12px; }
.hc-title { color: var(--muted); font-size: 13px; }
.hc-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface); font-size: 13px; }
.hc-status-emoji { display: flex; flex: none; align-items: center; font-size: 16px; line-height: 1; }
.hc-status-emoji img { width: 20px; height: 20px; }
.hc-status-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hc-status-until { flex: none; color: var(--muted); font-size: 12px; }
.hc-bio { display: -webkit-box; margin: 12px 0 0; overflow: hidden; color: var(--soft); overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hc-bio.small { margin-top: 8px; font-size: 13px; }
.hc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.hc-meta > * { display: inline-flex; min-width: 0; align-items: center; gap: 5px; white-space: nowrap; }
.hc-meta .i { flex: none; width: 15px; height: 15px; }
.hc-site { max-width: 100%; color: var(--ink); text-decoration: none; }
.hc-site span { overflow: hidden; text-decoration: underline; text-overflow: ellipsis; text-underline-offset: 3px; }
.hc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface); }
.hc-stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hc-stats > div { min-width: 0; }
.hc-stats b { display: flex; align-items: center; gap: 6px; overflow: hidden; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-stats small { display: block; color: var(--muted); font-size: 12px; }
.hc-stats .hc-energy { color: var(--primary); }
.hc-stats.boxed { gap: 0; padding: 0; border: 1px solid var(--line); background: transparent; }
.hc-stats.boxed > div { padding: 10px 12px; }
.hc-stats.boxed > div + div { border-left: 1px solid var(--line); }
.hc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2FB37C; }
.hc-medals { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.hc-medal-tiles { display: flex; flex: none; padding-left: 8px; }
.hc-medal-tiles .badge-tile { width: 32px; height: 32px; margin-left: -8px; box-sizing: border-box; border: 2px solid var(--bg); }
.hc-medal-tiles .badge-tile .i { width: 16px; height: 16px; }
.hc-medal-text { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; text-decoration: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
a.hc-medal-text:hover { text-decoration: underline; }
.hc-mutual, .hc-mods { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.hc-mods { margin-top: 12px; }
.hc-faces { display: flex; flex: none; padding-left: 6px; }
.hc-faces > .avatar { margin-left: -6px; box-sizing: border-box; border: 2px solid var(--bg); }
.hc-mutual-text, .hc-mods-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-rules { flex: none; color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.hc-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.hc-act { display: inline-flex; flex: 1; min-width: 76px; height: 40px; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; box-sizing: border-box; border: 1px solid var(--primary-bg); border-radius: 20px; background: var(--primary-bg); color: var(--on-primary); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.hc-act .i { flex: none; width: 16px; height: 16px; stroke-width: 2.2; }
.hc-act[aria-pressed] > .i:nth-of-type(2), .hc-act[aria-pressed="true"] > .i:nth-of-type(1) { display: none; }
.hc-act[aria-pressed="true"] > .i:nth-of-type(2) { display: block; }
.hc-act:hover:not(.on, [aria-disabled]) { background: color-mix(in srgb, var(--primary-bg) 86%, #000000); }
.hc-act.on { border-color: var(--outline); background: var(--bg); color: var(--ink); }
.hc-act.on:hover { background: var(--hover); }
.hc-act[aria-disabled] { opacity: .5; cursor: not-allowed; }
.hc-act.wide { width: 100%; margin-top: 14px; }
.hc-act.small { flex: none; min-width: 64px; height: 32px; padding: 0 12px; border-radius: 16px; }
.hc-round { display: inline-flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer; }
.hc-round .i { width: 18px; height: 18px; }
.hc-round:hover:not([aria-disabled]) { background: var(--line); }
.hc-round[aria-disabled] { opacity: .5; cursor: not-allowed; }
/* 节点：顶上一条是节点的主色（传了横幅图时用横幅图） */
.hc-node { --hc-c: var(--primary-bg); }
.hc-cover { position: relative; height: 76px; overflow: hidden; background: linear-gradient(120deg, var(--hc-c) 0%, #10202E 130%); }
.hc-cover > i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hc-cover > i:first-child { top: -34px; right: -18px; width: 150px; height: 150px; }
.hc-cover > i + i { top: 30px; right: 84px; width: 90px; height: 90px; background: rgba(255, 255, 255, .1); }
.hc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hc-cover-meta { position: absolute; right: 12px; bottom: 10px; padding: 1px 8px; border-radius: 10px; background: rgba(17, 21, 23, .45); color: #FDFDFD; font-size: 11px; font-weight: 700; }
.hc-node-body { padding: 0 16px 16px; }
.hc-node-face { position: relative; display: inline-flex; margin-top: -30px; border-radius: 18px; }
.hc-node-face > .avatar { border: 3px solid var(--bg); border-radius: 18px; }
.hc-node-name { display: block; margin-top: 8px; color: var(--ink); text-decoration: none; }
.hc-slug { display: flex; align-items: center; gap: 4px; overflow: hidden; font-size: 19px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.hc-sub { display: block; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hc-node .hc-bio { margin-top: 10px; -webkit-line-clamp: 3; }
/* 标签 */
.hc-tag { padding: 14px 16px 16px; }
.hc-tag-head { display: flex; align-items: center; gap: 10px; }
.hc-tag-name { display: flex; flex: 1; min-width: 0; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; }
.hc-tag-title { min-width: 0; overflow: hidden; font-size: 18px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.hc-hash { color: var(--primary); }
.hc-tag-group { flex: none; color: var(--muted); font-size: 12px; }
.hc-tag-stats { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface); }
.hc-tag-count { flex: none; }
.hc-tag-count b { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hc-tag-count small { display: block; color: var(--muted); font-size: 12px; }
.hc-tag-count .hc-tag-fans { margin-top: 6px; }
.hc-tag-chart { flex: 1; min-width: 0; }
.hc-bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.hc-bars > span { flex: 1; min-height: 3px; border-radius: 3px 3px 1px 1px; background: var(--outline); }
.hc-bars > span.today { background: var(--primary); }
.hc-bars-foot { display: flex; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 11px; }
.hc-related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.hc-related a { padding: 1px 8px; border-radius: 6px; background: var(--fill); color: var(--ink); text-decoration: none; white-space: nowrap; }
.hc-hot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.hc-hot a { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; color: var(--ink); font-size: 13px; text-decoration: none; }
.hc-hot a:hover .hc-hot-title, .hc-related a:hover { text-decoration: underline; }
.hc-hot-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-hot-n { flex: none; color: var(--muted); font-size: 12px; }
/* 触屏：从底部升起，末尾一个「取消」 */
.hc-scrim { position: fixed; z-index: 94; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--scrim); animation: fade .2s ease-out; }
.hc.is-sheet { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-width: 520px; height: auto; min-height: 132px; max-height: 86dvh; margin: 0 auto; overflow-y: auto; border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); transition: none; overscroll-behavior: contain; }
.hc.is-sheet .hc-spin { width: 100%; }
.hc.is-sheet .hc-inner { position: relative; translate: none; }
.hc.is-sheet .sheet-cancel { display: flex; width: calc(100% - 32px); height: 48px; align-items: center; justify-content: center; margin: 0 16px calc(16px + env(safe-area-inset-bottom)); padding: 0; border: 0; border-radius: 24px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 700; }
body.hc-locked { overflow: hidden; }

/* 用户名后的标识（设计稿「用户名后的标识」）：名字 → 状态 → 用户组 → 节点标识 → 楼主 → 时间。没有的不占位。
   状态是裸的表情，用户组是方角实心（紧凑的一档只有图标），节点标识是圆角胶囊（.tg.fl）。窄屏上用户组缩成图标、节点标识截到 6 个字。 */
.nm-mark-status { display: inline-flex; flex: none; align-items: center; font-size: 14px; line-height: 1; vertical-align: middle; cursor: default; }
.nm-mark-status img { display: block; width: 18px; height: 18px; }
.nm-mark-group { display: inline-flex; flex: none; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 4px; box-sizing: border-box; border-radius: 5px; background: var(--nm-g, #576F76); color: #FDFDFD; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; cursor: default; }
.nm-mark-group:not(.has-icon) { padding: 0 6px; }
.nm-mark-group.is-icon { padding: 0 3px; }
.nm-mark-group .tgi { flex: none; width: 12px; height: 12px; }
.nm-mark-emoji { font-size: 11px; line-height: 1; }
@media (max-width: 600px) {
  :is(.reply-head, .author-line, .card-post .meta) .nm-mark-group.has-icon { padding: 0 3px; }
  :is(.reply-head, .author-line, .card-post .meta) .nm-mark-group.has-icon .nm-mark-text { display: none; }
  :is(.reply-head, .author-line, .card-post .meta) .tg.fl .tg-name { max-width: 6em; }
}

/* ===== 设置状态（设计稿「设置状态」）：桌面 520 宽居中，手机从底部升起。预览卡片的底是个人主页的封面，没有封面时是深绿渐变；
   卡片和上面的气泡在深色模式下也是同一个样子（白气泡压在深底上）。 ===== */
dialog.sm { width: 520px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(15, 26, 28, .3); font-size: 14px; line-height: 1.5; }
dialog.sm[open] { display: flex; flex-direction: column; animation: sm-in .2s cubic-bezier(.2, .8, .2, 1); }
dialog.sm:focus { outline: none; }
dialog.sm::backdrop { background: var(--scrim); animation: fade .18s ease; }
@keyframes sm-in { from { opacity: 0; scale: .97; } to { opacity: 1; scale: 1; } }
@keyframes sm-pop { 0% { scale: .6; opacity: 0; } 60% { scale: 1.08; } 100% { scale: 1; opacity: 1; } }
.sm-head { display: flex; flex: none; height: 60px; align-items: center; gap: 8px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); }
.sm-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; }
.sm-x { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.sm-x:hover { background: var(--hover); }
.sm-x .i { width: 22px; height: 22px; }
.sm-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.sm-card { position: relative; display: flex; min-height: 104px; box-sizing: border-box; align-items: flex-end; gap: 14px; padding: 16px; overflow: hidden; border-radius: 16px; background: linear-gradient(120deg, #0B1F18 0%, #0E5A47 55%, #2F8F6B 100%); background-position: center; background-size: cover; color: #FDFDFD; }
/* 封面上的暗色遮罩：越往下越深，名字和气泡压在上面也看得清。 */
.sm-card.has-cover::before { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 31, 24, .15) 0%, rgba(11, 31, 24, .72) 100%); content: ""; }
.sm-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.sm-orb.a { top: -44px; right: -24px; width: 170px; height: 170px; background: rgba(255, 255, 255, .1); }
.sm-orb.b { right: 96px; bottom: -50px; width: 110px; height: 110px; background: rgba(255, 255, 255, .07); }
.sm-card.has-cover .sm-orb { display: none; }
.sm-face { position: relative; display: flex; flex: none; width: 60px; height: 60px; box-sizing: border-box; overflow: hidden; border: 3px solid #FDFDFD; border-radius: 50%; background: var(--primary); }
.sm-face .avatar { width: 100% !important; height: 100% !important; border-radius: 0; font-size: 23px !important; }
.sm-who { position: relative; flex: 1; min-width: 0; }
.sm-bubble { display: inline-flex; max-width: 100%; min-height: 30px; box-sizing: border-box; align-items: center; gap: 6px; padding: 3px 12px 3px 8px; border-radius: 15px 15px 15px 4px; background: #FDFDFD; color: #111517; box-shadow: 0 2px 8px rgba(17, 21, 23, .25); font-size: 13px; }
.sm-bubble.empty { color: #576F76; font-style: italic; }
.sm-bubble-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-bubble-text:empty { display: none; }
.sm-pv { display: flex; flex: none; width: 22px; align-items: center; justify-content: center; color: #576F76; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 17px; line-height: 1; }
.sm-pv.pop { animation: sm-pop .28s cubic-bezier(.2, .8, .2, 1); }
.sm-pv img { width: 20px; height: 20px; object-fit: contain; }
.sm-pv .i { width: 18px; height: 18px; }
.sm-name { margin-top: 6px; overflow: hidden; font-size: 18px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.sm-handle { color: #B9D8CB; font-size: 13px; }
.sm-field { display: flex; height: 52px; box-sizing: border-box; align-items: center; gap: 4px; margin-top: 20px; padding: 0 12px 0 4px; border: 1px solid var(--outline); border-radius: 14px; background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease; }
.sm-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.sm-emo { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 22px; line-height: 1; cursor: pointer; }
.sm-emo[aria-expanded="true"] { background: var(--fill); }
.sm-emo img { width: 26px; height: 26px; object-fit: contain; }
.sm-emo .i { width: 22px; height: 22px; }
.sm-field input.sm-text { flex: 1; min-width: 0; height: 44px; min-height: 0; padding: 0 4px; border: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.sm-field input.sm-text::placeholder { color: var(--outline-text); }
.sm-count { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* 表情面板：浮在输入框下面的弹出层，盖住下面的快捷状态和选项，不把内容往下推。 */
.sm-field-wrap { position: relative; }
.sm-pick { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; left: 0; padding: 12px 12px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-pop); animation: pop .16s cubic-bezier(.2, .8, .2, 1); }
.sm-pick[hidden], .sm-quick[hidden], .sm-custom[hidden], .sm-error[hidden], .sm-clear[hidden] { display: none; }
.sm-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sm-chip { display: inline-flex; height: 36px; box-sizing: border-box; align-items: center; gap: 6px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.sm-chip:hover { background: var(--hover); }
.sm-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--unread); color: var(--primary-hover); font-weight: 700; }
.sm-chip-e { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 16px; line-height: 1; }
.sm-pause { display: flex; width: 100%; min-height: 52px; align-items: center; gap: 12px; margin-top: 16px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.sm-pause-text { flex: 1; min-width: 0; }
.sm-pause-text small { display: block; color: var(--muted); font-size: 13px; }
.sm-switch { display: block; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--outline); transition: background-color .2s ease; }
.sm-switch::after { display: block; width: 24px; height: 24px; margin: 4px; border-radius: 50%; background: #FDFDFD; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); content: ""; transition: translate .2s cubic-bezier(.2, .8, .2, 1); }
.sm-pause[aria-checked="true"] .sm-switch { background: var(--primary-bg); }
.sm-pause[aria-checked="true"] .sm-switch::after { translate: 20px 0; }
.sm-label { margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.sm-untils { margin: 6px -8px 0; }
.sm-row { display: flex; width: 100%; min-height: 48px; box-sizing: border-box; align-items: center; gap: 12px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.sm-row:hover { background: color-mix(in srgb, var(--muted) 10%, transparent); }
.sm-radio { display: flex; flex: none; width: 20px; height: 20px; box-sizing: border-box; align-items: center; justify-content: center; border: 2px solid var(--outline); border-radius: 50%; }
.sm-radio::after { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); content: ""; scale: 0; transition: scale .15s cubic-bezier(.2, .8, .2, 1); }
.sm-row[aria-checked="true"] .sm-radio { border-color: var(--primary); }
.sm-row[aria-checked="true"] .sm-radio::after { scale: 1; }
.sm-row-label { flex: 1; min-width: 0; }
.sm-row[aria-checked="true"] .sm-row-label { font-weight: 700; }
.sm-when { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sm-custom { max-width: 380px; margin-top: 4px; padding-left: 32px; }
.sm-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.sm-foot { display: flex; flex: none; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sm-foot button { height: 44px; border: 0; border-radius: 22px; background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.sm-save { min-width: 96px; padding: 0 24px; background: var(--primary-bg) !important; color: var(--on-primary); font-weight: 700; }
.sm-save[aria-disabled="true"] { background: var(--fill) !important; color: var(--muted); cursor: default; }
.sm-cancel { padding: 0 16px; color: var(--ink); font-weight: 500; }
.sm-cancel:hover, .sm-clear:hover { background: var(--hover); }
.sm-grow { flex: 1; }
.sm-foot .sm-clear { padding: 0 12px; color: var(--danger); font-size: 14px; font-weight: 700; }
@media (max-width: 860px) {
  dialog.sm { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog.sm[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .sm-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { dialog.sm, dialog.sm *, dialog.sm::backdrop { animation: none !important; transition: none !important; } }
/* 主页上名字后面的状态表情、名字下面那一句。 */
.profile-names h1 .nm-mark-status { margin-left: 8px; font-size: 22px; }
.profile-names h1 .nm-mark-status img { width: 26px; height: 26px; }
.profile-names .hc-status { max-width: 420px; margin-top: 8px; }

/* 个人设置页：主栏限宽居中，每项设置一行。 */
.settings-page { padding: 20px 0 64px; }
/* 和卡片视图下主栏加侧栏的总宽一样（760 + 24 + 340），和首页、节点页左右对齐。 */
/* personal: 设计稿第二版是 760 居中，标题 28/800。 */
.settings-col { max-width: 1040px; margin: 0 auto; }
.settings-col > h1 { margin-bottom: 16px; font-size: 28px; font-weight: 800; line-height: 1.25; }
.set-tabs .chip:not(.on) { background: var(--fill); color: var(--ink); }
.set-buttons .btn[hidden] { display: none; }
.set-tabs { display: flex; gap: 8px; padding-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.set-tabs .chip { font-size: 14px; font-weight: 700; }
.set-head { margin: 28px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.set-row { display: flex; min-height: 60px; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--fill); }
.set-text { flex: 1; min-width: 0; }
.set-label { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.set-label.danger { color: var(--danger); }
.set-desc { color: var(--muted); font-size: 13px; }
.set-row > .btn, .set-row > .tagpill, .set-row > select, .set-row > .sel { flex: none; }
.set-plain { display: inline-flex; max-width: 55%; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.set-value { display: flex; flex: none; max-width: 55%; height: 44px; align-items: center; gap: 4px; padding: 0 4px 0 12px; border: 1px solid transparent; border-radius: 22px; background: transparent; color: var(--muted); font-size: 14px; }
.set-value:hover { background: var(--hover); color: var(--ink); }
.set-value > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-value .i { flex: none; width: 18px; height: 18px; }
.set-select { width: auto; min-width: 150px; height: 44px; flex: none; }
.set-switch { display: flex; flex: none; width: 56px; height: 44px; align-items: center; padding: 0 2px; border: 0; background: transparent; }
.set-switch > span { display: block; width: 52px; height: 32px; border-radius: 16px; background: var(--outline); transition: background-color .18s ease; }
.set-switch > span > span { display: block; width: 24px; height: 24px; margin: 4px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); transition: translate .18s ease; }
.set-switch[aria-checked="true"] > span { background: var(--primary-bg); }
.set-switch[aria-checked="true"] > span > span { translate: 20px 0; }
.set-switch:disabled { opacity: .5; cursor: default; }
.set-embed { padding: 12px 0; }
.set-embed[hidden] { display: none; }

/* ===== 用户主页和个人设置，照 2026-11 的设计稿（up- 是主页，st- 是设置） ===== */
/* 主页头部：头像 80、白边 4；设了封面时头像压在封面上一半，名字往下让 12。 */
@media (min-width: 861px) {
  .profile-head { align-items: flex-start; padding: 0 16px 0 28px; }
  .profile-head .profile-face .avatar { box-sizing: border-box; border: 4px solid var(--bg); }
  .profile-cover.has-image { margin-bottom: 0; }
  .profile-head.up-over { position: relative; z-index: 1; }
  .profile-head.up-over .profile-face { margin-top: -40px; }
  .profile-head.up-over .profile-names { padding-top: 12px; }
  /* 发私信的弹窗：字数在底下那排按钮的左边。 */
  dialog.modal.ask.up-dm { width: min(480px, calc(100vw - 32px)); }
  dialog.modal.ask.up-edit { max-height: 86vh; margin-top: 8vh; }
  dialog.modal.ask.up-dm .field-count { position: absolute; bottom: 24px; left: 24px; display: flex; height: 44px; align-items: center; margin: 0; }
}
/* 关注按钮：没关注是加号，关注了是对勾。 */
.up-follow .i { width: 18px; height: 18px; }
.up-follow.on .i:first-of-type, .up-follow:not(.on) .i:nth-of-type(2) { display: none; }
.profile-side .btn.toggle.on { background: var(--surface); }
/* 侧栏里成就、奖杯柜各是一段，段尾一条线。 */
.up-block { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.up-block:last-child { padding-bottom: 0; border-bottom: 0; }
.up-block > .panel-link:last-child { margin-bottom: -4px; }
.dm-recipient { gap: 10px; margin: 8px 0 12px; padding: 8px 12px; }
.dm-recipient .avatar { width: 32px; height: 32px; font-size: 14px !important; }
@media (max-width: 860px) {
  /* 手机上：头像 72，私信和关注在封面条下面一点，矮一号、不带图标。 */
  .profile-head { align-items: flex-start; }
  .profile-head .profile-face .avatar { width: 72px !important; height: 72px !important; font-size: 30px !important; }
  .profile-head .profile-actions { margin-top: 42px; }
  .profile-head .profile-actions .btn { height: 40px; padding: 0 16px; border-radius: 20px; }
  .profile-head .profile-actions .btn.toggle { padding: 0 18px; }
  .profile-head .profile-actions .btn .i { display: none; }
}
/* 封面 + 头像那一块（设置页「个人资料」和主页「编辑资料」弹窗共用，features.js 的 profileMedia）。
   封面上的两个按钮压在照片上，深浅两种模式都用同一组颜色。 */
.up-cover { position: relative; height: 140px; box-sizing: border-box; overflow: hidden; border-radius: 14px; background: var(--night); }
.up-cover.empty { border: 1px dashed var(--outline); background: var(--surface); }
.up-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.up-cover > img[hidden], .up-cover-empty[hidden], .up-cover-btn[hidden] { display: none; }
.up-cover-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 13px; }
.up-cover-empty .i { width: 28px; height: 28px; stroke-width: 1.5; }
.up-cover-acts { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.up-cover-btn { display: flex; height: 36px; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .94); color: #0F1A1C; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 26, 28, .2); }
.up-cover-btn.dark { background: rgba(11, 31, 24, .72); color: #FFFFFF; box-shadow: none; }
.up-cover-btn .i { width: 16px; height: 16px; }
.up-face { position: relative; display: block; flex: none; width: 80px; height: 80px; }
.up-face > .avatar { display: flex; width: 80px !important; height: 80px !important; box-sizing: border-box; border: 4px solid var(--bg); font-size: 32px !important; object-fit: cover; }
.up-face-btn { position: absolute; right: -4px; bottom: 0; display: flex; width: 32px; height: 32px; box-sizing: border-box; align-items: center; justify-content: center; padding: 0; border: 3px solid var(--bg); border-radius: 50%; background: var(--ink); color: var(--bg); }
.up-face-btn .i { width: 15px; height: 15px; }
.up-edit-face { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 12px; margin: -36px 0 0 16px; }
.up-hint { padding-bottom: 4px; color: var(--muted); font-size: 12px; }
/* 头像那一行往上压着封面的底边，正好盖在封面右下角的按钮上：这一行自己不接点击，只有头像接。 */
.up-edit-face, .st-face-row { pointer-events: none; }
.up-edit-face > .up-face, .st-face-row > .up-face { pointer-events: auto; }
/* 「编辑资料」弹窗里的「公开显示我加入的节点」是勾选框（ask 只有开关，这里把它画成勾选框）。 */
.modal.up-edit .switch-field { flex-direction: row-reverse; justify-content: flex-end; gap: 10px; min-height: 44px; }
.modal.up-edit .switch-field > span { flex: none; }
.modal.up-edit .switch-field strong { font-size: 14px; font-weight: 400; }
.modal.up-edit .switch-field small { display: none; }
.modal.up-edit .switch-field input { width: 18px; height: 18px; border-radius: 3px; background: transparent; appearance: auto; accent-color: var(--primary); }
.modal.up-edit .switch-field input:checked { background: transparent; }
.modal.up-edit .switch-field input::after { content: none; }
/* 设置页「个人资料」顶上：封面 150（手机 120），头像压上去 36，旁边是名字和用户名，下面一行图片的建议。 */
.st-media { margin-top: 20px; }
.st-media .up-cover { height: 150px; border-radius: 16px; }
.st-face-row { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 12px; margin-top: -36px; padding: 0 16px; }
.st-who { flex: 1; min-width: 0; padding-top: 42px; }
.st-name { font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.st-handle { color: var(--muted); font-size: 13px; }
.st-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .st-media { margin-top: 16px; }
  .st-media .up-cover { height: 120px; }
  /* 设置页的弹窗在手机上是底部面板：标题在上，按钮在右下，没有顶栏。点遮罩或「取消」关。 */
  dialog.modal.ask.st-sheet:not(.compose-modal):not(.large) { inset: auto 0 0; width: 100%; max-width: 100%; height: auto; max-height: 90dvh; margin: 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.modal.ask.st-sheet:not(.confirm):not(.compose-modal) > .modal-head { height: auto; margin: 0; padding: 0; border-bottom: 0; }
  dialog.modal.ask.st-sheet > .modal-head > .iconbtn, dialog.modal.ask.st-sheet:not(.confirm):not(.compose-modal) .modal-head-confirm { display: none; }
  dialog.modal.ask.st-sheet:not(.confirm):not(.compose-modal) > .modal-head h2 { font-size: 18px; line-height: 1.3; white-space: normal; }
  dialog.modal.ask.st-sheet:not(.confirm):not(.compose-modal) > .modal-actions { display: flex; margin-top: 20px; }
  dialog.modal.ask.st-sheet.confirm .modal-actions .btn { flex: none; }
}
@media (max-width: 860px) { .settings-page { padding: 4px 16px 32px; } .settings-col > h1 { margin-bottom: 8px; font-size: 24px; } }

/* 设置页「通知」（设计稿「设置 · 通知」，stn-）：三张渠道卡片、按渠道勾选的通知内容、发送方式。 */
.stn { margin-top: 20px; }
.stn-h { margin: 32px 0 2px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.stn-h:first-child { margin-top: 0; }
.stn-p { margin: 0; color: var(--muted); font-size: 13px; }
.stn-pause { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--level-bg); color: var(--level-fg); font-size: 13px; }
.stn-pause > span { flex: 1 1 240px; }
.stn-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.stn-card { display: flex; min-width: 0; flex-direction: column; gap: 10px; padding: 14px 14px 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.stn-card.dashed { border-color: var(--outline); }
.stn-card-top { display: flex; align-items: center; gap: 8px; }
.stn-tile { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; color: #FDFDFD; }
.stn-tile-site { background: #111517; }
.stn-tile-mail { background: #0E7490; }
.stn-tile-tg { background: #229ED9; }
:root[data-theme="dark"] .stn-tile-site { background: #3A3F44; }
.stn-card-name { flex: 1; min-width: 0; }
.stn-card-name > div { font-size: 15px; font-weight: 700; line-height: 1.3; }
.stn-chip { display: inline-block; margin-top: 3px; padding: 0 8px; border-radius: 9px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 18px; }
.stn-chip.on { background: var(--unread); color: var(--primary-hover); }
.stn-chip.off { background: var(--level-bg); color: var(--level-fg); }
.set-switch.stn-locked { opacity: .5; cursor: not-allowed; }
.stn-card-detail { min-height: 40px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.stn-card-acts { display: flex; min-height: 36px; flex-wrap: wrap; gap: 8px; }
.stn-act { display: inline-flex; height: 36px; align-items: center; padding: 0 14px; border: 0; border-radius: 18px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
.stn-act.soft { background: var(--fill); }
.stn-act.primary { padding: 0 16px; background: var(--primary-bg); color: var(--on-primary); }
.stn-act.danger { color: var(--danger); }
.stn-act:hover { filter: brightness(.96); }
/* 通知内容：表头吸顶（滚到下面还看得见哪一列是哪个渠道），每列 88 宽（手机 58）。 */
.stn-heads { position: sticky; top: 56px; z-index: 2; display: flex; align-items: flex-end; margin-top: 8px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); background: var(--bg); }
.stn-heads-label { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.stn-head { display: flex; flex: none; width: 88px; flex-direction: column; align-items: center; gap: 1px; }
.stn-head.off { opacity: .5; }
.stn-head-icon { display: flex; color: var(--muted); }
.stn-head-name { font-size: 12px; font-weight: 700; line-height: 1.3; }
.stn-head-sub { color: var(--muted); font-size: 11px; line-height: 1.3; }
.stn-head.off .stn-head-sub { color: var(--danger); }
.stn-group { padding: 18px 0 2px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stn-row { display: flex; min-height: 52px; align-items: center; padding: 2px 0; border-bottom: 1px solid var(--fill); }
.stn-row-text, .stn-line-text { flex: 1; min-width: 0; padding-right: 8px; }
.stn-row-label { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.stn-row-desc { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.stn-cell { display: flex; flex: none; width: 88px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.stn-box { display: flex; width: 24px; height: 24px; align-items: center; justify-content: center; border: 2px solid var(--outline); border-radius: 7px; background: var(--bg); color: #FFFFFF; }
.stn-cell[aria-checked="true"] .stn-box { border-color: var(--primary-bg); background: var(--primary-bg); }
.stn-cell.off { cursor: not-allowed; }
.stn-cell.off .stn-box { border-color: var(--fill); background: var(--fill); }
.stn-cell.locked { opacity: .5; cursor: not-allowed; }
.stn-cell .i { stroke-width: 3; }
/* 发送方式：每项一行，右边是开关、分段或时间。 */
.stn-lines { margin-top: 4px; }
.stn-line { display: flex; min-height: 60px; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--fill); }
.stn-line-text { flex: 1 1 200px; }
.stn-line.dim > :not(.stn-line-text) { opacity: .5; }
.stn-line-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.stn-times { display: flex; align-items: center; gap: 6px; }
.stn-times .dp { width: 116px; }
/* 免打扰的起止时间不能清空：不要清除按钮，留出地方给「23:00」。 */
.stn-times .dp-clear { display: none !important; }
.stn-times .dp-trigger { gap: 8px; padding: 0 10px 0 12px; }
.stn-to { color: var(--muted); }
.stn-seg { display: flex; flex: none; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.stn-seg > button { height: 38px; padding: 0 14px; border: 0; border-radius: 19px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.stn-seg > button[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.stn-foot { margin-top: 20px; }
.stn-reset { height: 44px; border-radius: 22px; }
/* 绑定 Telegram 的弹窗。 */
dialog.modal.stn-bind { width: min(480px, calc(100vw - 32px)); margin-top: 14vh; padding: 24px; }
.stn-bind-head { display: flex; align-items: center; gap: 12px; }
.stn-bind-head h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; }
.stn-bind-tile { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: #229ED9; color: #FDFDFD; }
.stn-steps { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.stn-steps > li { display: flex; gap: 12px; }
.stn-step { display: flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--fill); font-size: 13px; font-weight: 700; }
.stn-step-text { flex: 1; min-width: 0; font-weight: 500; }
.stn-tg-open { display: inline-flex; height: 36px; align-items: center; gap: 6px; margin-top: 8px; padding: 0 14px; border-radius: 18px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; }
.stn-bind-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.stn-bind .modal-error { margin-top: 12px; }
.stn-bind-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.stn-bind-actions .btn { height: 44px; padding: 0 18px; border-radius: 22px; }
.stn-bind-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0 28px; font-weight: 500; }
.stn-spin { width: 32px; height: 32px; border: 3px solid var(--fill); border-top-color: var(--primary-bg); border-radius: 50%; animation: stn-spin .8s linear infinite; }
@keyframes stn-spin { to { transform: rotate(360deg); } }
.stn-bind-ok { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--unread); color: var(--primary-hover); font-weight: 700; }
.stn-bind-text { margin: 12px 0 0; color: var(--soft); }

/* 隐私里的「屏蔽名单」弹窗（stb-）：两个标签、搜索、名单、底部的人数和「完成」。 */
dialog.modal.stb { width: min(520px, calc(100vw - 32px)); height: min(640px, 80vh); max-height: 80vh; margin-top: 10vh; padding: 0; overflow: hidden; }
dialog.modal.stb[open] { display: flex; flex-direction: column; }
.stb-head { display: flex; flex: none; align-items: center; gap: 12px; padding: 16px 14px 0 24px; }
.stb-head h2, .stn-bind-head h2 { outline: none; }
.stb-head h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; }
.stb-top { flex: none; padding: 4px 24px 0; }
.stb-tabs > button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.stb-count { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
.stb-field { display: flex; height: 48px; align-items: center; gap: 8px; margin-top: 12px; padding: 0 6px 0 14px; border: 1px solid var(--outline); border-radius: 24px; background: var(--bg); }
.stb-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.stb-search-icon { display: flex; flex: none; color: var(--muted); }
.stb-field .prefixed { display: flex; flex: 1; min-width: 0; height: 44px; align-items: center; padding: 0; border: 0; background: transparent; box-shadow: none; }
.stb-field input.stb-input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; outline: none; background: transparent; box-shadow: none; font: inherit; font-size: 16px; }
.stb-clear { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.stb-clear[hidden] { display: none; }
.stb-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.stb-list { flex: 1; min-height: 0; margin-top: 8px; padding: 0 24px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--fill); }
.stb-row { display: flex; min-height: 64px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--fill); }
.stb-row.faded .stb-face, .stb-row.faded .stb-who { opacity: .5; }
.stb-face { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; color: #FFFFFF; font-weight: 700; object-fit: cover; }
.stb-face.square { border-radius: 10px; }
.stb-who { flex: 1; min-width: 0; }
.stb-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stb-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stb-act { flex: none; height: 40px; padding: 0 16px; border: 1px solid var(--outline); border-radius: 20px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.stb-act.block { border-color: var(--danger); color: var(--danger); }
.stb-empty { padding: 56px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.stb-empty p { margin: 4px 0 0; }
.stb-empty .stb-empty-title { margin: 0; color: var(--ink); font-size: 16px; font-weight: 700; }
.stb-foot { display: flex; flex: none; align-items: center; gap: 12px; padding: 12px 24px 16px; border-top: 1px solid var(--line); }
.stb-summary { flex: 1; color: var(--muted); font-size: 13px; }
.stb-foot .btn { height: 44px; padding: 0 22px; border-radius: 22px; }
@media (max-width: 860px) {
  .stn-cards { grid-template-columns: 1fr; gap: 10px; }
  .stn-head, .stn-cell { width: 58px; }
  .stn-times .dp { width: 108px; }
  /* 手机上两个弹窗都是从底部升起的面板。 */
  dialog.modal.stb { inset: auto 0 0; width: 100%; max-width: 100%; height: 720px; max-height: 90dvh; margin: 0; border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .stb-head { padding: 12px 8px 0 16px; }
  .stb-top, .stb-list { padding-inline: 16px; }
  .stb-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  dialog.modal.stn-bind { inset: auto 0 0; width: 100%; max-width: 100%; margin: 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
}

/* 广告投放：总览、三个购买页、我的推广。颜色只用色板变量，深色模式跟着变。 */
.view-body.promo-page { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.promo-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.promo-head-text { flex: 1 1 280px; min-width: 0; }
.promo-head-text > p { margin-top: 4px; }
.promo-crumbs { font-size: 13px; color: var(--muted); }
.promo-title { margin: 2px 0 0; font-family: "Bricolage Grotesque", var(--font); font-size: 28px; font-weight: 800; line-height: 1.25; }
.promo-head .btn .i, .promo-head .btn svg { flex: none; }
.promo-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--unread); color: var(--primary-hover); text-align: center; }
.promo-note.is-warn { justify-content: flex-start; background: var(--level-bg); color: var(--level-fg); text-align: left; }
.promo-note.is-warn a { font-weight: 700; }
.promo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.promo-stats.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promo-stat { min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.promo-stat small { display: block; }
.promo-stat b { display: block; overflow: hidden; font-size: 20px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

/* 总览：三张产品卡 */
.promo-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.promo-product { display: flex; min-width: 0; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.promo-product-title { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.promo-icon { display: inline-flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--unread); color: var(--primary); }
.promo-product-desc { min-height: 42px; margin-top: 8px; color: var(--muted); }
.promo-demo { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface); }
.promo-box .promo-demo { margin-top: 0; }
.promo-demo-label { color: var(--muted); font-size: 12px; text-align: center; }
.promo-demo-label.is-start { text-align: left; }
.promo-demo .promo-demo-label:not(:first-child) { margin-top: 6px; }
.promo-demo-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.promo-demo-meta { color: var(--muted); font-size: 12px; }
.promo-link { color: var(--primary); }
.promo-demo .partner-card { background: var(--bg); }
.partner-intro { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.promo-byline { display: flex; min-width: 0; align-items: center; gap: 8px; font-size: 13px; }
.promo-byline.is-center { justify-content: center; }
.promo-byline b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-face { display: inline-flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--unread); color: var(--primary); }
.promo-perks { display: flex; flex: 1; flex-direction: column; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.promo-perks li { display: flex; align-items: flex-start; gap: 10px; }
.promo-perk-icon { display: inline-flex; flex: none; margin-top: 3px; color: var(--primary); }
.promo-product-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fill); }
.promo-price small { display: block; }
.promo-price b { font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.promo-price span { color: var(--muted); }
/* 总览上点尺寸：照侧栏的样子摆，两张小图并排，横幅和大图通栏。 */
.promo-slots { display: flex; width: 100%; max-width: 280px; flex-direction: column; gap: 8px; margin: 0 auto; }
.promo-slot-row { display: flex; gap: 8px; }
.promo-slot-row > .promo-slot { flex: 1; }
.promo-slot { display: flex; width: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 1px dashed var(--outline); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.promo-slot.is-small { height: 92px; }
.promo-slot.is-medium { height: 60px; }
.promo-slot.is-large { height: 124px; }
.promo-slot.is-ghost { border-color: var(--line); background: transparent; }
.promo-slot[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--unread); color: var(--primary-hover); }
.promo-slot:disabled { opacity: .5; cursor: default; }
.promo-demo-frame { padding: 0; }

/* 信息流广告的样子 */
.promo-ad { display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.promo-ad.is-compact { flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; }
.promo-ad-who { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.promo-ad-who .promo-face { width: 24px; height: 24px; }
.promo-ad.is-compact .promo-ad-who .promo-face { display: none; }
.promo-ad-who b { min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.promo-ad-tag { flex: none; padding: 0 6px; border-radius: 6px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 18px; }
.promo-ad-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.promo-ad.is-compact .promo-ad-title { margin-top: 2px; font-size: 14px; }
.promo-ad-title.is-empty { color: var(--outline-text); }
.promo-ad-desc { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.promo-ad-media, .promo-ad-thumb { display: flex; align-items: center; justify-content: center; border-radius: 10px; background: color-mix(in srgb, var(--primary) 14%, var(--bg)) center / cover no-repeat; color: var(--soft); }
.promo-ad-media { aspect-ratio: 16 / 9; margin-top: 2px; }
.promo-product .promo-ad-media { aspect-ratio: auto; height: 96px; }
.promo-ad-thumb { flex: none; width: 56px; height: 42px; border-radius: 8px; }
.promo-ad-main { display: block; min-width: 0; flex: 1; }
.promo-ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.promo-ad-more { flex: none; height: 28px; padding: 0 12px; border: 1px solid var(--primary); border-radius: 14px; color: var(--primary); font-weight: 700; line-height: 26px; }

/* FAQ */
.promo-faq { margin-top: 20px; }
.promo-faq h2 { margin-bottom: 8px; font-size: 20px; }
.promo-faq-item { border-bottom: 1px solid var(--line); }
.promo-faq-item summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; list-style: none; cursor: pointer; }
.promo-faq-item summary::-webkit-details-marker { display: none; }
.promo-faq-item p { margin: 0 0 14px; color: var(--muted); }
.promo-chev { display: inline-flex; flex: none; color: var(--muted); transition: rotate .18s ease; }
.promo-faq-item[open] .promo-chev { rotate: 180deg; }

/* 购买页：左边表单，右边预览 */
.promo-buy { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.promo-form { display: flex; min-width: 0; max-width: 680px; flex: 1 1 460px; flex-direction: column; gap: 16px; }
.promo-aside { position: sticky; top: 80px; min-width: 0; max-width: 420px; flex: 1 1 320px; }
.promo-box { display: flex; min-width: 0; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.promo-box h2 { font-size: 16px; }
.promo-box-head p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.promo-box-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.promo-sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.promo-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.promo-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.promo-field-head label, .promo-label { font-size: 13px; font-weight: 700; }
.promo-optional { margin-left: 4px; color: var(--muted); font-weight: 400; }
.promo-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.promo-help { margin-top: -4px; color: var(--muted); font-size: 12px; }
.promo-box > .promo-help, .promo-box .promo-help:last-child { margin-top: 0; }
.promo-narrow { max-width: 360px; }
.promo-bad .filedrop-zone { border: 2px dashed var(--danger); }
.promo-term { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.promo-term span { flex: 1; }
.promo-term b { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 单选卡片：尺寸、时长、付款方式 */
.promo-choices { display: grid; gap: 8px; }
.promo-choices.is-sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promo-choices.is-durations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.promo-choices.is-pays { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.promo-choice { position: relative; display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; }
.promo-choices.is-sizes .promo-choice { min-height: 64px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 10px 12px; }
.promo-choices.is-durations .promo-choice { min-height: 60px; justify-content: flex-start; }
.promo-choices.is-pays .promo-choice { height: 48px; align-items: center; padding: 0 12px; text-align: center; }
.promo-choice:has(input:checked) { padding: 7px 11px; border: 2px solid var(--primary); background: var(--unread); }
.promo-choices.is-sizes .promo-choice:has(input:checked) { padding: 9px 11px; }
.promo-choices.is-pays .promo-choice:has(input:checked) { padding: 0 11px; }
.promo-choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.promo-choice.is-off { opacity: .5; cursor: default; }
.promo-choice-text { min-width: 0; flex: 1; }
.promo-choice-text b { display: block; }
.promo-choice-sub { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.promo-off { position: absolute; top: 8px; right: 8px; padding: 0 6px; border-radius: 6px; background: var(--level-bg); color: var(--signal-text); font-size: 11px; font-weight: 700; line-height: 18px; }
.promo-shape-box { display: flex; flex: none; width: 40px; height: 32px; align-items: center; justify-content: flex-start; }
.promo-shape { border: 1.5px solid var(--muted); border-radius: 3px; }
.promo-choice:has(input:checked) .promo-shape { border-color: var(--primary); }
/* 上传的图片按所选尺寸的比例排成格子 */
.promo-images .filedrop-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(var(--promo-tile, 120px), 1fr)); width: 100%; }
.promo-images .filedrop[data-picked] .filedrop-grid { display: grid; }
.promo-images .filedrop-tile, .promo-images .filedrop-more { width: auto; height: auto; min-height: 64px; aspect-ratio: var(--promo-ratio, 1 / 1); }
.promo-images.is-wide { --promo-ratio: 16 / 9; --promo-tile: 140px; }
/* 题目一行一个：前面是序号，后面是字数和删除 */
.promo-lines { display: flex; flex-direction: column; gap: 8px; }
.promo-line { display: flex; align-items: center; gap: 8px; }
.promo-line .prefixed { min-width: 0; flex: 1; padding: 0 12px 0 0; overflow: hidden; }
.promo-line-no { display: flex; flex: none; width: 36px; align-self: stretch; align-items: center; justify-content: center; margin-right: 8px; border-right: 1px solid var(--line); background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.promo-line-len { flex: none; color: var(--outline-text); font-size: 12px; font-weight: 400 !important; font-variant-numeric: tabular-nums; }
.promo-line .prefixed:has(input[aria-invalid="true"]) { border: 2px solid var(--danger); }
.promo-line .prefixed input[aria-invalid="true"] { border: 0; }
.promo-line-remove:disabled { opacity: .35; cursor: default; }
.btn.small.promo-add { align-self: flex-start; height: 36px; border-radius: 18px; font-size: 13px; }
/* 支付：付款方式、合计、去支付 */
.promo-hint { color: var(--muted); font-size: 13px; }
.promo-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.promo-total-label { color: var(--muted); font-size: 12px; }
.promo-total-value { color: var(--primary); font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.btn.promo-submit { padding: 0 24px; }
.promo-terms { color: var(--muted); font-size: 12px; }
/* 图片广告的预览：侧栏里按实际像素摆出来 */
.promo-rail { align-items: center; }
.promo-skel { display: block; width: 258px; max-width: 100%; height: 10px; border-radius: 5px; background: var(--fill); }
.promo-skel.is-w60 { width: 155px; background: var(--line); }
.promo-skel.is-w85 { width: 220px; }
.promo-skel.is-w75 { width: 194px; }
.promo-skel.is-w50 { width: 129px; }
.promo-slot-preview { position: relative; display: flex; max-width: 100%; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; background: var(--fill) center / cover no-repeat; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.promo-slot-preview.is-empty { border: 1.5px dashed var(--outline); background-color: var(--bg); }
.promo-slot-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.promo-slot-tag { position: absolute; top: 4px; right: 4px; padding: 0 5px; border-radius: 4px; background: rgba(11, 31, 24, .6); color: #FFFFFF; font-size: 10px; line-height: 16px; }
.btn.promo-all { gap: 6px; margin-top: -6px; font-size: 13px; }
/* 「全部预览」抽屉 */
.drawer-panel.promo-drawer { width: min(560px, 100vw); }
.promo-drawer .drawer-panel-body { gap: 0; }
.promo-drawer-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 15px; }
.promo-drawer-title.is-split { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.promo-drawer .promo-demo-label { margin: 14px 0 6px; font-weight: 700; }
.promo-frame.is-desktop { width: 420px; max-width: 100%; }
.promo-frame.is-phone { width: 340px; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
/* 我的推广 */
.promo-mine .tabs.line { margin-top: 0; }
.promo-mine .view-tab { display: flex; flex-direction: column; gap: 12px; }
.promo-item { gap: 10px; }
.promo-item-head { display: flex; align-items: flex-start; gap: 12px; }
.promo-item-name { min-width: 0; flex: 1; }
.promo-item-name h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 16px; overflow-wrap: anywhere; }
.promo-item .actions { margin-top: 0; }
.promo-edit { padding-top: 12px; border-top: 1px solid var(--line); }
.promo-edit[hidden] { display: none; }

@media (max-width: 860px) {
  .promo-title { font-size: 24px; }
  .promo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-stats.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promo-product { padding: 16px; }
  .promo-product-desc { min-height: 0; }
  .segmented.promo-seg { display: flex; }
  /* 手机上单列：表单拆开，预览排在第一块后面，「支付」贴在屏幕底部。 */
  .promo-buy { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  .promo-form { display: contents; }
  .promo-form > * { order: 3; }
  .promo-form > .promo-first { order: 1; }
  .promo-aside { position: static; order: 2; max-width: none; flex: none; }
  .promo-aside .promo-box { padding: 16px; }
  .promo-choices.is-sizes { grid-template-columns: minmax(0, 1fr); }
  .promo-choices.is-sizes .promo-choice { flex-direction: row; align-items: center; gap: 12px; }
  .promo-shape-box { height: 40px; justify-content: center; }
  .promo-choices.is-durations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-box.promo-paybar { position: sticky; z-index: 5; bottom: 0; order: 4; gap: 12px; margin: 0 -16px; padding: 12px 16px; border-width: 1px 0 0; border-radius: 0; box-shadow: 0 -4px 16px rgba(15, 26, 28, .06); }
  .promo-paybar-title, .promo-paybar .promo-terms { display: none; }
  .view-body.promo-page:has(.promo-paybar) { padding-bottom: 0; }
  body:has(.promo-paybar) .fab { display: none !important; }
}

/* 后台的会员等级页：指标一行、等级一列的表 */
.level-wrap { overflow-x: auto; }
.level-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; }
.level-none { color: var(--muted); }

/* 帖子的翻译提示，和语言菜单 */
.tr-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.tr-note .i { width: 16px; height: 16px; flex: none; }
.tr-note .textbtn { height: 32px; padding: 0 10px; }
.menu.lang .menu-panel { max-height: min(70vh, 480px); overflow-y: auto; }
.menu.lang .menu-item.on { font-weight: 700; color: var(--accent); }

/* ===== 帖子编辑器（static/editor.js）：Markdown 和富文本两种模式 ===== */
.field-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; }
.ed { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 400; text-align: left; }
/* 里面的东西（正文框的直角、右下角拖动大小的把手）按编辑器的圆角裁掉，不压在边框上。弹出层不在编辑器里，不受影响。 */
.ed { overflow: hidden; }
.ed-bar { display: flex; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; background: var(--surface); }
/* 格式按钮放不下时只有它们横向滚动，预览和切换模式始终在右边看得到。 */
.ed-tools { display: flex; flex: 0 1 auto; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ed-tools::-webkit-scrollbar { display: none; }
/* 编辑框比工具栏窄时（回复框、窄的弹窗）：格式按钮只排一行，放不下的那头出箭头（editor.js 按能不能往那边挪来显示），
   那一头渐隐，提示还有按钮。 */
.ed-scroll { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer; }
.ed-scroll:hover { background: var(--fill); color: var(--ink); }
.ed-scroll .i { width: 16px; height: 16px; }
.ed-tools.ed-fade-right { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.ed-tools.ed-fade-left { mask-image: linear-gradient(to left, #000 calc(100% - 24px), transparent); }
.ed-tools.ed-fade-left.ed-fade-right { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
@media (pointer: coarse) { .ed-scroll { height: 44px; } }
.ed-tool { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer; }
.ed-tool:hover { background: var(--fill); color: var(--ink); }
.ed-tool[aria-pressed="true"] { background: var(--fill); color: var(--primary); }
.ed-tool:disabled { opacity: .4; cursor: default; }
.ed-tool .i { width: 18px; height: 18px; }
.ed-sep { flex: none; width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.ed-bar .grow { flex: 1 0 4px; }
/* 预览（左右分栏）和全屏：和格式按钮一样的图标按钮。 */
.ed-tab, .ed-max { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer; }
.ed-tab:hover, .ed-max:hover { background: var(--fill); color: var(--ink); }
.ed-tab[aria-pressed="true"], .ed-max[aria-pressed="true"] { background: var(--fill); color: var(--primary); }
.ed-tab .i, .ed-max .i { width: 18px; height: 18px; }
/* Markdown / 富文本切换开关（照 Discourse 的样子）：左边 Markdown 标志、右边 A，滑块停在当前模式那一头。 */
.ed-switch { display: inline-flex; flex: none; align-items: center; height: 36px; padding: 0 4px; border: 0; background: transparent; cursor: pointer; }
.ed-switch-slider { position: relative; display: inline-block; width: 52px; height: 26px; border-radius: 8px; background: var(--fill); }
.ed-switch:hover .ed-switch-slider { background: color-mix(in srgb, var(--ink) 14%, var(--fill)); }
.ed-switch:focus-visible { outline: none; }
.ed-switch:focus-visible .ed-switch-slider { outline: 2px solid var(--primary); outline-offset: 2px; }
.ed-switch:disabled { opacity: .5; cursor: not-allowed; }
.ed-switch-slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 20px; border-radius: 6px; background: var(--bg); box-shadow: 0 1px 2px 1px color-mix(in srgb, var(--primary) 20%, transparent); transition: transform .15s ease; }
.ed-switch[aria-checked="true"] .ed-switch-slider::before { transform: translateX(24px); }
.ed-switch-md, .ed-switch-rt { position: absolute; top: 0; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 100%; color: var(--muted); }
.ed-switch-md { left: 3px; }
.ed-switch-rt { right: 3px; }
.ed-switch[aria-checked="false"] .ed-switch-md, .ed-switch[aria-checked="true"] .ed-switch-rt { color: var(--primary); }
.ed-switch .i { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .ed-switch-slider::before { transition: none; } }
@media (pointer: coarse) { .ed-tool, .ed-tab, .ed-max, .ed-switch { height: 44px; } .ed-tool, .ed-tab, .ed-max { width: 44px; } }
.ed-body { position: relative; min-width: 0; }
.ed .ed-source { display: block; width: 100%; min-height: 160px; padding: 12px 14px; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--ink); font: inherit; line-height: 1.7; resize: vertical; }
.ed-rich, .ed-preview { min-height: 160px; padding: 12px 14px; overflow-wrap: anywhere; }
.ed-rich { max-height: 70vh; overflow-y: auto; outline: none; cursor: text; }
.ed-rich > :first-child, .ed-preview > :first-child { margin-top: 0; }
.ed-rich:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); position: absolute; color: var(--muted); pointer-events: none; }
/* 左右分栏预览：左边写、右边看；窄屏上下排。收起的回复框不显示。 */
.ed.ed-split:not(.collapsed) > .ed-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ed.ed-split .ed-preview { max-height: max(320px, 60vh); overflow-y: auto; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.ed.collapsed .ed-preview { display: none; }
/* 预览里图片上浮出的按钮：改说明、缩放、删掉（editor.js 摆位置）。 */
.ed-imgtools { position: absolute; z-index: 3; display: flex; padding: 3px; border-radius: 10px; background: rgb(15 26 28 / .82); color: #fff; font-size: 12px; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.ed-imgtools-row { display: flex; align-items: center; gap: 2px; }
.ed-imgtools-row[hidden] { display: none; }
.ed-imgtools button { display: inline-flex; align-items: center; gap: 4px; height: 26px; min-width: 26px; justify-content: center; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.ed-imgtools button:hover, .ed-imgtools button[aria-pressed="true"] { background: rgb(255 255 255 / .2); }
.ed-imgtools button .i { width: 15px; height: 15px; }
.ed-imgtools .ed-img-alt-text { max-width: 160px; overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ed-imgtools-sep { width: 1px; height: 14px; margin: 0 2px; background: rgb(255 255 255 / .3); }
.ed-imgtools input { width: 200px; height: 26px; padding: 0 8px; border: 0; border-radius: 7px; background: var(--bg); color: var(--ink); font: inherit; outline: none; }
.ed-corner { display: none; }
/* 即时预览里站点自己的写法（投票、隐藏内容……）先画成占位块，停笔后换成服务端渲染的真样子。 */
.ed-ph { display: block; margin: 8px 0; padding: 8px 12px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; }
.ed-ph b { margin-right: 6px; color: var(--primary); }
@media (max-width: 860px) {
  .ed.ed-split:not(.collapsed) > .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed.ed-split .ed-preview { max-height: 50vh; border-top: 1px solid var(--line); border-left: 0; }
}
/* 全屏编辑：只有编辑器铺满窗口，正文区占满剩下的高度；不分栏时正文居中、最宽 860。 */
.ed.ed-maxed { position: fixed; inset: 0; z-index: 180; border: 0; border-radius: 0; box-shadow: none; }
.ed.ed-maxed > .ed-bar { border-radius: 0; padding-inline: 12px; }
.ed.ed-maxed > .ed-body { flex: 1 1 auto; min-height: 0; }
.ed.ed-maxed .ed-source { height: 100% !important; resize: none; padding: 24px max(24px, calc((100% - 860px) / 2)); font-size: 15px; }
.ed.ed-maxed .ed-rich { height: 100%; max-height: none; padding: 24px max(24px, calc((100% - 860px) / 2)); }
.ed.ed-maxed.ed-split > .ed-body { grid-template-rows: minmax(0, 1fr); }
.ed.ed-maxed.ed-split .ed-source, .ed.ed-maxed.ed-split .ed-preview { height: 100%; max-height: none; padding: 24px; }
.ed.ed-maxed > .ed-foot { padding-inline: 12px; }
html:has(.ed.ed-maxed) { overflow: hidden; }
.ed-status { padding: 6px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.ed-status.error { color: var(--danger); }
.ed-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.ed-foot .replybox-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* 富文本里不能直接改的块：站点自己的写法（投票、隐藏内容、提示框……） */
.ed-atom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 8px 8px 12px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--surface); font-size: 13px; line-height: 1.5; user-select: none; }
.ed-atom-label { flex: none; color: var(--primary); font-weight: 700; }
.ed-atom-text { flex: 1 1 160px; min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.ed-atom button { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: var(--fill); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.ed-atom .ed-atom-remove { color: var(--danger); }
/* 表情、隐藏内容的菜单、@ 补全 */
.ed-popup { position: absolute; z-index: 95; max-width: min(360px, calc(100vw - 16px)); padding: 6px; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); animation: pop .14s ease-out; }
.ed-menu { display: flex; flex-direction: column; min-width: 240px; }
.ed-menu .menu-item { height: auto; min-height: 44px; padding: 6px 12px; }
.ed-menu .menu-item > span { display: flex; flex-direction: column; align-items: flex-start; }
/* 引用下拉、表情面板自己有边框和圆角，外面这层只管摆位置。 */
.ed-popup.bare { max-width: none; padding: 0; border-radius: 0; background: transparent; box-shadow: none; animation: none; }
.ed-count { flex: none; margin-right: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-count[hidden] { display: none; }

/* ===== 输入 @ # $ 时的引用下拉（设计稿「组件 · 输入时的引用下拉」）：桌面 320 宽，手机上左右各留 8 ===== */
.sg { display: flex; max-height: inherit; box-sizing: border-box; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.5; animation: sg-in .14s ease; }
@keyframes sg-in { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
.ed-popup.bare:has(> .sg) { display: flex; flex-direction: column; }
.sg-head { display: flex; flex: none; align-items: baseline; gap: 8px; padding: 10px 12px 4px; color: var(--muted); font-size: 12px; }
.sg-head b { color: var(--ink); }
.sg-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 4px; }
.sg-group { padding: 8px 8px 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.sg-row { display: flex; width: 100%; min-height: 48px; box-sizing: border-box; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sg[data-kind="#"] .sg-row { min-height: 44px; }
.sg-row.on { background: var(--fill); }
.sg-av { display: flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--sg-av, var(--fill)); color: #FDFDFD; font-size: 13px; font-weight: 700; object-fit: cover; }
span.sg-av:not([style]) { color: var(--muted); }
.sg-av.square { border-radius: 10px; }
.sg-av.create { background: var(--unread); color: var(--primary-hover); }
.sg-text { flex: 1; min-width: 0; }
.sg-main, .sg-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main > span { font-weight: 500; }
.sg-hit { color: var(--primary); }
.sg-sub { color: var(--muted); font-size: 12px; }
.sg-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--unread); color: var(--primary-hover); font-size: 11px; font-weight: 700; }
.sg-badge.quiet { background: var(--fill); color: var(--muted); }
.sg-meta { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sg-empty { padding: 16px 12px 14px; color: var(--muted); font-size: 13px; text-align: center; }
.sg-keys { display: flex; flex: none; align-items: center; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; }
.sg-keys kbd { display: inline-block; min-width: 18px; box-sizing: border-box; padding: 0 4px; border: 1px solid var(--line); border-radius: 5px; font: inherit; font-size: 11px; line-height: 16px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .sg { animation: none; } }

/* ===== 表情面板（设计稿「组件 · 表情选择」）：桌面 392 × 444，手机上从底部升起 ===== */
.emo { display: flex; width: min(392px, calc(100vw - 16px)); height: min(444px, calc(100dvh - 16px)); box-sizing: border-box; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.5; }
.emo-head { display: flex; flex: none; align-items: center; gap: 6px; padding: 10px 10px 6px; }
.emo-search { display: flex; min-width: 0; height: 40px; flex: 1; align-items: center; gap: 8px; padding: 0 4px 0 12px; border-radius: 20px; background: var(--fill); color: var(--muted); }
.emo-search-i { display: inline-flex; }
.emo-search .i { width: 18px; height: 18px; }
.emo input.emo-q { flex: 1; min-width: 0; height: 36px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; outline: none; }
.emo input.emo-q::-webkit-search-cancel-button { display: none; }
.emo-clear { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.emo-clear[hidden] { display: none; }
.emo-clear .i { width: 14px; height: 14px; stroke-width: 2.4; }
.emo-manage-b { display: inline-flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.emo-manage-b[aria-pressed="true"] { background: var(--fill); }
.emo-manage-b .i { width: 20px; height: 20px; }
.emo-tabs { display: flex; flex: none; align-items: center; gap: 2px; padding: 0 10px 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.emo-tabs::-webkit-scrollbar { display: none; }
.emo-tabs[hidden] { display: none; }
.emo-tabs.dim { opacity: .45; }
.emo-tab { position: relative; display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; cursor: pointer; }
.emo-tab.gap { margin-left: 6px; }
.emo-tab img { width: 26px; height: 26px; object-fit: contain; }
.emo-tab .i { width: 20px; height: 20px; }
.emo-tab::after { position: absolute; right: 10px; bottom: 1px; left: 10px; height: 3px; border-radius: 2px; background: var(--primary); content: ""; opacity: 0; transition: opacity .15s ease; }
.emo-tab[aria-selected="true"] { background: var(--fill); color: var(--ink); }
.emo-tab[aria-selected="true"]::after { opacity: 1; }
.emo-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 10px; }
.emo-body[hidden], .emo-manage[hidden], .emo-foot[hidden] { display: none; }
.emo-sec h4 { position: sticky; z-index: 1; top: 0; margin: 0; padding: 8px 2px 4px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; }
.emo-sec h4 span { margin-left: 6px; font-weight: 400; }
.emo-grid { display: grid; gap: 2px; }
.emo-grid.uni { grid-template-columns: repeat(8, minmax(0, 1fr)); font-size: 25px; }
.emo-grid.pack { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.emo-grid.kao { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.emo-c { display: flex; min-width: 0; aspect-ratio: 1; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: inherit; line-height: 1; cursor: pointer; transition: background-color .12s ease, scale .12s cubic-bezier(.2, .8, .2, 1); }
.emo-c:has(img) { padding: 5px; }
.emo-c img { width: 100%; height: 100%; object-fit: contain; }
.emo-k { flex: none; max-width: 100%; height: 36px; padding: 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: background-color .12s ease, scale .12s cubic-bezier(.2, .8, .2, 1); }
.emo-c:hover, .emo-k:hover, .emo-tab:hover, .emo-clear:hover, .emo-manage-b:hover { background: color-mix(in srgb, var(--muted) 16%, transparent); }
.emo-c:active, .emo-k:active { scale: .9; }
.emo-c:focus-visible, .emo-k:focus-visible, .emo-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.emo-none { padding: 36px 12px; color: var(--muted); text-align: center; }
.emo-none-i { font-size: 32px; line-height: 1.2; }
.emo-none small { display: block; font-size: 12px; }
.emo-manage { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow-y: auto; padding: 0 12px 10px; }
.emo-manage p { margin: 4px 2px 8px; color: var(--muted); font-size: 12px; }
.emo-m-row { display: flex; width: 100%; min-height: 52px; box-sizing: border-box; align-items: center; gap: 12px; padding: 4px 2px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.emo-m-icon { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; }
.emo-m-icon img { width: 28px; height: 28px; object-fit: contain; }
.emo-m-text { flex: 1; min-width: 0; }
.emo-m-text strong, .emo-m-text small { display: block; }
.emo-m-text small { color: var(--muted); font-size: 12px; }
.emo-switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--outline); transition: background-color .2s ease; }
.emo-switch::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FDFDFD; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); content: ""; transition: translate .2s ease; }
.emo-m-row[aria-checked="true"] .emo-switch { background: var(--primary-bg); }
.emo-m-row[aria-checked="true"] .emo-switch::after { translate: 18px 0; }
.emo-foot { display: flex; flex: none; height: 48px; align-items: center; gap: 10px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--surface); }
.emo-foot-img { width: 32px; height: 32px; object-fit: contain; }
.emo-foot-img[hidden], .emo-foot-ch[hidden] { display: none; }
.emo-foot-ch { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 26px; line-height: 1; }
.emo-foot-text { display: flex; min-width: 0; flex-direction: column; line-height: 1.3; }
.emo-foot-name { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.emo-foot-code { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .emo *, .emo-sheet { transition: none !important; animation: none !important; } }
/* 手机：从底部升起的面板，标签放到下面拇指够得着的地方，没有预览栏。 */
.ed-popup.emo-host-sheet { position: fixed; inset: 0; z-index: 95; }
.emo-sheet-wrap { position: absolute; inset: 0; }
.emo-backdrop { position: absolute; inset: 0; background: rgba(11, 31, 24, .55); }
.emo-sheet { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 0 16px env(safe-area-inset-bottom); border-radius: 20px 20px 0 0; background: var(--bg); animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
.emo-sheet-grip { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--thread); }
.emo-sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
.emo-sheet-head h3 { display: flex; flex: 1; min-width: 0; align-items: baseline; gap: 8px; margin: 0; font-size: 17px; }
.emo-sheet-head small { color: var(--muted); font-size: 12px; font-weight: 400; }
.emo-sheet-x { margin-right: -10px; }
.emo.sheet { width: 100%; height: 400px; max-height: calc(100dvh - 120px); border: 0; border-radius: 0; box-shadow: none; }
.emo.sheet .emo-head { padding: 0 0 8px; }
.emo.sheet input.emo-q { font-size: 16px; }
.emo.sheet .emo-tabs { order: 3; padding: 6px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.emo.sheet .emo-tab { width: 44px; height: 44px; }
.emo.sheet .emo-body { padding: 0 0 8px; }
.emo.sheet .emo-grid.uni { grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 28px; }
.emo.sheet .emo-grid.pack { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ===== 发帖框：节点选择框里的「规则 N」和规则卡片 ===== */
.compose-node { position: relative; }
.compose .nl-rules { display: none; }
.compose-node .sel.has-rules .sel-button { padding-right: 110px; }
.compose-rules-b { position: absolute; z-index: 1; top: 7px; right: 36px; display: inline-flex; height: 30px; align-items: center; gap: 4px; padding: 0 9px 0 7px; border: 0; border-radius: 15px; background: var(--unread); color: var(--primary-hover); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.compose-rules-b[hidden] { display: none; }
.compose-rules-b.on, .compose-rules-b:hover { background: color-mix(in srgb, var(--primary) 16%, var(--bg)); }
.compose-rules-b .i { width: 14px; height: 14px; }
.compose-rules-n { font-variant-numeric: tabular-nums; }
.compose-rules { position: absolute; z-index: 31; top: 48px; left: 0; width: max(100%, 380px); max-width: calc(100vw - 32px); max-height: 360px; box-sizing: border-box; overflow-y: auto; padding: 14px 16px 12px; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 400; line-height: 1.55; animation: pop .16s ease-out; cursor: default; }
.compose-rules[hidden] { display: none; }
.compose-rules-head { display: flex; align-items: center; gap: 8px; }
.compose-rules-av { display: flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--fill); color: #FFFFFF; font-size: 12px; font-weight: 700; object-fit: cover; }
.compose-rules-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 15px; }
.compose-rules-x { width: 32px; height: 32px; margin-right: -6px; }
.compose-rules-list { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: rule; }
.compose-rules-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--fill); counter-increment: rule; }
.compose-rules-list li::before { grid-row: span 2; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; content: counter(rule); }
.compose-rules-list strong { line-height: 1.4; }
.compose-rules-list span { margin-top: 1px; color: var(--muted); font-size: 13px; }
.compose-rules-foot { margin: 0; padding-top: 10px; border-top: 1px solid var(--fill); color: var(--muted); font-size: 12px; }
.compose-title-tail .compose-read-menu { right: -7px; }
/* 回复框和私信框：收起时是一行的输入框，点进去展开成完整的编辑器 */
.replybox:has(> .ed) { display: block; padding: 0; border: 0; border-radius: 0; animation: none; }
.replybox .ed .ed-source { min-height: 120px; max-height: 50vh; resize: none; }
.replybox .ed-rich { min-height: 120px; }
.replybox.inline:has(> .ed) { margin: 0 0 8px; }
.ed.collapsed { flex-direction: row; align-items: flex-end; padding: 4px; border-radius: 22px; }
.ed.collapsed .ed-bar, .ed.collapsed .ed-status, .ed.collapsed [data-editor-cancel] { display: none; }
.ed.collapsed .ed-body { flex: 1 1 auto; }
.ed.collapsed .ed-source { min-height: 44px; height: 44px; padding: 10px 14px; overflow: hidden; }
.ed.collapsed .ed-foot { padding: 0; border-top: 0; }
@media (max-width: 860px) {
  .ed-bar { border-radius: 12px 12px 0 0; }
  .ed .ed-source, .ed-rich, .ed-preview { min-height: 200px; }
  .replybox .ed .ed-source, .replybox .ed-rich { min-height: 120px; }
}

/* ===== 聊天（static/chat.js）：面板（宽屏右下角 / 全屏 / 收起成一颗按钮，窄屏盖住整页），和 /chat 整页。设计稿「组件 · 顶栏与全局弹层」「组件 · 移动端顶栏与抽屉」 ===== */
.chat { --chat-bubble: #F2F5F6; --chat-mine: var(--unread); --chat-tint: #E6F4EE; --chat-tint-fg: #005C3D; position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
:root[data-theme="dark"] .chat { --chat-bubble: #22262A; --chat-tint: #1F2724; --chat-tint-fg: var(--primary); }
aside.chat { position: fixed; z-index: 55; right: 16px; bottom: 16px; width: min(720px, calc(100vw - 32px)); height: min(540px, calc(100vh - 96px)); overflow: hidden; border-radius: 16px; box-shadow: 0 16px 48px rgba(11, 31, 24, .22), 0 0 0 1px var(--line); animation: pop .18s ease-out; }
:root[data-theme="dark"] aside.chat { box-shadow: 0 16px 48px rgba(0, 0, 0, .55), 0 0 0 1px var(--line); }
aside.chat[hidden], aside.chat.minimized { display: none; }
/* 换页之后接着开着的聊天面板、发帖框：不再放一遍弹出的动画。 */
aside.chat.instant, dialog.compose-modal.instant[open] { animation: none !important; }
/* 全屏：铺满侧栏右边、顶栏下面（left / top 由脚本按侧栏和顶栏算）；侧栏的收起按钮留在面板上面。 */
aside.chat.full { right: 0; bottom: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; animation: none; }
aside.chat.full .chat-top { padding-left: 36px; }
aside.chat.full .chat-list { width: 300px; }
:root.chat-full-on .rail-toggle { z-index: 56; }
.top-chat[aria-expanded="true"] { background: var(--fill); }
/* 收起之后：右下角一颗「聊天」按钮。 */
.chat-pill { position: fixed; z-index: 55; right: 16px; bottom: 16px; display: flex; height: 48px; align-items: center; gap: 10px; padding: 0 12px 0 16px; border: 0; border-radius: 24px; background: var(--bg); box-shadow: 0 8px 24px rgba(11, 31, 24, .2), 0 0 0 1px var(--line); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chat-pill[hidden] { display: none; }
.chat-pill .i { width: 20px; height: 20px; }
.chat-pill .i:last-child { width: 16px; height: 16px; }
.chat .count, .chat-pill .count { position: static; display: inline-flex; flex: none; min-width: 18px; height: 18px; align-items: center; justify-content: center; padding: 0 5px; border: 0; border-radius: 9px; background: var(--primary-bg); color: var(--on-primary); font-size: 11px; font-weight: 700; line-height: 1; }
.chat .count[hidden], .chat-pill .count[hidden] { display: none; }
/* 整页的聊天不限 1124 宽，铺满侧栏右边的整块主内容区。 */
.page > .view[data-view="chat"] { max-width: none; }
.chat.page { height: calc(100vh - 168px); min-height: 420px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chat.page .chat-top { display: none; }
.chat .grow { flex: 1 1 auto; }
.chat .iconbtn { width: 36px; height: 36px; color: var(--soft); }
.chat .iconbtn .i { width: 18px; height: 18px; }
.chat-top { display: flex; flex: none; align-items: center; gap: 4px; height: 52px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.chat-top-title { flex: 1; margin: 0; font-size: 16px; font-weight: 700; }
.chat-top-new { display: none; }
.chat-body { display: flex; flex: 1 1 auto; min-height: 0; }

/* 列表 */
.chat-list { flex: none; width: 248px; padding: 4px 8px 12px; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
.chat-section { display: flex; height: 32px; align-items: center; justify-content: space-between; margin-top: 6px; padding: 0 4px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.chat-section .iconbtn.small { width: 30px; height: 30px; }
.chat-hint { margin: 2px 8px 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-item { display: flex; width: 100%; min-height: 52px; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.chat-item:hover { background: var(--hover); }
.chat-item[aria-current="true"] { background: var(--fill); }
.chat-item-main { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.chat-item-name, .chat-item-line { display: flex; align-items: baseline; gap: 6px; }
.chat-item-line { align-items: center; }
.chat-item-name strong { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.unread .chat-item-name strong { font-weight: 700; }
.chat-item-name small { flex: none; color: var(--muted); font-size: 11px; }
.chat-item-excerpt { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.faint .chat-item-name strong { color: var(--muted); }
.chat-avatar { display: inline-flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; }
.chat-avatar.letter { color: #FFFFFF; font-weight: 700; }
.chat-avatar.hash { border-radius: 10px; background: var(--fill); color: var(--soft); font-size: 17px; font-weight: 700; }

/* 右边：欢迎、会话、发起聊天 */
.chat-pane { position: relative; display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; flex-direction: column; }
.chat-empty { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; }
.chat-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.chat-empty .chat-empty-title { margin-top: 6px; color: var(--ink); font-size: 16px; font-weight: 700; }
.chat-welcome-i { display: flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: var(--chat-tint); color: var(--primary); }
.chat-welcome-i .i { width: 26px; height: 26px; }
.chat-empty .chat-btn { margin-top: 10px; height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14px; }
.chat-btn { height: 44px; padding: 0 20px; border: 0; border-radius: 22px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.chat-btn.primary { background: var(--primary-bg); color: var(--on-primary); }
.chat-btn.ghost { background: var(--fill); color: var(--ink); }
.chat-btn.danger { background: var(--danger); color: #FFFFFF; }
:root[data-theme="dark"] .chat-btn.danger { color: #141618; }
.chat-btn[aria-disabled="true"] { background: var(--fill); color: var(--outline-text); cursor: default; }
.chat-head { display: flex; flex: none; height: 56px; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.chat-head .chat-avatar { width: 32px; height: 32px; }
.chat-title { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.chat-title strong, .chat-title .strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.chat-title small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .menu-panel { right: 0; left: auto; }
.chat-back { display: none; }
.chat-members-b { display: inline-flex; flex: none; height: 36px; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chat-members-b .i { width: 16px; height: 16px; }
.chat-members-b[aria-expanded="true"] { background: var(--line); }

/* 消息 */
.chat-messages { flex: 1 1 auto; min-height: 0; padding: 8px 16px 12px; overflow-y: auto; overscroll-behavior: contain; }
.chat-more, .chat-blank { margin: 0; padding: 8px 0; color: var(--muted); font-size: 12px; text-align: center; }
.chat-more:empty { display: none; }
.chat-day { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-sys { margin: 12px 0 4px; color: var(--muted); font-size: 12px; text-align: center; }
.chat-msg { position: relative; display: flex; gap: 10px; margin: 12px -8px 0; padding: 3px 8px; border-radius: 10px; }
.chat-msg.follow { margin-top: 2px; }
.chat-msg.follow > .chat-avatar { visibility: hidden; height: 0; }
.chat-msg:hover, .chat-msg.picked { background: var(--hover); }
.chat-msg > .chat-avatar { width: 32px; height: 32px; font-size: 13px; }
.chat-msg-body { flex: 1 1 auto; min-width: 0; }
.chat-msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.chat-msg-head .strong { color: var(--ink); font-size: 13px; font-weight: 700; }
.chat-msg-head time { color: var(--muted); font-size: 11px; }
.chat-bubble { display: inline-block; max-width: 100%; padding: 7px 12px; border-radius: 4px 14px 14px 14px; background: var(--chat-bubble); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg.me .chat-bubble { background: var(--chat-mine); }
.chat-quote { display: block; margin: 1px 0 6px; padding: 3px 8px; overflow: hidden; border-left: 3px solid var(--outline); border-radius: 4px; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-quote b { color: var(--soft); }
.chat-bubble .prose { font-size: 14px; line-height: 1.5; }
.chat-msg .prose > :first-child { margin-top: 0; }
.chat-msg .prose > :last-child { margin-bottom: 0; }
.chat-msg .prose p { margin: 2px 0; }
.chat-bubble .prose img:not(.emoji) { max-height: 240px; border-radius: 8px; }
.chat-media { margin-top: 4px; }
.chat-media .prose p { margin: 0; }
.chat-media img { display: block; max-width: min(240px, 100%); max-height: 240px; border-radius: 12px; object-fit: cover; }
/* 消息里的图片包在按钮里（chat.js），点了看大图。 */
.chat-pic { display: inline-block; max-width: 100%; padding: 0; border: 0; border-radius: 8px; background: transparent; vertical-align: top; cursor: zoom-in; }
.chat-media .chat-pic { display: block; border-radius: 12px; }
.chat-sticker { margin-top: 4px; }
.chat-sticker .prose p { margin: 0; }
.chat-sticker img.emoji { width: 96px; height: 96px; object-fit: contain; }
.chat-gone { display: inline-block; padding: 5px 12px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13px; font-style: italic; }
.chat-acts { position: absolute; top: -10px; right: 8px; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--bg); box-shadow: 0 2px 8px rgba(15, 26, 28, .14), 0 0 0 1px var(--line); opacity: 0; transition: opacity .12s ease; pointer-events: none; }
.chat-msg:hover .chat-acts, .chat-msg:focus-within .chat-acts, .chat-msg.picked .chat-acts { opacity: 1; pointer-events: auto; }
.chat-acts button { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer; }
.chat-acts button:hover { background: var(--hover); }
.chat-acts .chat-del { color: var(--danger); }
.chat-acts .i { width: 16px; height: 16px; }

/* 底部：输入框、只读说明、加入 */
.chat-foot { display: flex; flex: none; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.chat-foot.chat-ro { padding: 12px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.chat-quoting { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-left: 3px solid var(--primary); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12px; }
.chat-quoting[hidden] { display: none; }
.chat-quoting > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-quoting b { color: var(--ink); }
.chat-quoting .iconbtn { width: 28px; height: 28px; }
.chat-compose { display: flex; min-height: 48px; align-items: flex-end; gap: 2px; padding: 4px 6px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--bg); }
.chat-compose .iconbtn { width: 38px; height: 38px; color: var(--ink); }
.chat-compose .iconbtn .i { width: 20px; height: 20px; }
.chat-compose .chat-attach .i { width: 22px; height: 22px; }
.chat-compose .chat-emoji-b { color: var(--soft); }
.chat-compose .chat-send { color: var(--primary); }
.chat-compose .chat-send.off, .chat-compose .chat-send:disabled { opacity: .4; }
.chat-compose textarea { flex: 1 1 auto; min-width: 0; min-height: 38px; max-height: 120px; padding: 9px 6px; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.35; resize: none; }
.chat .chat-plain:focus, .chat .chat-plain:focus-visible { outline: none !important; border-color: transparent !important; box-shadow: none !important; }
.chat-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.chat-join .chat-btn { height: 40px; font-size: 14px; }
/* 表情面板贴着输入框上方，面板矮的时候跟着缩，不伸出聊天面板。 */
.chat-emoji { position: absolute; z-index: 5; top: 8px; right: 12px; bottom: 76px; display: flex; align-items: flex-end; pointer-events: none; }
.chat-emoji .emo { max-height: 100%; pointer-events: auto; }
.chat-emoji[hidden] { display: none; }

/* 群成员 */
.chat-members { position: absolute; z-index: 4; top: 56px; right: 0; bottom: 0; display: flex; width: 260px; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg); box-shadow: -8px 0 24px rgba(15, 26, 28, .08); }
.chat-members-head { display: flex; flex: none; height: 44px; align-items: center; gap: 4px; padding: 0 8px 0 16px; font-size: 14px; font-weight: 700; }
.chat-members-head > span { flex: 1; }
.chat-members-head .iconbtn { width: 32px; height: 32px; }
.chat-add-b { display: inline-flex; height: 30px; align-items: center; gap: 4px; padding: 0 10px; border: 0; border-radius: 15px; background: var(--chat-tint); color: var(--chat-tint-fg); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-add-b .i { width: 14px; height: 14px; }
.chat-members-list { flex: 1; min-height: 0; padding: 0 8px; overflow-y: auto; }
.chat-member { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 4px 4px 4px 8px; }
.chat-member .chat-avatar { width: 32px; height: 32px; font-size: 13px; }
.chat-member-name { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.chat-member-name > span { display: flex; align-items: center; gap: 6px; overflow: hidden; font-size: 14px; font-weight: 700; white-space: nowrap; }
.chat-member-name small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-role { display: inline-flex; height: 18px; align-items: center; padding: 0 6px; border-radius: 9px; background: var(--chat-tint); color: var(--chat-tint-fg); font-size: 11px; }
.chat-kick { flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--danger); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-invite { flex: none; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--primary-bg); color: var(--on-primary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-cand-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; color: var(--muted); font-size: 12px; }
.chat-done { height: 28px; padding: 0 8px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-cand-q { display: flex; height: 40px; align-items: center; gap: 8px; margin: 0 8px 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.chat-cand-q .i { flex: none; width: 16px; height: 16px; }
.chat-cand-q input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; }
.chat-members .chat-hint { margin: 16px 8px; font-size: 13px; }
.chat-members-foot { flex: none; padding: 12px; border-top: 1px solid var(--line); }
.chat-members-foot p { margin: 0 0 8px; color: var(--soft); font-size: 13px; }
.chat-leave-b { display: flex; width: 100%; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--danger); border-radius: 20px; background: var(--bg); color: var(--danger); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chat-confirm { display: flex; gap: 8px; }
/* 群主的两件事：改群名、转让群主（设计稿没画，排在「解散群聊」上面）。 */
.chat-owner-acts { display: flex; gap: 8px; margin-bottom: 8px; }
.chat-owner-acts .chat-btn { flex: 1; height: 36px; padding: 0; border-radius: 18px; font-size: 13px; }
.chat-rename { display: block; padding: 4px 8px; }
.chat-rename > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.chat-rename input { display: block; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; }
.chat-rename small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.chat-confirm .chat-btn { flex: 1; height: 38px; padding: 0; border-radius: 19px; font-size: 13px; }

/* 发起聊天 */
.chat-new-top { flex: none; padding: 14px 16px 4px; }
.chat-new-to { display: flex; min-height: 48px; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); cursor: text; }
.chat-new-to input { flex: 1; min-width: 120px; height: 34px; min-height: 0; padding: 0 6px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
.chat-chip { display: inline-flex; height: 32px; align-items: center; gap: 2px; max-width: 100%; padding: 0 4px 0 12px; border-radius: 16px; background: var(--fill); font-size: 14px; }
.chat-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat .chat-chip-x { width: 26px; height: 26px; color: var(--muted); }
.chat .chat-chip-x .i { width: 14px; height: 14px; }
.chat-new-hint { margin: 8px 2px 0; color: var(--muted); font-size: 13px; }
.chat-new-field { display: block; margin-top: 14px; }
.chat-new-field[hidden] { display: none; }
.chat-new-field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.chat-new-field small { color: var(--muted); font-size: 14px; font-weight: 400; }
.chat-new-field input { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; }
.chat-new-body { flex: 1; min-height: 0; padding: 4px 8px 8px; overflow-y: auto; overscroll-behavior: contain; }
.chat-new-head { padding: 10px 8px 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.chat-new-head[hidden], .chat-new-none[hidden] { display: none; }
.chat-new-none { margin: 24px 0; color: var(--muted); font-size: 13px; text-align: center; }
.chat-pick { display: flex; width: 100%; min-height: 56px; align-items: center; gap: 12px; padding: 6px 12px 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.chat-pick:hover { background: var(--hover); }
.chat-pick[aria-checked="true"] { background: var(--surface); }
.chat-pick .chat-avatar { width: 40px; height: 40px; }
.chat-pick-name { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.chat-pick-name strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.chat-pick-name small { color: var(--muted); font-size: 12px; }
.chat-check { display: flex; flex: none; width: 22px; height: 22px; align-items: center; justify-content: center; border: 2px solid var(--outline); border-radius: 5px; background: var(--bg); color: #FFFFFF; }
.chat-check .i { width: 14px; height: 14px; visibility: hidden; stroke-width: 2.6; }
.chat-pick[aria-checked="true"] .chat-check { border-color: var(--primary-bg); background: var(--primary-bg); }
.chat-pick[aria-checked="true"] .chat-check .i { visibility: visible; }
.chat-new-actions { display: flex; flex: none; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-new-actions .chat-btn.primary { padding: 0 22px; }

/* 新建 / 修改频道 */
.chat-dlg-back { position: absolute; z-index: 10; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.chat-dlg { width: min(440px, 100%); max-height: 100%; padding: 20px; overflow-y: auto; border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-modal); }
.chat-dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chat-dlg-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.chat-dlg-field { display: block; margin-bottom: 14px; }
.chat-dlg-field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.chat-dlg-field input { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; }
.chat-dlg-field input:disabled { background: var(--surface); color: var(--muted); }
.chat-dlg-err { display: block; margin-top: 6px; color: var(--danger); font-size: 12px; }
.chat-dlg-err[hidden] { display: none; }
.chat-dlg-switch { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; cursor: pointer; }
.chat-dlg-switch > span { display: flex; flex: 1; flex-direction: column; }
.chat-dlg-switch small { color: var(--muted); font-size: 12px; }
.chat-dlg-switch input { flex: none; width: 20px; height: 20px; accent-color: var(--primary-bg); }
.chat-dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* 窄屏：面板盖住整页（设计稿 MobileTop），列表、会话、「发起聊天」各占一屏，会话和发起聊天里有返回。 */
@media (max-width: 860px) {
  aside.chat, aside.chat.full { inset: 0; z-index: 80; width: auto; height: auto; border-radius: 0; box-shadow: none; animation: none; }
  :root.chat-open { overflow: hidden; }
  .chat-top { height: 56px; padding: 0 6px 0 16px; }
  .chat-top-title { font-size: 18px; font-weight: 800; }
  .chat-top .iconbtn { width: 44px; height: 44px; }
  .chat-top .chat-top-new { display: inline-flex; }
  .chat.in-thread .chat-top { display: none; }
  .chat.page { height: calc(100dvh - 76px); min-height: 0; border: 0; border-radius: 0; }
  /* 整页的聊天要尽量高：不要大标题，也不要右下角的发帖按钮挡着输入框。 */
  .view[data-view="chat"] { gap: 0; padding-top: 0; }
  .view[data-view="chat"] > h1 { display: none; }
  body:has(.view[data-view="chat"]) .fab { display: none !important; }
  /* 发帖页上不要右下角的发帖按钮：它会压住表单。 */
  body:has(form[data-form="new-topic"]) .fab { display: none !important; }
  .chat-list, aside.chat.full .chat-list { width: 100%; padding-bottom: 24px; border-right: 0; }
  .chat-pane { display: none; }
  .chat.in-thread .chat-list { display: none; }
  .chat.in-thread .chat-pane { display: flex; }
  .chat-back { display: inline-flex; }
  .chat-members { width: 100%; border-left: 0; box-shadow: none; }
  .chat-emoji { top: auto; right: 0; bottom: 0; left: 0; }
  .chat-acts { opacity: 0; }
}


/* ===== 自定义信息流 ===== */
.feed-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: #FFFFFF; }
.feed-tile .i { width: 16px; height: 16px; stroke-width: 2; }
.feed-tile.plain { background: transparent; color: var(--ink); }
.feed-tile.plain .i { width: 20px; height: 20px; }
.feed-tile.big { width: 56px; height: 56px; border-radius: 14px; }
.feed-tile.big .i { width: 28px; height: 28px; }
.feed-tabs { display: flex; align-items: center; gap: 8px; padding: 0 16px 4px; overflow-x: auto; }
.chip.feed-tab { gap: 8px; max-width: 260px; padding: 0 16px 0 8px; font-size: 14px; }
.chip.feed-tab.dashed { gap: 6px; padding: 0 16px 0 12px; border: 1px dashed var(--outline); background: transparent; }
.chip.feed-tab.dashed .i { width: 18px; height: 18px; }
.feed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 16px 0; }
.feed-head-text { flex: 1 1 200px; min-width: 0; }
.feed-head-text h1 { font-size: 28px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.feed-head-text .small { font-size: 13px; }
.feed-actions { display: flex; gap: 8px; }
.iconbtn.filled.danger { color: var(--danger); }
.feed-desc { margin: 10px 16px 0; color: var(--soft); overflow-wrap: anywhere; }
.main-head.feed-sorts { margin-top: 14px; padding: 0 16px 10px; }
.feed-side .panel h2 { margin-bottom: 4px; font-size: 14px; }
.feed-node { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.feed-node-name { display: flex; flex: 1; min-width: 0; flex-direction: column; line-height: 1.35; }
.feed-node-name a { overflow: hidden; color: var(--ink); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.feed-node-name small { color: var(--muted); font-size: 12px; }
.feed-node .iconbtn { margin-right: -8px; color: var(--muted); }
.feed-node .iconbtn .i { width: 18px; height: 18px; }
.feed-node .btn.add { padding: 0 16px; border-color: var(--primary); background: transparent; color: var(--primary); }
.feed-node .btn.add:disabled { border-color: var(--line); color: var(--muted); }
.feed-search { display: block; width: 100%; height: 44px; margin: 4px 0; padding: 0 16px; border: 1px solid var(--outline); border-radius: 22px; background: var(--bg); color: var(--ink); font: inherit; }
.feed-scrim { display: none; }
@media (max-width: 860px) {
  .feed-head-text h1 { font-size: 22px; }
  /* 窄屏上节点的管理是从底部升起的一块，点「管理节点」打开。 */
  .feedpage.sheet-open .feed-side { position: fixed; z-index: 51; right: 0; bottom: 0; left: 0; display: block; max-height: 80%; padding: 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .feedpage.sheet-open .feed-side .panel { padding: 20px 16px 24px; border-radius: 20px 20px 0 0; background: var(--bg); }
  .feedpage.sheet-open .feed-side .btn.block { display: flex !important; margin-top: 16px; }
  .feed-scrim { position: fixed; z-index: 50; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: var(--scrim); cursor: default; }
}

/* 弹窗里的开关（「公开」）。 */
.modal .switch-field { flex-direction: row; align-items: center; gap: 12px; min-height: 52px; font-weight: 400; cursor: pointer; }
.modal .switch-field > span { display: flex; flex: 1; flex-direction: column; }
.modal .switch-field strong { font-size: 15px; font-weight: 500; }
.modal .switch-field small { color: var(--muted); font-size: 13px; }
.modal .switch-field input { position: relative; flex: none; width: 52px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 16px; background: var(--outline); appearance: none; cursor: pointer; transition: background-color .18s ease; }
.modal .switch-field input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); transition: translate .18s ease; }
.modal .switch-field input:checked { background: var(--primary-bg); }
.modal .switch-field input:checked::after { translate: 20px 0; }

/* ===== 成就 ===== */
.badge-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; }
.badge-tile .i { width: 28px; height: 28px; }
.badge-tile.small { width: 36px; height: 36px; }
.badge-tile.small .i { width: 20px; height: 20px; }
.badge-tile.huge { width: 88px; height: 88px; }
.badge-tile.huge .i { width: 44px; height: 44px; }
/* 四个档次：铜、银、金、稀有。徽章是「东西」，深色模式下也是这几种颜色。 */
.badge-tile.tier-1 { background: #F1E3D6; color: #92400E; }
.badge-tile.tier-2 { background: #E5EBEE; color: #2A3C42; }
.badge-tile.tier-3 { background: #FBEFC9; color: #7A5200; }
.badge-tile.tier-4 { background: #0B1F18; color: #5CC79A; }
:root[data-theme="dark"] .badge-tile.tier-4 { box-shadow: 0 0 0 1px #2E5A47; }
.badge-tile.locked { background: var(--fill); color: var(--outline-text); box-shadow: none; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 16px; background: var(--fill); font-size: 12px; font-weight: 500; }
.badge-chip .badge-tile.small { width: 26px; height: 26px; }
.badge-chip .badge-tile.small .i { width: 14px; height: 14px; }
.meter { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: var(--fill); }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--primary-bg); }
.meter.on-night { height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.meter.on-night > span { border-radius: 4px; background: #5CC79A; }
/* 「声望与成就」页（设计稿 Achievements / Mobile-Achievements，模板 achievements.html）。类名前缀 ra-。
   段位卡固定是深底白字（段位和档次的颜色是「东西」，深色模式下不变）；其余白卡用全站变量，自动跟深色模式。 */
.ra-t0 { --ra-m1: #F6E3D2; --ra-m2: #D9A679; --ra-mfg: #7A3A10; --ra-hero: #2B1A12; }
.ra-t1 { --ra-m1: #F4F7F8; --ra-m2: #C5D0D6; --ra-mfg: #2A3C42; --ra-hero: #1E272C; }
.ra-t2 { --ra-m1: #FFF4CF; --ra-m2: #EBC65A; --ra-mfg: #6B4700; --ra-hero: #2A2108; }
.ra-t3 { --ra-m1: #E6FAF6; --ra-m2: #9ED9CF; --ra-mfg: #0F5D57; --ra-hero: #0A2926; }
.ra-t4 { --ra-m1: #EEF5FF; --ra-m2: #A9C8FF; --ra-mfg: #1E4E9A; --ra-hero: #0D1E3B; }
.ra-t5 { --ra-m1: #F8ECFF; --ra-m2: #D3A8F5; --ra-mfg: #6B21A8; --ra-hero: #25123B; }
.ra-t6 { --ra-m1: #FFEAF2; --ra-m2: #F4A3C4; --ra-mfg: #9D174D; --ra-hero: #36102A; }
.ra-t7 { --ra-m1: #FFEDE3; --ra-m2: #FFB38A; --ra-mfg: #A33A00; --ra-hero: #3A170A; }
.ra-t8 { --ra-m1: #2B4160; --ra-m2: #10202E; --ra-mfg: #FBEFC9; --ra-hero: #131318; }
/* 成就的四个档次（铜、银、金、稀有）的奖章渐变；铜银金和青铜白银黄金三个段位是同一组色。 */
.ra-g1 { --ra-g1: #F6E3D2; --ra-g2: #D9A679; --ra-gfg: #7A3A10; }
.ra-g2 { --ra-g1: #F4F7F8; --ra-g2: #C5D0D6; --ra-gfg: #2A3C42; }
.ra-g3 { --ra-g1: #FFF4CF; --ra-g2: #EBC65A; --ra-gfg: #6B4700; }
.ra-g4 { --ra-g1: #1B3A2F; --ra-g2: #0B1F18; --ra-gfg: #5CC79A; }
/* 声望来源的颜色。深色模式下被采纳、精华、成就提亮一档，小圆点和色块才看得清。 */
:root { --ra-like: var(--primary-bg); --ra-accept: #0E7490; --ra-featured: #6D28D9; --ra-achievement: #B7791F; --ra-task: var(--outline); --ra-revoke: var(--danger); }
:root[data-theme="dark"] { --ra-accept: #5EC4D6; --ra-featured: #A78BFA; --ra-achievement: #E0B04A; }
.ra-src-like { background: var(--ra-like); }
.ra-src-accept { background: var(--ra-accept); }
.ra-src-featured { background: var(--ra-featured); }
.ra-src-achievement { background: var(--ra-achievement); }
.ra-src-task { background: var(--ra-task); }
.ra-src-revoke { background: var(--ra-revoke); }

.ra-page .main { display: flex; flex-direction: column; gap: 32px; padding: 4px 0 64px; }
.ra-aside { display: flex; flex-direction: column; gap: 16px; }

/* ----- 段位卡 ----- */
@keyframes raIn { from { opacity: 0; translate: 0 10px; } }
@keyframes raFill { from { width: 0; } }
@keyframes raPop { from { opacity: 0; scale: .2; } }
@keyframes raPulse { 0% { opacity: .75; scale: .82; } 100% { opacity: 0; scale: 1.5; } }
@keyframes raFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes raSway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.2deg); } }
/* 段位卡（设计稿「段位视觉」）：每段一张场景背景图 + 动态场景层 + 立体主图，点轨道切换时交叉淡入；左右和底部压暗角保证字看得清。 */
.ra-hero { position: relative; padding: 34px 30px 18px; overflow: hidden; border-radius: 24px; background-color: var(--ra-hero); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px -18px rgba(11, 31, 24, .55); transition: background-color .5s ease; animation: raIn .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.ra-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ra-scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.ra-scene-img.on { opacity: 1; visibility: visible; transition: opacity .5s ease, visibility 0s linear 0s; }
.ra-fx { position: absolute; inset: 0; display: none; width: 100%; height: 100%; }
.ra-fx.on { display: block; }
.ra-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 8, 14, .62) 0%, rgba(6, 8, 14, .12) 50%, rgba(6, 8, 14, .5) 100%), linear-gradient(0deg, rgba(6, 8, 14, .7) 0%, rgba(6, 8, 14, 0) 42%); }
.ra-art { position: absolute; top: 18px; left: 50%; width: 190px; height: 168px; margin-left: -95px; pointer-events: none; }
.ra-art-in { position: absolute; inset: 0; will-change: transform; }
.ra-art-in.float { animation: raFloat 5s ease-in-out infinite; }
.ra-art-in.sway { transform-origin: 50% 8%; animation: raSway 4.2s ease-in-out infinite; }
.ra-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; visibility: hidden; scale: .86; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .42)); transition: opacity .4s ease, scale .5s cubic-bezier(.2, .9, .3, 1), visibility 0s linear .5s; }
.ra-art-img.on { opacity: 1; visibility: visible; scale: 1; transition: opacity .4s ease, scale .5s cubic-bezier(.2, .9, .3, 1), visibility 0s linear 0s; }
.ra-hero-top { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.ra-hero-text { flex: 1 1 160px; min-width: 0; max-width: 250px; animation: raIn .5s cubic-bezier(.2, .8, .2, 1) .08s backwards; }
.ra-hero h1 { margin: 0; color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.5; }
.ra-tier-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ra-tier-name { font-family: "Bricolage Grotesque", var(--font); font-size: 42px; font-weight: 800; line-height: 1.15; }
.ra-state { padding: 0 9px; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.ra-state.now { background: rgba(255, 255, 255, .92); color: #111517; }
.ra-sel-line { margin-top: 2px; color: rgba(255, 255, 255, .78); font-size: 13px; }
.ra-pct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 30px; color: rgba(255, 255, 255, .78); font-size: 13px; }
.ra-pct b { color: #FFFFFF; font-variant-numeric: tabular-nums; }
.ra-back { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .14); color: #FFFFFF; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ra-back[hidden] { display: none; }
.ra-back:hover { background: rgba(255, 255, 255, .22); }
.ra-back:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.ra-rep { flex: none; margin-left: auto; text-align: right; animation: raIn .5s cubic-bezier(.2, .8, .2, 1) .16s backwards; }
.ra-rep-label { color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.ra-rep-num { font-family: "Bricolage Grotesque", var(--font); font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.05; }
.ra-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.ra-pill { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(255, 255, 255, .16); color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ra-pill .i { width: 11px; height: 11px; stroke-width: 2.4; }
.ra-pill.dim { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9); }
.ra-track { position: relative; margin-top: 30px; }
.ra-rail { position: absolute; top: 22px; right: 5.556%; left: 5.556%; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .2); }
.ra-fill { display: block; width: var(--ra-fill); height: 100%; border-radius: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .7) 0%, #FFFFFF 50%, rgba(255, 255, 255, .7) 100%); background-size: 200% 100%; animation: raFill 1.4s cubic-bezier(.2, .8, .2, 1) .3s backwards; }
.ra-nodes { position: relative; display: flex; }
.ra-node { position: relative; display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 6px; border: 0; border-radius: 12px; background: transparent; color: #FFFFFF; font: inherit; cursor: pointer; }
.ra-node:active { scale: 1; }
.ra-node:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -2px; }
.ra-dot-box { display: flex; align-items: center; height: 36px; }
/* 轨道上的段位：小图标放在圆里。已达成和当前的是亮一点的灰底白图标，没达成的更暗；选中的换成该段位的渐变色圆。 */
.ra-dot { position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 28px; height: 28px; border: 1px solid #7A7F8C; border-radius: 50%; background: #3A3D47; color: #FFFFFF; transition: width .25s cubic-bezier(.2, .9, .3, 1), height .25s cubic-bezier(.2, .9, .3, 1), scale .22s cubic-bezier(.2, .9, .3, 1), box-shadow .25s ease, border-color .2s ease; animation: raPop .5s cubic-bezier(.2, 1.3, .3, 1) backwards; animation-delay: calc(.25s + var(--ra-i) * .07s); }
.ra-dot .tier-ico { width: 14px; height: 14px; transition: width .25s cubic-bezier(.2, .9, .3, 1), height .25s cubic-bezier(.2, .9, .3, 1); }
.ra-node.ahead .ra-dot { border-color: #3E424D; background: #1C1E26; color: #8A8F9C; }
.ra-node:hover .ra-dot { scale: 1.16; }
.ra-node[aria-pressed="true"] .ra-dot { width: 36px; height: 36px; border: 2px solid #FFFFFF; background: linear-gradient(145deg, var(--ra-m1) 0%, var(--ra-m2) 100%); color: var(--ra-mfg); box-shadow: 0 0 0 5px rgba(255, 255, 255, .16), 0 6px 16px rgba(0, 0, 0, .35); }
.ra-node[aria-pressed="true"] .ra-dot .tier-ico { width: 18px; height: 18px; }
.ra-pulse { position: absolute; inset: -7px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; animation: raPulse 2.2s ease-out 1.2s infinite; }
.ra-node-name { max-width: 100%; overflow: hidden; color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 500; text-overflow: clip; white-space: nowrap; }
.ra-node[aria-pressed="true"] .ra-node-name { color: #FFFFFF; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .ra-art-in.float, .ra-art-in.sway, .ra-fill, .ra-pulse { animation: none; }
  .ra-hero svg * { animation-play-state: paused !important; }
}

/* ----- 区块标题 ----- */
.ra-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 12px; }
.ra-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.ra-head-note { flex: 1 1 160px; color: var(--muted); font-size: 13px; }
.ra-count { color: var(--muted); font-size: 13px; }
.ra-week { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ra-week b { font-weight: 700; }
.ra-week-bar { display: block; width: 72px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.ra-week-bar > span { display: block; height: 100%; background: var(--primary-bg); }

/* ----- 任务 ----- */
.ra-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; scrollbar-width: none; }
.ra-tasks::-webkit-scrollbar { display: none; }
.ra-task { display: flex; min-width: 0; flex-direction: column; gap: 10px; box-sizing: border-box; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.ra-task.done { background: var(--surface); }
.ra-task-top { display: flex; align-items: center; gap: 8px; }
.ra-ring { position: relative; flex: none; width: 40px; height: 40px; }
.ra-ring svg { width: 40px; height: 40px; rotate: -90deg; }
.ra-ring circle { fill: none; stroke-width: 4; }
.ra-ring .base { stroke: var(--fill); }
.ra-ring .fill { stroke: var(--primary-bg); stroke-linecap: round; }
.ra-ring-in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ra-ring-in .i { width: 16px; height: 16px; color: var(--primary); stroke-width: 2.4; }
.ra-period { padding: 0 8px; border-radius: 9px; background: var(--unread); color: var(--primary-hover); font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.ra-period.weekly { background: var(--level-bg); color: var(--level-fg); }
:root[data-theme="dark"] .ra-period.daily { color: var(--primary); }
.ra-grow { flex: 1; min-width: 0; }
.ra-task-energy { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ra-task-energy .i { width: 12px; height: 12px; }
.ra-task-rep { color: var(--primary-hover); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ra-task-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.ra-task.done .ra-task-title { color: var(--muted); }
.ra-task-foot { display: flex; align-items: center; min-height: 24px; color: var(--muted); font-size: 13px; font-weight: 700; }
.ra-task-foot a { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: var(--primary); }
.ra-task-foot a .i { width: 14px; height: 14px; }
.ra-task-foot .auto { font-weight: 500; }

/* ----- 成就 ----- */
.ra-cats { display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.ra-cats::-webkit-scrollbar { display: none; }
.ra-cat { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ra-cat:hover { background: var(--hover); }
.ra-cat[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.ra-block h3 { margin: 16px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.ra-block + .ra-block h3 { margin-top: 20px; }
.ra-got { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 10px; }
.ra-card { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 18px 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: translate .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ra-card:hover { translate: 0 -2px; border-color: var(--outline); box-shadow: 0 8px 20px rgba(15, 26, 28, .08); }
.ra-card[hidden], .ra-row[hidden] { display: none; }
.ra-medal-s { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(145deg, var(--ra-g1) 0%, var(--ra-g2) 100%); color: var(--ra-gfg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 1px var(--ra-g2); }
.ra-medal-s .i { width: 27px; height: 27px; stroke-width: 1.7; }
.ra-medal-s.locked { width: 40px; height: 40px; background: var(--fill); color: var(--outline-text); box-shadow: 0 0 0 1px var(--line); }
.ra-medal-s.locked .i { width: 20px; height: 20px; }
:root[data-theme="dark"] .ra-medal-s.ra-g4, :root[data-theme="dark"] .ra-medal-l.ra-g4 { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2), 0 0 0 1px #2E5A47; }
.ra-times { position: absolute; right: -6px; bottom: -4px; height: 20px; padding: 0 6px; box-sizing: border-box; border: 2px solid var(--bg); border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; line-height: 16px; }
.ra-card-name { max-width: 100%; margin-top: 8px; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ra-card-date { color: var(--muted); font-size: 12px; }
.ra-shown-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-bg); }
.ra-shown-dot[hidden] { display: none; }
.ra-todo { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.ra-row { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--fill); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ra-row:last-child { border-bottom: 0; }
.ra-row:hover { background: var(--surface); }
.ra-row:active { scale: 1; }
.ra-row.off { opacity: .62; }
.ra-row-main { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.ra-row-title { display: flex; min-width: 0; align-items: center; gap: 8px; }
.ra-row-title b { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ra-row-title small { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; }
.ra-tag { flex: none; padding: 0 6px; border-radius: 8px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 16px; }
.ra-row-how { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ra-row-prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ra-row-off { margin-top: 6px; color: var(--muted); font-size: 12px; }
.ra-bar { display: block; flex: 1; max-width: 240px; height: 4px; overflow: hidden; border-radius: 2px; background: var(--fill); }
.ra-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--primary-bg); }
.ra-row-rep { display: flex; flex: none; flex-direction: column; align-items: flex-end; }
.ra-row-rep b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ra-row-rep small { color: var(--muted); font-size: 11px; }
.ra-none { padding: 40px 16px; text-align: center; }

/* ----- 右栏的卡片 ----- */
.ra-card-box { padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.ra-card-box h2 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.ra-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.ra-muted { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.ra-tip { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.ra-shown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ra-shown[hidden] { display: none; }
.ra-shown-item { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.ra-shown-item .ra-medal-s { width: 52px; height: 52px; }
.ra-shown-item .ra-medal-s .i { width: 24px; height: 24px; }
.ra-shown-item > span:last-child { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ra-recent { padding-bottom: 8px; }
.ra-recent .ra-empty { margin-bottom: 8px; }
.ra-ledger { margin-top: 4px; }
.ra-lrow { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--fill); }
.ra-lrow:last-child { border-bottom: 0; }
.ra-ldot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.ra-lmain { flex: 1; min-width: 0; }
.ra-ltext { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ra-ltext a { color: inherit; }
.ra-ltext a:hover { color: var(--primary); }
.ra-lmeta { color: var(--muted); font-size: 12px; }
.ra-lval { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ra-lval.up { color: var(--primary); font-weight: 700; }
.ra-lval.down { color: var(--danger); font-weight: 700; }
/* 待结算的赞：标灰，不计入声望。 */
.ra-lrow.pending .ra-ltext, .ra-lrow.pending .ra-lval { color: var(--muted); }
.ra-lrow.pending .ra-lval { font-weight: 500; }
.ra-lrow.pending .ra-ldot { opacity: .45; }
.ra-more { display: flex; width: 100%; height: 44px; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ra-more .i { width: 14px; height: 14px; }
.ra-src-bar { display: flex; gap: 2px; height: 10px; margin-top: 12px; overflow: hidden; border-radius: 5px; }
.ra-src-bar > span { min-width: 4px; }
.ra-src { margin-top: 10px; }
.ra-src-row { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; }
.ra-src-chip { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.ra-src-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ra-src-row small { width: 34px; color: var(--muted); font-size: 12px; text-align: right; }
.ra-rules-toggle { display: flex; width: 100%; height: 40px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0; border: 0; border-top: 1px solid var(--fill); background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ra-rules-toggle:active { scale: 1; }
.ra-rules-toggle .i { width: 16px; height: 16px; transition: rotate .2s ease; }
.ra-rules-toggle[aria-expanded="true"] .i { rotate: 180deg; }
/* 声望来源卡最底下的「各段位能做什么」，去用户组与权限页。 */
.ra-perm-link { display: flex; height: 40px; align-items: center; justify-content: space-between; border-top: 1px solid var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.ra-perm-link .i { width: 14px; height: 14px; stroke-width: 2.4; }
.ra-perm-link:hover { color: var(--primary); }
.ra-rules { color: var(--muted); font-size: 12px; line-height: 1.6; }
.ra-rules p { margin: 0 0 4px; }
.ra-rules b, .ra-rules-sub { color: var(--ink); font-weight: 700; }
.ra-rules .ra-rules-sub { margin: 8px 0 4px; }
.ra-rules ul { margin: 0; padding-left: 16px; }
.ra-onboarding { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.ra-onboarding .i { width: 16px; height: 16px; }
.ra-onboarding:hover { color: var(--primary); }

/* ----- 两个弹窗 ----- */
dialog.modal.ra-dlg { width: min(420px, calc(100vw - 32px)); margin-top: 14vh; padding: 28px 24px 24px; border-radius: 20px; text-align: center; }
dialog.modal.ra-dlg[open] { animation: raPopIn .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes raPopIn { from { opacity: 0; scale: .96; translate: 0 10px; } }
.ra-medal-l { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(145deg, var(--ra-g1) 0%, var(--ra-g2) 100%); color: var(--ra-gfg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 1px var(--ra-g2); }
.ra-medal-l.locked { background: var(--fill); color: var(--outline-text); box-shadow: 0 0 0 1px var(--line); }
.ra-medal-l .i { width: 44px; height: 44px; stroke-width: 1.7; }
.ra-dlg h2 { margin: 14px 0 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.ra-dlg-meta { color: var(--muted); font-size: 13px; }
.ra-dlg-how { margin: 12px 0 0; color: var(--soft); }
.ra-dlg-box { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface); text-align: left; }
.ra-dlg-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.ra-dlg-row b { font-weight: 700; }
.ra-dlg-row span { color: var(--muted); font-variant-numeric: tabular-nums; }
.ra-dlg-box .ra-bar { max-width: none; margin-top: 8px; }
.ra-dlg-rep { margin-top: 8px; color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.ra-dlg-actions { display: flex; gap: 8px; margin-top: 20px; }
.ra-dlg-actions .btn { flex: 1; height: 44px; border-radius: 22px; font-weight: 700; }
.ra-dlg-actions .btn[hidden] { display: none; }
.ra-dlg-actions .btn.outline { border-color: var(--ink); }
dialog.modal.ra-log { width: min(520px, calc(100vw - 32px)); max-height: min(640px, 80vh); margin-top: 10vh; padding: 24px; text-align: left; }
.ra-log-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ra-log-head h2 { margin: 0; font-size: 18px; }
.ra-log-close { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.ra-log-close:hover { background: var(--hover); }
.ra-log .ra-muted { margin: 4px 0 8px; }
.ra-log-more { width: 100%; margin-top: 8px; }
.ra-log-more[hidden] { display: none; }

@media (max-width: 860px) {
  .ra-page .main { gap: 24px; padding: 12px 16px 24px; }
  .ra-aside { padding: 0 16px 32px; }
  .ra-hero { padding: 20px 16px 16px; }
  .ra-vignette { background: linear-gradient(90deg, rgba(6, 8, 14, .62) 0%, rgba(6, 8, 14, .12) 70%, rgba(6, 8, 14, .5) 100%), linear-gradient(0deg, rgba(6, 8, 14, .7) 0%, rgba(6, 8, 14, 0) 42%); }
  .ra-art { top: 4px; right: 2px; left: auto; width: 132px; height: 122px; margin-left: 0; }
  .ra-hero-top { gap: 16px 14px; }
  .ra-hero-text { max-width: none; padding-right: 112px; }
  .ra-tier-name { font-size: 30px; }
  .ra-rep { flex-basis: 100%; margin-left: 0; text-align: left; }
  .ra-rep-num { font-size: 36px; }
  .ra-pills { justify-content: flex-start; }
  .ra-track { margin-top: 20px; }
  .ra-node-name { font-size: 11px; }
  .ra-tasks { display: flex; gap: 12px; margin: 0 -16px; padding: 2px 16px 4px; overflow-x: auto; }
  .ra-task { flex: none; width: 232px; }
  .ra-cats { margin: 10px -16px 0; padding: 0 16px; }
  .ra-got { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ra-card { padding: 14px 6px 12px; }
  .ra-card:hover { translate: none; box-shadow: none; border-color: var(--line); }
  .ra-card .ra-medal-s { width: 52px; height: 52px; }
  .ra-card .ra-medal-s .i { width: 23px; height: 23px; }
  .ra-row { padding: 12px; }
  dialog.modal.ra-dlg { width: 100%; max-width: none; margin: auto 0 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  dialog.modal.ra-dlg[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.modal.ra-log { max-height: 86vh; padding: 20px 16px 16px; }
}

/* ===== 下拉选择 =====
   所有 <select> 都由 app.js 换成这个样子（设计稿「组件 · 下拉选择」）：.sel 包着按钮和看不见的原生 <select>，
   选项列表 .sel-list 挂在 body（或者弹窗）上。 */
.sel { position: relative; display: block; min-width: 0; }
.sel > select { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.sel-button { display: flex; width: 100%; height: 44px; align-items: center; gap: 8px; padding: 0 12px 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; font-weight: 400; text-align: left; cursor: pointer; }
.sel-button[aria-expanded="true"], .sel-button:focus-visible, .sel:focus-within > .sel-button { border-color: var(--primary); }
.sel-button:disabled { border-color: var(--line); background: var(--surface); color: var(--muted); cursor: default; }
.sel-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel[data-unset] .sel-value { color: var(--muted); }
.sel-arrow { flex: none; width: 16px; height: 16px; transition: rotate .18s ease; }
.sel-button[aria-expanded="true"] .sel-arrow { rotate: 180deg; }
/* 不带边框的那一种（设计稿的 ghost）：夹在一行字中间用，比如回复的排序。 */
/* outline：胶囊形、宽度随内容的下拉（个人主页列表的排序）。 */
.sel:has(> select.outline) { display: inline-block; flex: none; width: auto; max-width: 100%; vertical-align: middle; }
.sel:has(> select.outline) > .sel-button { padding: 0 10px 0 16px; border-radius: 22px; font-weight: 700; }
.sel:has(> select.ghost) { display: inline-block; flex: none; width: auto; max-width: 100%; vertical-align: middle; }
.sel:has(> select.ghost) > .sel-button { padding: 0 8px 0 12px; border-color: transparent; border-radius: 22px; background: transparent; font-size: 13px; font-weight: 700; }
.sel:has(> select.ghost) > .sel-button:hover, .sel:has(> select.ghost) > .sel-button[aria-expanded="true"] { background: var(--fill); }
.sel:has(> select.ghost) > .sel-button:focus-visible { border-color: var(--primary); }
.sel:has(> select.ghost):focus-within > .sel-button:not(:focus-visible) { border-color: transparent; }
.comments-count { align-items: center; gap: 4px 8px; }
.comments-count .sort-label { margin-left: 8px; }
/* 表单里的下拉铺满一行；设置页的行、筛选栏、帖子里的应用，按内容定宽。 */
.sel:has(> .set-select), .sel:has(> .ab-input), .filters .sel { display: inline-block; flex: none; width: auto; min-width: 150px; max-width: 100%; vertical-align: middle; }
.sel-list { position: fixed; z-index: 90; max-height: 320px; padding: 6px; overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.55; text-align: left; animation: pop .16s ease-out; }
.sel-option { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-weight: 400; text-align: left; white-space: nowrap; cursor: pointer; }
.sel-option > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 带图标的选项（data-icon）：名字前面一个线条图标，按钮上同样。 */
.sel-icon { flex: none; width: 18px; height: 18px; color: var(--soft); }
.sel-option:hover, .sel-option:focus-visible { outline: none; background: var(--fill); }
.sel-option[aria-selected="true"] { background: var(--surface); font-weight: 700; }
.sel-option[aria-selected="true"]:hover, .sel-option[aria-selected="true"]:focus-visible { background: var(--fill); }
/* 填用户名的框弹出的匹配用户（app.js enhanceUserPick）：焦点留在输入框里，用 .active 标出 ↑ ↓ 挑中的那一行。 */
.sel-list.user-pick .sel-option { gap: 10px; font-weight: 400; }
.sel-list.user-pick .sel-option.active, .sel-list.user-pick .sel-option.active:hover { background: var(--fill); }
.sel-list.user-pick .sel-option[aria-selected="true"] { font-weight: 400; }
.sel-list.user-pick .sel-option small { font-size: 12px; }
/* 头像是 span 时别被 .sel-option > span 的 flex: 1 拉宽。每行：头像、u/用户名，下面一行昵称。 */
.sel-list.user-pick .sel-option { min-height: 52px; }
.sel-list.user-pick .sel-option > .avatar { flex: none; width: 32px; height: 32px; }
.user-pick-text { display: flex; flex-direction: column; line-height: 1.3; }
.user-pick-text b { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.user-pick-text small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
/* 填用户名的框都套成能量转赠那样的「u/ + 输入框」：外框是 .prefixed，里面的输入框去掉自己的边框（弹窗里的输入框本来有一圈）。 */
.prefixed.user-prefixed { box-sizing: border-box; width: 100%; background: var(--bg); color: var(--ink); }
.prefixed.user-prefixed > .user-prefix { flex: none; color: var(--muted); font-weight: 700; }
.prefixed.user-prefixed > input { width: auto; height: 100%; margin: 0; padding: 0 4px; border: 0 !important; border-radius: 0; background: transparent; box-shadow: none !important; color: inherit; font: inherit; font-size: 15px; }
.prefixed.user-prefixed:has(> input[aria-invalid="true"]) { padding: 0 13px; border: 2px solid var(--danger); }
.sel-option:disabled { color: var(--muted); cursor: default; }
.sel-option:disabled:hover { background: transparent; }
.sel-check { display: none; flex: none; width: 18px; height: 18px; color: var(--primary); }
.sel-option[aria-selected="true"] .sel-check { display: block; }
/* 窄屏：选项从底部升起，后面有遮罩。 */
.sel-list.sheet { right: 0; bottom: 0; left: 0; max-height: 70%; padding: 0 8px 16px; border-radius: 20px 20px 0 0; box-shadow: none; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
.sel-list.sheet .sel-option { min-height: 52px; white-space: normal; }
.sel-handle { width: 40px; height: 4px; margin: 8px auto 4px; border-radius: 2px; background: var(--thread); }
.sel-title { padding: 4px 12px 8px; color: var(--muted); font-size: 12px; }
/* 文件选择框：不用浏览器自带的按钮。没选时是虚线框，选了之后是缩略图、文件名、大小和移除。 */
.filepick, .filedrop { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.filepick-box { position: relative; display: flex; height: 44px; align-items: center; gap: 10px; padding: 0 6px; overflow: hidden; border: 1px dashed var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 400; cursor: pointer; }
.filepick-box > input, .filedrop-zone > input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.filepick-choose { display: flex; flex: none; height: 32px; align-items: center; gap: 6px; padding: 0 12px; border-radius: 16px; background: var(--fill); font-size: 13px; font-weight: 700; }
.filepick-choose .i, .filepick-remove .i { width: 16px; height: 16px; }
.filepick-hint { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.filepick-thumb { display: none; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; background: var(--fill) center / cover no-repeat; color: var(--soft); }
.filepick-thumb .i { width: 18px; height: 18px; }
.filepick-name { display: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filepick-size { display: none; flex: none; color: var(--muted); font-size: 12px; }
.filepick-remove { display: none; flex: none; width: 32px; height: 32px; min-height: 0; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.filepick-remove:hover { background: var(--fill); color: var(--ink); }
.filepick-box:hover, .filepick[data-drag] .filepick-box { border-color: var(--primary); background: var(--unread); }
.filepick-box:hover .filepick-choose, .filepick[data-drag] .filepick-choose { background: var(--bg); }
.filepick[data-drag] .filepick-hint { color: var(--primary-hover); }
.filepick:focus-within .filepick-box { border-color: var(--primary); }
.filepick[data-picked] .filepick-box { border-style: solid; background: var(--bg); }
.filepick[data-picked] .filepick-box:hover { border-color: var(--outline); }
.filepick[data-picked] .filepick-choose, .filepick[data-picked] .filepick-hint { display: none; }
.filepick[data-picked] .filepick-thumb, .filepick[data-picked] .filepick-remove { display: flex; }
.filepick[data-picked] .filepick-name, .filepick[data-picked] .filepick-size { display: block; }
.filepick[data-error] .filepick-box { padding: 0 5px; border: 2px solid var(--danger); }
.filepick[data-disabled] .filepick-box { opacity: .45; cursor: default; pointer-events: none; }
.filepick-error { display: none; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 400; }
/* 出错说明前面一个 16px 的圆圈感叹号。 */
.filepick-error::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-error] > .filepick-error { display: flex; }
/* 上传的时候贴着底边的一条进度：不知道传到哪了，就来回走。 */
.filepick-bar { position: absolute; bottom: 0; left: 0; display: none; width: 40%; height: 3px; background: var(--primary); }
.filepick-box:has(> input[data-busy]) .filepick-bar { display: block; animation: filebusy 1.1s ease-in-out infinite alternate; }
/* 知道传了多少的时候：细条的长短就是进度，右边写着百分比。 */
.file-pct { display: none; flex: none; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.filepick[data-progress] .filepick-box:has(> input[data-busy]) .filepick-bar { width: var(--progress); animation: none; transition: width .18s ease; }
.filepick[data-progress] .filepick-box:has(> input[data-busy]) .file-pct { display: block; }
@keyframes filebusy { from { translate: 0 0; } to { translate: 150% 0; } }
/* 拖拽区：一次传几张图。选了之后是一格格缩略图，末尾留一个虚线的加号接着加。 */
.filedrop-zone { position: relative; display: flex; min-height: 148px; flex-direction: column; align-items: center; justify-content: center; padding: 16px; border: 1px dashed var(--outline); border-radius: 16px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; text-align: center; cursor: pointer; }
.filedrop-zone:hover, .filedrop[data-drag] .filedrop-zone, .filedrop-zone:focus-visible { border-color: var(--primary); background: var(--unread); outline: none; }
.filedrop-prompt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.filedrop-prompt > .i { width: 28px; height: 28px; color: var(--muted); }
.filedrop-prompt em { color: var(--primary); font-style: normal; }
.filedrop-prompt small { color: var(--muted); font-size: 12px; font-weight: 400; }
.filedrop-grid { display: none; flex-wrap: wrap; gap: 8px; }
.filedrop[data-picked] .filedrop-zone { align-items: flex-start; justify-content: flex-start; padding: 12px; border: 1px solid var(--line); background: var(--bg); cursor: default; }
.filedrop[data-picked] .filedrop-prompt { display: none; }
.filedrop[data-picked] .filedrop-grid { display: flex; }
.filedrop-tile, .filedrop-more { position: relative; display: flex; width: 88px; height: 88px; align-items: center; justify-content: center; border-radius: 12px; }
.filedrop-tile { background: var(--fill) center / cover no-repeat; color: var(--soft); cursor: grab; }
.filedrop-more { border: 1px dashed var(--outline); color: var(--muted); cursor: pointer; }
.filedrop-more:hover { border-color: var(--primary); color: var(--primary); }
.filedrop-remove { position: absolute; top: 4px; right: 4px; display: flex; width: 24px; height: 24px; min-height: 0; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(11, 31, 24, .8); color: #FFFFFF; }
.filedrop-remove .i { width: 14px; height: 14px; }
.filedrop-cover { position: absolute; bottom: 4px; left: 4px; padding: 0 6px; border-radius: 8px; background: rgba(11, 31, 24, .8); color: #FFFFFF; font-size: 11px; font-weight: 700; }
.filedrop-zone:has(> input[data-busy]) .filedrop-tile::after { position: absolute; inset: 0; border-radius: 12px; background: rgba(11, 31, 24, .55); content: ""; }
/* 拖拽区上传中：格子上一层遮罩，正中写着百分比，底下一条 4px 的进度条。 */
.filedrop-zone { overflow: hidden; }
.filedrop-busy { display: none; }
.filedrop[data-progress] .filedrop-zone:has(> input[data-busy]) .filedrop-busy { position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 31, 24, .35); }
.filedrop-busy .file-pct { display: block; padding: 2px 10px; border-radius: 12px; background: rgba(11, 31, 24, .8); color: #FFFFFF; font-size: 13px; }
.filedrop-bar { position: absolute; bottom: 0; left: 0; width: var(--progress, 0); height: 4px; background: #5CC79A; transition: width .18s ease; }
/* 带搜索的下拉：顶上固定一个搜索框，下面是可以滚的选项；每项是头像、名字、一行说明。 */
.sel-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; color: #FFFFFF; font-weight: 700; line-height: 1; }
.sel-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sel-option > .sel-avatar, .sel-button > .sel-avatar { flex: none; }
.sel[data-picked] > .sel-button { padding-left: 10px; font-weight: 500; }
.sel-list.search { display: flex; max-height: 380px; flex-direction: column; padding: 0; overflow: hidden; border-radius: 16px; }
.sel-search { position: relative; flex: none; padding: 8px 8px 0; }
.sel-search > .i { position: absolute; top: 21px; left: 22px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
/* 全站的搜索框是胶囊形的；这里的是面板里的一格，照设计稿是 12 的圆角、Surface 底。 */
.sel-search input[type="search"] { display: block; width: 100%; height: 44px; min-height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.sel-search input[type="search"]:focus { border-color: var(--primary); background: var(--surface); outline: none; }
.sel-meta { display: flex; flex: none; justify-content: space-between; gap: 12px; padding: 8px 20px 4px; color: var(--muted); font-size: 12px; }
.sel-options { flex: 1; min-height: 0; padding: 0 8px 8px; overflow-y: auto; overscroll-behavior: contain; }
.sel-list.search .sel-option { border-radius: 10px; }
.sel-list.search .sel-option:hover, .sel-list.search .sel-option[aria-selected="true"], .sel-list.search .sel-option[aria-selected="true"]:hover { background: transparent; }
.sel-list.search .sel-option.active, .sel-list.search .sel-option.active:hover { background: var(--unread); }
.sel-option.rich { min-height: 56px; gap: 12px; padding: 6px 12px; white-space: normal; }
.sel-option > .sel-text { display: block; flex: 1; min-width: 0; }
.sel-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-option.rich .sel-name { font-size: 15px; font-weight: 700; line-height: 1.35; }
.sel-name mark { border-radius: 2px; background: var(--mark); color: inherit; }
.sel-sub { display: block; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.sel-empty { display: flex; flex-direction: column; gap: 2px; padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.sel-empty strong { color: var(--ink); font-size: 14px; }
.sel-list.search.sheet { max-height: 76%; border-radius: 20px 20px 0 0; }
.sel-list.search.sheet .sel-options { padding-bottom: 16px; }
.sel-scrim { position: fixed; z-index: 89; inset: 0; width: 100%; height: 100%; border: 0; background: var(--scrim); cursor: default; animation: fade .2s ease-out; }

/* ===== 页面顶上的进度条 =====
   换页的时候在最上面走：很快到一小半，越走越慢；新页面出来了走完、淡出。 */
.load-bar { position: fixed; z-index: 200; top: 0; left: 0; width: 0; height: 3px; border-radius: 0 2px 2px 0; background: var(--primary-bg); box-shadow: 0 0 8px color-mix(in srgb, var(--primary-bg) 60%, transparent); opacity: 0; pointer-events: none; }
.load-bar.shown { opacity: 1; }
.load-bar.running { opacity: 1; transition: width 10s cubic-bezier(.08, .9, .2, 1); }
.load-bar.finishing { opacity: 0; transition: width .2s ease-out, opacity .2s ease-out .2s; }
@media (prefers-reduced-motion: reduce) { .load-bar.running { transition: none; } }

/* ===== 用户组 ===== */
/* 组的颜色：一个小圆点。没设颜色的是灰的。 */
.group-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--group, var(--muted)); }
.group-name { display: inline-flex; align-items: center; gap: 8px; }
a.group-name { text-decoration: none; }
[data-view-title] .group-dot { width: 14px; height: 14px; margin: 0 8px 0 2px; }
.group-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.group-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.group-about { max-width: 720px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.group-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; }
.group-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-tools input[type="search"] { flex: 1 1 220px; max-width: 320px; }
.member-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.member-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.member-cell .avatar { width: 28px; height: 28px; background: var(--primary-bg); font-size: 12px; }
.member-cell:hover b { color: var(--primary); text-decoration: underline; }
/* 设置里「我的用户组」的一行。 */
.my-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my-group > .group-name { flex: 1 1 200px; min-width: 0; color: var(--ink); font-weight: 700; }
.my-group small { color: var(--muted); font-weight: 400; }

/* ===== 节点的访问名单 ===== */
.access-list { display: flex; flex-direction: column; gap: 8px; }
.access-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.access-row > .sel, .access-row > select { flex: 1 1 200px; min-width: 0; }

/* ===== 全站外壳和通用部件（设计稿「控件标准」「顶栏」「手机顶栏」「发帖」「分享」「名片」，以及各组画板共用的布局和颜色） ===== */
/* 新的颜色：提示条（警告）、错误汇总、深色主卡片上的次要字、标签的橙色、「仅管理员可用」这类小块、置顶的绿字、侧栏「有新内容」的点。 */
:root, :root:not([data-theme="dark"]) :is(.nlook-light, .nlook-pin-light .npin), :root[data-theme="dark"] :is(.nlook-dk-light, .nlook-pin-dk-light .npin) {
  --warn-bg: #FFF6EC; --warn-line: #F7D3A8; --warn-ink: #8A4B00;
  --error-bg: #FBE9E2; --error-line: #F2C9B8;
  --on-night-soft: #C9D6D0; --on-night-accent: #5CC79A; --night-tint: rgba(255, 255, 255, .06); --night-tint-strong: rgba(255, 255, 255, .12);
  --tag-orange: #E07B1F; --tag-orange-strong: #C2410C; --note-bg: #FFF1E0; --note-fg: #8A4B00; --pin-ink: #1F6B2A;
  --new-dot: #2BB673;
}
:root[data-theme="dark"], :root:not([data-theme="dark"]) :is(.nlook-dark, .nlook-pin-dark .npin), :root[data-theme="dark"] :is(.nlook-dk-dark, .nlook-pin-dk-dark .npin) {
  --warn-bg: #2E2312; --warn-line: #5C4220; --warn-ink: #FFCF94;
  --error-bg: #3A2015; --error-line: #6B3A22;
  --on-night-soft: #A9BDB4; --on-night-accent: #5CC79A;
  --tag-orange: #F0A05A; --tag-orange-strong: #FF8A4C; --note-bg: #3A2A12; --note-fg: #FFCF94; --pin-ink: #8BDDB9;
  --new-dot: #3FD08A;
}
.side-dot { background: var(--new-dot); }
/* 一句提示（警告）、错误汇总：12 的圆角、1px 的边、13px 的字，前面可以放一个图标。 */
.notebox { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-bg); color: var(--ink); font-size: 13px; line-height: 1.6; }
.notebox > .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--warn-ink); }
.notebox.error { border-color: var(--error-line); background: var(--error-bg); color: var(--danger); }
.notebox.error > .i { color: var(--danger); }
.notebox.ok { border-color: transparent; background: var(--unread); color: var(--primary-hover); }
/* 深色主卡片：Night 底、白字，次要字浅绿灰，强调绿，里面的小块是半透明白。 */
.night-card { padding: 20px; border-radius: 16px; background: var(--night); color: var(--on-night); }
.night-card small, .night-card .quiet { color: var(--on-night-soft); }
.night-card .accent { color: var(--on-night-accent); }
.night-card .tint { border-radius: 12px; background: var(--night-tint); }
.night-card .tint.strong { background: var(--night-tint-strong); }

/* 主栏 + 右栏：主栏能伸多宽伸多宽，右栏 300 左右；窗口不到 1000 时右栏换到下面（各组的说明页、能量、邀请都用）。吸顶见下面「右侧栏吸顶」。 */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.split > .split-main { flex: 999 1 480px; min-width: 0; }
.split > .split-aside { display: flex; flex: 1 1 260px; max-width: 340px; flex-direction: column; gap: 16px; }
/* 窄了侧栏独占一行：min-width 归零，里面不换行的长文字（推荐节点的简介）只省略，不把侧栏和页面撑宽。 */
@media (max-width: 999px) { .split > .split-aside { flex-basis: 100%; max-width: none; min-width: 0; } }

/* 右侧栏吸顶（画布第 246 版，2026-11-24）：所有带右栏的桌面页面共用这一条——.cols 的 .aside（首页、帖子页、节点、游戏、财富榜、
   用户主页、标签、成就、自定义信息流）、.split 的 .split-aside（我的节点、收藏、能量明细、邀请、关于、常见问题、条款）、新人指引的 .ob-aside。
   - 往下滚时停在顶栏（57 高、一直粘在顶上）下面 16；滚到底跟着正文一起收尾，这是 sticky 本来的样子。
   - 比屏幕高的最多占满一屏（上下各留 16），多出来的在栏里单独滚；滚到头不带着整页滚。
   - 滚动条平时看不见，鼠标移到右栏上才出来一条 4 宽的浅灰滑条（颜色和左侧导航的滑条一样，深色下跟着 --thread 变）；
     Firefox 没有 ::-webkit-scrollbar，用 thin 加 scrollbar-color。Chrome 设了 scrollbar-width / scrollbar-color 就不认
     ::-webkit-scrollbar，所以这两条只给不认它的浏览器。
   - 1000 以上右栏一定在右边（.split、新人指引不再自己换行）；不到 1000 排到正文下面，不吸顶（上面各自的 999 断点）。
   广告位的展示统计、轮播「不在屏幕上不换」都用 IntersectionObserver，它会按右栏的滚动区域裁剪，栏里滚出去的照样算不可见。 */
:root { --aside-top: calc(57px + 16px); }
@media (min-width: 1000px) {
  .split, .ob-page { flex-wrap: nowrap; }
  .split > .split-aside, .ob-page > .ob-aside { flex-shrink: 0; }
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside) {
    position: sticky; top: var(--aside-top); align-self: start;
    max-height: calc(100vh - var(--aside-top) - 16px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  }
  /* 滑条的颜色放在自定义属性里、悬停时改它：Chrome 只改 :hover::-webkit-scrollbar-thumb 不会重画滚动条，元素自己的样式变了才重画。 */
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside) { --aside-thumb: transparent; }
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside):is(:hover, :has(:focus-visible)) { --aside-thumb: var(--thread); }
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside)::-webkit-scrollbar { width: 4px; height: 4px; }
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside)::-webkit-scrollbar-track { background: transparent; }
  :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside)::-webkit-scrollbar-thumb { border-radius: 2px; background: var(--aside-thumb); }
  @supports not selector(::-webkit-scrollbar) {
    :is(.cols > .aside, .split > .split-aside, .ob-page > .ob-aside) { scrollbar-width: thin; scrollbar-color: var(--aside-thumb) transparent; }
  }
}
/* 右栏里的卡片：Surface 底、16 的圆角；小标题 12/700；条目 36 高。 */
.side-card { padding: 16px; border-radius: 16px; background: var(--surface); }
.side-card-label { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.side-card-item { display: flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 8px; border-radius: 8px; color: var(--ink); font-size: 14px; }
a.side-card-item:hover { background: var(--fill); color: var(--ink); }
.side-card-item[aria-current] { background: var(--fill); font-weight: 700; }

/* 带文字的分段切换（「嵌套 / 平铺」这类）：按钮的形式。照控件标准是 44 高；.compact 是说明页、能量页画板上那种 40 高、选中带阴影的。 */
.segmented.compact { display: inline-flex; }
@media (max-width: 860px) { .segmented.compact { display: inline-flex; } }

/* 不带左侧导航的外壳（落地页用）：页面的数据里 Bare 为真。 */
.shell.bare { grid-template-columns: minmax(0, 1fr); }

/* 危险的描边按钮（「存进草稿箱吗？」里的「丢弃」）。 */
.btn.danger.outline { border-color: var(--danger); background: var(--bg); color: var(--danger); }

/* 账号菜单的项左右是 8（设计稿「顶栏」）。 */
.menu.account .menu-item { padding: 0 8px; }

/* 下拉的胶囊变体（设计稿 variant=pill）：Fill 底、没有描边、13/700；选中的带头像时左边收一点。 */
.sel:has(> select.pill) { display: inline-block; flex: none; width: auto; max-width: 100%; vertical-align: middle; }
.sel:has(> select.pill) > .sel-button { padding: 0 12px 0 16px; border-color: transparent; border-radius: 22px; background: var(--fill); font-size: 13px; font-weight: 700; }
.sel:has(> select.pill) > .sel-button:hover { filter: brightness(.95); }
.sel:has(> select.pill) > .sel-button:is([aria-expanded="true"], :focus-visible) { border-color: var(--primary); }
.sel:has(> select.pill)[data-picked] > .sel-button { padding-left: 10px; font-weight: 700; }
.sel-button[aria-invalid="true"] { border: 2px solid var(--danger); padding-left: 13px; }

/* 底部面板末尾的「取消」：手机上才有。 */
.sheet-cancel { display: none; }
@media (max-width: 860px) {
  :is(.menu-panel, .sel-list.sheet, .pop-menu.sheet) > .sheet-cancel { display: flex; flex: none; width: 100%; height: 48px; align-items: center; justify-content: center; margin-top: 8px; padding: 0; border: 0; border-radius: 24px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 700; }
  .sel-list.search.sheet > .sheet-cancel { width: calc(100% - 16px); margin: 0 8px 16px; }
  .sel-list.search.sheet .sel-options { padding-bottom: 0; }
}

/* 弹出菜单（分享）：宽屏贴着按钮，窄屏从底部升起。 */
.pop-away { position: fixed; z-index: 89; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: default; }
.pop-menu { position: fixed; z-index: 90; width: 220px; padding: 6px; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
/* 从悬停卡片（z-index 95）里打开的菜单盖在卡片上面。 */
.pop-menu.over-hc { z-index: 97; }
:is(.pop-away, .sel-scrim).over-hc { z-index: 96; }
.pop-menu.sheet { right: 0; bottom: 0; left: 0; width: auto; padding: 0 8px calc(12px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: none; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
.pop-menu.sheet .menu-item { height: 52px; gap: 14px; font-size: 15px; }
.pop-menu.sheet .menu-item .i { width: 22px; height: 22px; }

/* 手机上的弹窗：铺满屏幕的（表单）顶栏是「左边关闭 / 标题 / 右边确定」，底下那排按钮不要；只有一两句话的确认框是居中的小卡片。 */
.modal-head-confirm { display: none; }
dialog.modal.ask > .modal-head > .iconbtn { order: 3; }
@media (max-width: 860px) {
  dialog.modal.ask:not(.confirm):not(.compose-modal) { padding: 0 16px 24px; }
  dialog.modal.ask:not(.confirm):not(.compose-modal) > .modal-head { height: 56px; margin: 0 -16px 8px; padding: 0 8px; gap: 4px; border-bottom: 1px solid var(--line); }
  dialog.modal.ask:not(.confirm):not(.compose-modal) > .modal-head > .iconbtn { order: 0; margin: 0; }
  dialog.modal.ask:not(.confirm):not(.compose-modal) > .modal-head h2 { flex: 1; min-width: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  dialog.modal.ask:not(.confirm):not(.compose-modal) .modal-head-confirm { display: inline-flex; height: 44px; padding: 0 18px; }
  dialog.modal.ask:not(.confirm):not(.compose-modal) > .modal-actions { display: none; }
  dialog.modal.form { width: 100vw; }
  dialog.modal.ask.confirm { width: calc(100vw - 32px); height: fit-content; max-height: 84dvh; margin: auto; padding: 20px; border-radius: 16px; }
  dialog.modal.ask.confirm .modal-actions .btn { flex: 1; }
}

/* ===== 发帖弹窗（桌面贴着底边的大面板，能收成底部一条；手机上是全屏的发帖页） ===== */
@media (min-width: 861px) {
  /* --compose-x / --compose-w 由 compose.js 按主内容区算出来；没有主内容区的页面在窗口里居中。 */
  /* --compose-h 是拖顶边把手拖出来的高度；没拖过时上面留出一截页面。 */
  dialog.modal.large.compose-modal[open] { width: var(--compose-w, min(1120px, calc(100vw - 48px))); height: var(--compose-h, max(320px, min(720px, calc(100dvh - 240px)))); min-height: min(320px, calc(100dvh - 57px)); max-height: calc(100dvh - 57px); margin: auto auto 0 var(--compose-x, auto); padding-bottom: 20px; border-radius: 16px 16px 0 0; animation: sheet .24s cubic-bezier(.2, .8, .2, 1); }
  dialog.modal.large.compose-modal[open]:not(:modal) { inset: auto 0 0; box-shadow: var(--shadow-pop); }
  dialog.compose-modal > .compose-grip { position: absolute; z-index: 2; top: 0; right: 0; left: 0; display: flex; justify-content: center; height: 16px; cursor: ns-resize; touch-action: none; }
  dialog.compose-modal > .compose-grip::before { content: ""; width: 40px; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); transition: background .15s; }
  dialog.compose-modal > .compose-grip:hover::before, dialog.compose-modal.resizing > .compose-grip::before { background: var(--muted); }
  dialog.compose-modal > .compose-grip:focus-visible { outline: none; }
  dialog.compose-modal > .compose-grip:focus-visible::before { width: 56px; background: var(--primary); box-shadow: var(--focus-ring); }
  dialog.compose-modal.resizing { user-select: none; }
  dialog.compose-modal.minimized > .compose-grip { display: none; }
  body.compose-docked { padding-bottom: var(--compose-space, 60px); }
  body.compose-docked .toast { bottom: min(calc(var(--compose-space, 60px) + 16px), calc(100dvh - 120px)); }
  dialog.compose-modal .compose { min-height: 100%; margin-top: 0; }
  /* 正文撑满剩下的高度；发帖框拖矮了就在框里滚。 */
  dialog.compose-modal .compose > [data-compose-pane~="text"]:not([hidden]) { display: flex; flex: 1 0 auto; flex-direction: column; }
  dialog.compose-modal [data-compose-pane~="text"] > .ed { flex: 1 0 auto; }
  dialog.compose-modal [data-compose-pane~="text"] > .ed > .ed-body { display: flex; flex: 1; flex-direction: column; }
  dialog.compose-modal [data-compose-pane~="text"] .ed-rich { flex: 1; min-height: 160px; max-height: none; }
  /* Markdown 输入框贴满正文区，不用 rows 撑高（Chrome 的 contain: size 管不住 textarea）：
     发帖框默认高度下正文正好填满，底边和右下角的把手不会被挤到下面的按钮后面。 */
  dialog.compose-modal [data-compose-pane~="text"] > .ed[data-mode="markdown"]:not(.ed-maxed) > .ed-body { min-height: 160px; }
  dialog.compose-modal [data-compose-pane~="text"] .ed[data-mode="markdown"]:not(.ed-maxed) .ed-source { position: absolute; inset: 0; width: auto; height: auto; min-height: 0; max-height: none; resize: none; }
  /* 预览：左边写、右边看，两栏一样高、占满正文剩下的高度，各自滚动（预览的内容不把框撑高）。 */
  dialog.compose-modal [data-compose-pane~="text"] > .ed.ed-split > .ed-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  dialog.compose-modal [data-compose-pane~="text"] .ed.ed-split:not(.ed-maxed) .ed-source { right: 50%; }
  dialog.compose-modal [data-compose-pane~="text"] .ed.ed-split .ed-preview { grid-column: 2; min-height: 0; max-height: none; contain: size; }
  /* 左边右下角的把手：和拖顶边一样改发帖框的高度，往下拖变高（compose.js）。 */
  dialog.compose-modal [data-compose-pane~="text"] .ed[data-mode="markdown"]:not(.ed-maxed) .ed-corner { position: absolute; z-index: 2; right: 0; bottom: 0; display: block; width: 16px; height: 16px; color: var(--outline-text); background: linear-gradient(135deg, transparent 0 48%, currentColor 48% 54%, transparent 54% 68%, currentColor 68% 74%, transparent 74%); cursor: ns-resize; touch-action: none; }
  dialog.compose-modal [data-compose-pane~="text"] .ed.ed-split[data-mode="markdown"]:not(.ed-maxed) .ed-corner { right: calc(50% + 1px); }
  dialog.compose-modal [data-compose-pane~="text"] .ed .ed-corner:hover, dialog.compose-modal.resizing .ed-corner { color: var(--muted); }
}
.compose-min { display: none; }
.compose-grip { display: none; }
/* 宽屏上发帖框不是模态的（没有遮罩，不进顶层）：自己固定在底边，盖在页面上面。窄屏上也照这样铺满，以防打开后窗口变窄。 */
dialog.compose-modal[open]:not(:modal) { position: fixed; z-index: 70; inset: 0; }
.compose-mini-title, .compose-restore { display: none; }
@media (min-width: 861px) {
  .compose-min { display: inline-flex; }
  dialog.modal.ask > .modal-head > .compose-min { margin-right: -6px; }
  /* 收起来：底部一条，只留标题栏。 */
  dialog.modal.large.compose-modal.minimized[open] { position: fixed; z-index: 70; inset: auto 0 0; display: block; width: var(--compose-w, min(1120px, calc(100vw - 48px))); height: auto; min-height: 0; margin: 0 auto 0 var(--compose-x, auto); padding: 0 16px 0 24px; overflow: hidden; border-radius: 12px 12px 0 0; box-shadow: var(--shadow-pop); cursor: pointer; animation: sheet .2s ease-out; }
  dialog.compose-modal.minimized > :not(.compose-head) { display: none; }
  dialog.compose-modal.minimized > .compose-head { height: 52px; margin: 0; }
  /* 收起后：整条左边是「发布新帖 + 标题」的展开按钮，右边是展开、关闭。 */
  dialog.compose-modal.minimized .compose-heading, dialog.compose-modal.minimized .compose-drafts { display: none; }
  dialog.compose-modal.minimized .compose-restore { display: flex; flex: 1; min-width: 0; height: 40px; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  dialog.compose-modal.minimized .compose-restore-label { flex: none; font-size: 15px; font-weight: 700; }
  dialog.compose-modal.minimized .compose-mini-title { display: block; flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
}
.compose-head { gap: 12px; }
.compose-heading { display: flex; flex: 1; min-width: 0; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.compose-status { color: var(--muted); font-size: 12px; }
.compose-status.saved { color: var(--primary-hover); }
.compose-drafts { flex: none; font-size: 13px; font-weight: 700; }
.compose-drafts-narrow { display: none; }
dialog.modal.ask > .modal-head > .compose-x { order: 9; margin-right: -10px; }
.compose-save-top, .compose-publish-top { display: none !important; }
dialog.compose-modal .modal-actions .btn { padding: 0 22px; }
dialog.compose-modal .compose-actions { padding: 0; }
dialog.compose-modal [data-compose-close] { display: none; }
.compose .compose-node .sel { max-width: 320px; }
/* 节点和标签一行：各占一半（节点输入框多宽，下拉就多宽），窄屏上下排。/new 页的表单是网格，这一行要占满整行。 */
.compose-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: row dense; gap: 14px 16px; align-items: start; }
/* 节点选择框后面 app.js 加的「正在加载规则」和发帖要求（至少几个标签、只能用哪些标签）占满一行，放在两个框下面；
   规则本身在框里的「规则 N」，那一块只剩规则时不占地方。 */
.compose-meta > :not(.compose-node):not(.tag-field) { grid-column: 1 / -1; }
.compose-meta > div:not(.tag-field):not(:has(> :not(.nl-rules))) { display: none; }
.compose-meta .compose-node .sel { max-width: none; }
/* 推广节点启用时发帖页的一句提醒：浅色小字，不占眼 */
.cpm-promo, .mc-promo { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cpm-promo .i, .mc-promo .i { flex: none; width: 14px; height: 14px; }
.cpm-promo[hidden] { display: none; }
.mc-promo { display: none; }
.form-page form.form > .compose-meta { grid-column: 1 / -1; }
@media (max-width: 860px) { .compose-meta { grid-template-columns: minmax(0, 1fr); } }
/* 标题框右边是阅读门槛的胶囊按钮，点开是「谁能看到正文」的小菜单。 */
.compose-title { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.form-page form.form > :is(.compose-title, .compose-kinds) { grid-column: 1 / -1; }
.compose-title-box { position: relative; }
.compose-title-box input[name="title"] { width: 100%; padding-right: var(--compose-tail, 14px); font-size: 16px; font-weight: 700; }
/* 框里右边的一截：字数、阅读门槛。它多宽，标题的右内边距就留多宽（compose.js 量）。 */
.compose-title-tail { position: absolute; top: 0; right: 7px; bottom: 0; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.compose-title-tail > * { pointer-events: auto; }
.compose-title-tail .compose-count[hidden] { display: none; }
.compose-count.over { color: var(--danger); }
.compose-read { display: inline-flex; max-width: 124px; height: 30px; align-items: center; gap: 4px; padding: 0 8px 0 10px; border: 0; border-radius: 15px; background: var(--fill); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.compose-read[hidden] { display: none; }
.compose-read:hover, .compose-read[aria-expanded="true"] { color: var(--ink); }
.compose-read:not([data-level="0"]) { color: var(--primary); }
.compose-read .i { flex: none; width: 14px; height: 14px; }
.compose-read [data-compose-read-label] { overflow: hidden; text-overflow: ellipsis; }
.compose-read-public, .compose-read-locked { display: inline-flex; }
.compose-read[data-level="0"] .compose-read-locked, .compose-read:not([data-level="0"]) .compose-read-public { display: none; }
.compose-read-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 260px; padding: 6px; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-weight: 400; animation: pop .16s ease-out; }
.compose-read-menu[hidden] { display: none; }
.compose-read-head { margin: 0; padding: 6px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.compose-read-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.compose-read-item:hover, .compose-read-item:focus-visible { outline: none; background: var(--fill); }
.compose-read-item > span { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 1px; }
.compose-read-item strong { font-size: 14px; font-weight: 600; }
.compose-read-item small { color: var(--muted); font-size: 12px; }
.compose-read-item .i { flex: none; width: 18px; height: 18px; color: var(--primary); visibility: hidden; }
.compose-read-item[aria-checked="true"] .i { visibility: visible; }
.compose-read-foot { margin: 4px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
/* 编辑主题时节点下面说一句能不能换节点（手机上节点那一项的字号是 0）。 */
.compose-node-hint { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.compose-kinds { margin: 0; }
/* 写法有六种：标签不折行，放不下时横着滑。 */
.compose-kinds { overflow-x: auto; scrollbar-width: none; }
.compose-kinds .tab { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap; }
.compose-kinds .tab .i { flex: none; width: 16px; height: 16px; }
.compose-title .label-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.compose-count { color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.compose-poll { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.compose-poll legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 700; }
.compose-add { align-self: flex-start; font-size: 13px; }
/* 红包、抽奖写法的设置：正文下面一块。 */
.compose-game { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.compose-game legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 700; }
.compose-game .prize-rows { margin: 0; }
/* 投票、红包、抽奖、交易的设置卡片：浅底、细边框、14 圆角；标题 15/700，左边一个白底小图标（各用各的颜色）。
   标题是 <legend>：浮动的 legend 不再压在边框上，和别的项一样排在卡片里面。 */
/* 写成 fieldset.compose-card：弹窗里的 .modal fieldset 会把 fieldset 的内边距和边框清零。 */
fieldset.compose-card { gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
fieldset.compose-poll.compose-card { gap: 10px; }
.compose-card > legend.compose-card-head { float: left; display: flex; width: 100%; align-items: center; gap: 8px; margin: 0; padding: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.compose-card-icon { display: inline-flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg); color: var(--kind-color, var(--primary)); }
.compose-card-icon .i { width: 16px; height: 16px; }
[data-compose-pane="envelope"] { --kind-color: #C2410C; }
[data-compose-pane="lottery"] { --kind-color: #6D28D9; }
[data-compose-pane="trade"] { --kind-color: #0E7490; }
:root[data-theme="dark"] [data-compose-pane="envelope"] { --kind-color: #FB923C; }
:root[data-theme="dark"] [data-compose-pane="lottery"] { --kind-color: #A78BFA; }
:root[data-theme="dark"] [data-compose-pane="trade"] { --kind-color: #5EC4D6; }
.compose-card-count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.compose-card > p.quiet { margin: 0; font-size: 12px; line-height: 1.6; }
.compose-card .form-pair { gap: 12px 16px; }
.compose-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* 投票选项一行一个，右边一个圆的删除按钮；只剩两个时删不了。 */
.compose-poll-rows { display: flex; flex-direction: column; gap: 10px; }
.compose-poll-row { display: flex; align-items: center; gap: 8px; }
.compose-poll-row > input { flex: 1; min-width: 0; }
.compose-poll-remove { flex: none; width: 40px; height: 40px; color: var(--muted); }
.compose-poll-remove:disabled { opacity: .35; background: transparent; cursor: default; }
.compose-card .compose-add { height: 40px; padding: 0 16px; border-radius: 20px; }
.compose-poll .compose-add { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.form-page form.form > [data-compose-pane="poll"] { grid-column: 1 / -1; }
.compose-card .prize-row input[name="prize_name"] { font-weight: 700; }
.compose-card .prize-row input[name="prize_quantity"] { padding: 0 10px; text-align: center; font-weight: 700; }
/* 编辑主题时：写法定下来之前（或者首帖上已有抽奖、交易、红包时）不能换写法。 */
.compose-kinds-off .compose-kinds { display: none !important; }
.compose-edit-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--fill); color: var(--muted); font-size: 12px; line-height: 1.5; }
/* 手机发帖页（设计稿 MobileCompose，compose.js 的 mobileCompose 画的那些）：宽屏上都藏着。 */
.mc-chips, .mc-rules, .mc-imgs, .mc-att, .mc-filler, .mc-foot, .mc-sheet, .mc-sheet-back, .mc-title-hint, .compose-pub-split { display: none; }
@media (max-width: 860px) {
  dialog.modal.large.compose-modal { padding: 0; }
  dialog.compose-modal > .compose-head { position: relative; height: 56px; flex: none; gap: 4px; margin: 0; padding: 0 12px 0 4px; border-bottom: 0; }
  dialog.modal.ask > .modal-head > .compose-x { order: 0; width: 48px; height: 48px; margin: 0; }
  dialog.compose-modal .compose-heading { display: flex; flex: 1; min-width: 0; }
  dialog.compose-modal .compose-heading h2 { display: none; }
  dialog.compose-modal .compose-status { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  dialog.compose-modal .compose-drafts { display: inline-flex; height: 44px; flex: none; align-items: center; padding: 0 10px; color: var(--ink); font-size: 14px; font-weight: 500; }
  dialog.compose-modal .compose-pub-split { display: flex; flex: none; height: 40px; align-items: stretch; overflow: hidden; border-radius: 20px; background: var(--primary-bg); color: var(--on-primary); }
  dialog.compose-modal .compose-pub-split:is(.mc-off, :has(.compose-publish-top[data-blocked])) { background: var(--fill); color: var(--muted); }
  /* 发帖页从底下升上来（设计稿 0.28s）。 */
  dialog.modal.large.compose-modal[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.compose-modal .compose-drafts-wide { display: none; }
  dialog.compose-modal .compose-drafts-narrow { display: inline; }
  dialog.compose-modal .compose-pub-split[hidden], dialog.compose-modal .compose-pubtime[hidden] { display: none; }
  dialog.compose-modal .compose-pub-split:has(.compose-pubtime[hidden]) .compose-pub-sep { display: none; }
  dialog.compose-modal .compose-pub-split .compose-publish-top { display: inline-flex !important; height: 40px; min-height: 0; padding: 0 10px 0 18px; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; }
  dialog.compose-modal .compose-pub-split:has(.compose-pubtime[hidden]) .compose-publish-top { padding-right: 18px; }
  .compose-pub-sep { width: 1px; margin: 10px 0; background: currentColor; opacity: .35; }
  .compose-pubtime { display: flex; width: 38px; height: 40px; align-items: center; justify-content: center; padding: 0 6px 0 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
  .compose-pubtime .i { width: 18px; height: 18px; }
  dialog.modal.ask.compose-modal > .modal-scroll { margin-inline: 0; padding: 0; }
  dialog.compose-modal > .modal-actions { display: none; }
  dialog.compose-modal form.compose.mc-form { display: flex; min-height: 100%; flex-direction: column; gap: 0; margin: 0; }
  dialog.compose-modal .mc-form > :is(.compose-meta, .compose-kinds, .compose-tools, .compose-actions) { display: none; }
  dialog.compose-modal .mc-form > [data-compose-pane]:not([data-compose-pane~="text"]) { display: none; }
  dialog.compose-modal .mc-form > .draft-conflict { margin: 0 16px 8px; }
  .mc-x { overflow-x: auto; scrollbar-width: none; }
  .mc-x::-webkit-scrollbar { display: none; }
  /* 节点、标签那一排胶囊。 */
  dialog.compose-modal .mc-chips { display: flex; flex: none; align-items: center; gap: 8px; padding: 4px 16px 8px; }
  .mc-node, .mc-tag, .mc-tag-add { display: inline-flex; height: 40px; flex: none; box-sizing: border-box; align-items: center; gap: 8px; border-radius: 20px; font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
  .mc-node { padding: 0 12px 0 14px; border: 1px solid var(--primary); background: var(--unread); color: var(--primary-hover); font-weight: 700; }
  .mc-node.picked { padding-left: 5px; border-color: var(--line); background: var(--bg); color: var(--ink); }
  .mc-node.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--bg)); color: var(--danger); }
  .mc-node .i, .mc-tag-add .i { width: 16px; height: 16px; }
  .mc-node-dot { display: inline-flex; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--muted); color: #FDFDFD; font-size: 12px; }
  .mc-node-dot img { width: 100%; height: 100%; object-fit: cover; }
  .mc-tag { gap: 4px; padding: 0 8px 0 12px; border: 0; background: var(--fill); color: var(--ink); }
  .mc-tag-x { display: flex; color: var(--muted); }
  .mc-tag-add { gap: 4px; padding: 0 14px 0 10px; border: 1px dashed var(--outline); background: transparent; color: var(--muted); }
  .mc-tag-add:not(:has(+ *)):has(.i:only-child) { padding: 0 10px; }
  dialog.compose-modal .mc-promo:not([hidden]) { display: flex; flex: none; padding: 0 16px 8px; }
  dialog.compose-modal .mc-rules:not([hidden]) { display: flex; flex: none; align-items: center; gap: 4px; margin: 0 16px 8px; padding: 0 4px 0 12px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; }
  .mc-rules-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-rules-go { height: 40px; flex: none; padding: 0 8px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .mc-rules-x { display: flex; width: 36px; height: 40px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
  /* 标题：没有框，22/700，写不下往下长；下面一条细线把正文隔开。 */
  dialog.compose-modal .mc-form > .compose-title { flex: none; gap: 2px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line); }
  dialog.compose-modal .compose-title-box { position: static; }
  dialog.compose-modal .compose-title-tail { display: none; }
  dialog.compose-modal .compose-title :is(textarea, input)[name="title"] { display: block; width: 100%; height: 30px; min-height: 0; box-sizing: border-box; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 22px !important; font-weight: 700; line-height: 30px; resize: none; }
  dialog.compose-modal .compose-title :is(textarea, input)[name="title"]:focus-visible { box-shadow: none; outline: none; }
  dialog.compose-modal .mc-title-hint:not([hidden]) { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
  /* 正文：没有框，17 号字；编辑器自己的工具栏收起来，用底下那几排。 */
  dialog.compose-modal .mc-form > [data-compose-pane~="text"] { flex: none; padding: 12px 16px 8px; }
  dialog.compose-modal [data-compose-pane="text"] > .label-line { display: none; }
  dialog.compose-modal .ed { border: 0; box-shadow: none; }
  dialog.compose-modal .ed-bar { display: none; }
  dialog.compose-modal .ed-source, dialog.compose-modal .ed-rich { min-height: 160px; padding: 0; border: 0; background: transparent; font-size: 17px; line-height: 1.7; }
  dialog.compose-modal .mc-form:has(.mc-att:not([hidden]), .mc-imgs:not([hidden])) :is(.ed-source, .ed-rich) { min-height: 64px; }
  dialog.compose-modal .ed-source:focus-visible { box-shadow: none; }
  dialog.compose-modal .mc-imgs:not([hidden]) { display: flex; flex: none; gap: 8px; padding: 4px 16px 12px; }
  .mc-img { position: relative; width: 96px; height: 96px; flex: none; overflow: hidden; border-radius: 12px; background: var(--fill); }
  .mc-img img { width: 100%; height: 100%; object-fit: cover; }
  .mc-img-x { position: absolute; top: 4px; right: 4px; display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(17, 21, 23, .6); color: #FDFDFD; cursor: pointer; }
  .mc-img-add { display: flex; width: 96px; height: 96px; flex: none; box-sizing: border-box; align-items: center; justify-content: center; border: 1px dashed var(--outline); border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
  /* 附件卡片：图标、摘要、「修改」，右边是移除。 */
  dialog.compose-modal .mc-att:not([hidden]) { display: flex; flex: none; align-items: stretch; margin: 4px 16px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .mc-att-edit { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; padding: 12px 0 12px 12px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .mc-att-icon { display: flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border-radius: 12px; background: var(--mc-kind); color: #FDFDFD; }
  .mc-att-text { flex: 1; min-width: 0; }
  .mc-att-text strong, .mc-att-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-att-text strong { font-size: 15px; }
  .mc-att-text span { color: var(--muted); font-size: 13px; }
  .mc-att-go { flex: none; padding: 0 4px; color: var(--primary); font-size: 13px; font-weight: 700; }
  .mc-att-x { display: flex; width: 48px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
  dialog.compose-modal .mc-filler { display: block; flex: 1 0 24px; }
  /* 底部几排：还差什么、定时、添加到帖子（或格式）、Aa @ # $ 表情 字数 谁能看到。 */
  dialog.compose-modal .mc-foot { position: sticky; z-index: 2; bottom: 0; display: flex; flex: none; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); background: var(--bg); }
  .mc-err:not([hidden]) { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 6px 16px; border: 0; background: color-mix(in srgb, var(--danger) 9%, var(--bg)); color: var(--danger); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
  .mc-err[hidden], .mc-sched[hidden], .mc-attach[hidden], .mc-format[hidden] { display: none; }
  .mc-sched { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 16px; background: var(--unread); color: var(--primary-hover); font-size: 13px; }
  .mc-sched span { flex: 1; min-width: 0; }
  .mc-sched-x { height: 40px; flex: none; padding: 0 12px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .mc-attach { display: flex; align-items: center; gap: 8px; padding: 8px 16px 4px; border-top: 1px solid var(--line); }
  .mc-attach-b { display: inline-flex; height: 40px; flex: none; box-sizing: border-box; align-items: center; gap: 6px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
  .mc-attach-b[hidden] { display: none; }
  .mc-attach-b[aria-pressed="true"] { border-color: var(--primary); background: var(--unread); font-weight: 700; }
  .mc-attach-b.blocked { opacity: .4; }
  .mc-attach-i { display: flex; color: var(--mc-kind); }
  .mc-format { display: flex; align-items: center; gap: 2px; padding: 6px 8px 2px; border-top: 1px solid var(--line); }
  .mc-fmt-b { display: flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
  .mc-bar { display: flex; height: 52px; align-items: center; gap: 2px; padding: 0 12px 0 8px; }
  .mc-bar-b { display: flex; width: 40px; height: 44px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 19px; font-weight: 500; cursor: pointer; }
  .mc-bar-b.mc-aa { font-size: 17px; font-weight: 700; }
  .mc-bar-b[aria-pressed="true"] { background: var(--fill); }
  .mc-count { flex: 1; min-width: 8px; padding-right: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
  .mc-vis { display: inline-flex; height: 36px; flex: none; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 18px; background: var(--fill); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
  .mc-vis[hidden] { display: none; }
  .mc-vis.on { background: var(--unread); color: var(--primary-hover); }
  .mc-vis .i { width: 16px; height: 16px; }
  .mc-vis-c { display: flex; }
  .mc-vis-c .i { width: 14px; height: 14px; }
  /* 底部面板。 */
  dialog.compose-modal .mc-sheet-back:not([hidden]) { position: fixed; z-index: 73; inset: 0; display: block; background: rgba(11, 31, 24, .45); animation: fade .2s ease; }
  dialog.compose-modal .mc-sheet:not([hidden]) { position: fixed; z-index: 74; right: 0; bottom: 0; left: 0; display: flex; max-height: 88%; box-sizing: border-box; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 -8px 28px rgba(15, 26, 28, .18); animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .mc-sheet-grip { width: 40px; height: 4px; flex: none; margin: 8px auto 0; border-radius: 2px; background: var(--line); }
  .mc-sheet-head { display: flex; min-height: 52px; flex: none; align-items: center; gap: 8px; padding: 0 6px 0 16px; }
  .mc-sheet-head h3 { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .mc-sheet-head small { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 400; }
  .mc-sheet-x { width: 44px; height: 44px; }
  .mc-sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }
  .mc-sheet-foot:not([hidden]) { display: flex; flex: none; flex-direction: column; gap: 8px; padding: 10px 16px 20px; border-top: 1px solid var(--line); }
  .mc-sheet-foot[hidden], .mc-sheet-err[hidden], .mc-sheet-remove[hidden] { display: none; }
  .mc-sheet-err { margin: 0; color: var(--danger); font-size: 13px; }
  .mc-sheet-btns { display: flex; gap: 8px; }
  .mc-sheet-btns .btn { height: 52px; flex: 1; border: 0; border-radius: 26px; font-size: 16px; font-weight: 700; }
  .mc-sheet-btns .btn.mc-sheet-remove { background: var(--fill); color: var(--ink); font-size: 15px; }
  /* 面板里还有没填好的：按钮变灰，点了说差什么。 */
  .mc-sheet-btns .btn.primary.off { background: var(--fill); color: var(--muted); }
  .mc-sheet-remove { flex: none !important; padding: 0 20px; }
  .mc-sheet label.mc-search, .mc-sheet label.ptf-field { flex-direction: row; font-size: 14px; font-weight: 400; }
  .mc-search { display: flex; height: 44px; align-items: center; gap: 8px; padding: 0 14px; border-radius: 22px; background: var(--fill); color: var(--muted); }
  .mc-search span { display: flex; }
  .mc-sheet input.mc-plain { flex: 1; min-width: 0; height: 40px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
  .mc-node-list { display: flex; flex-direction: column; margin: 12px -8px 0; }
  .mc-node-row { display: flex; width: 100%; min-height: 60px; box-sizing: border-box; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .mc-node-row.on { background: var(--unread); }
  .mc-node-av { display: flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--muted); color: #FDFDFD; font-size: 16px; font-weight: 700; object-fit: cover; }
  .mc-node-text { flex: 1; min-width: 0; }
  .mc-node-text strong, .mc-node-text > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-node-text strong { font-size: 15px; }
  .mc-node-text small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
  .mc-node-text > span { color: var(--muted); font-size: 13px; }
  .mc-node-check { display: flex; flex: none; color: var(--primary); }
  .mc-empty { margin: 0; padding: 28px 8px; color: var(--muted); text-align: center; }
  .mc-empty.small { padding: 0; font-size: 13px; text-align: left; }
  .ptf-field { display: flex; height: 48px; box-sizing: border-box; align-items: center; gap: 8px; padding: 0 6px 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
  .ptf-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
  .mc-hash { flex: none; color: var(--muted); font-weight: 700; }
  .mc-tag-create { height: 36px; flex: none; padding: 0 14px; border: 0; border-radius: 18px; background: var(--primary-bg); color: var(--on-primary); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
  .mc-tag-create[hidden] { display: none; }
  .mc-sheet[data-sheet="tags"] .mc-sheet-body { display: flex; flex-direction: column; gap: 16px; }
  .mc-tag-chosen, .mc-tag-block { display: flex; flex-direction: column; gap: 8px; }
  .mc-tag-chosen[hidden], .mc-warn[hidden], .mc-empty[hidden] { display: none; }
  .mc-label { color: var(--muted); font-size: 13px; font-weight: 700; }
  .mc-wrap, .mc-tag-sug { display: flex; flex-wrap: wrap; gap: 8px; }
  .mc-chip { display: inline-flex; height: 40px; box-sizing: border-box; align-items: baseline; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; line-height: 38px; white-space: nowrap; cursor: pointer; }
  .mc-chip small { color: var(--muted); font-size: 12px; }
  .mc-chip:disabled { opacity: .45; cursor: not-allowed; }
  .mc-chip.on { align-items: center; padding: 0 10px 0 14px; border: 0; background: var(--primary-bg); color: var(--on-primary); font-weight: 700; }
  .mc-chip.on span { display: flex; }
  .mc-warn { margin: 0; color: var(--danger); font-size: 13px; }
  .mc-rule-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: rule; }
  .mc-rule-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; counter-increment: rule; }
  .mc-rule-list li::before { display: flex; width: 26px; height: 26px; grid-row: span 2; align-items: center; justify-content: center; border-radius: 50%; background: var(--fill); font-size: 13px; font-weight: 700; content: counter(rule); }
  .mc-rule-list strong { font-size: 15px; }
  .mc-rule-list span { color: var(--muted); font-size: 13px; }
  /* 附件面板（链接、投票、红包、抽奖、交易）：控件改的是表单里藏着的那几项。 */
  .mc-sheet[data-sheet] [hidden] { display: none !important; }
  .mc-sheet:is([data-sheet="link"], [data-sheet="poll"], [data-sheet="envelope"], [data-sheet="lottery"], [data-sheet="trade"]) .mc-sheet-body { display: flex; flex-direction: column; gap: 16px; }
  .mc-sheet .mc-note { margin: 0; }
  .mc-lock { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--fill); color: var(--muted); font-size: 13px; line-height: 1.5; }
  .mc-blk { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
  .mc-blk:has(> .ptf-opt) { gap: 8px; }
  .mc-sheet input.mc-in { width: 100%; min-width: 0; height: 48px; min-height: 0; box-sizing: border-box; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); box-shadow: none; color: var(--ink); font: inherit; font-size: 16px; }
  .mc-sheet input.mc-in:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
  .mc-sheet :is(input.mc-in, .mc-rp-total).bad, .ptf-field.bad { border-color: var(--danger); }
  .mc-sheet input:disabled, .mc-sheet button:disabled { cursor: not-allowed; }
  .mc-sheet input.mc-in:disabled { background: var(--surface); color: var(--muted); }
  .mc-hint { color: var(--muted); font-size: 13px; }
  .mc-hint.bad, .mc-rp-note.bad { color: var(--danger); }
  .mc-seg { display: flex; gap: 2px; padding: 3px; border-radius: 24px; background: var(--fill); }
  .mc-seg-b { height: 40px; flex: 1; min-width: 0; padding: 0 4px; border: 0; border-radius: 20px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
  .mc-seg-b[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
  .mc-seg-b:disabled { opacity: .5; }
  .mc-chip.mc-pick { align-items: center; padding: 0 16px; line-height: normal; }
  .mc-chip.mc-pick[aria-pressed="true"] { border-color: var(--primary); background: var(--unread); color: var(--primary-hover); font-weight: 700; }
  .mc-step { display: flex; height: 48px; box-sizing: border-box; align-items: center; overflow: hidden; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
  .mc-step-b { display: flex; width: 48px; height: 48px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
  .mc-step-b:disabled { opacity: .4; }
  .mc-sheet .mc-step input.mc-plain { height: 46px; text-align: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .mc-switch { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
  .mc-switch-text { flex: 1; min-width: 0; }
  .mc-switch-text small { display: block; color: var(--muted); font-size: 13px; }
  .mc-switch-track { display: block; width: 52px; height: 32px; flex: none; border-radius: 16px; background: var(--outline); transition: background-color .2s ease; }
  .mc-switch-track > span { display: block; width: 24px; height: 24px; margin: 4px; border-radius: 50%; background: #FDFDFD; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); transition: translate .2s cubic-bezier(.2, .8, .2, 1); }
  .mc-switch[aria-checked="true"] .mc-switch-track { background: var(--primary); }
  .mc-switch[aria-checked="true"] .mc-switch-track > span { translate: 20px 0; }
  .mc-mini { height: 36px; flex: none; padding: 0 14px; border: 0; border-radius: 18px; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .mc-sheet .ptf-field.mc-url { height: 52px; }
  .mc-url-i { display: flex; flex: none; color: var(--muted); }
  .mc-link-card { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .mc-link-thumb { display: flex; width: 56px; height: 56px; flex: none; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; background: var(--unread); color: var(--primary-hover); }
  .mc-link-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .mc-link-text { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; }
  .mc-link-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-link-text > span { color: var(--muted); font-size: 13px; }
  .mc-opts { display: flex; flex-direction: column; gap: 8px; }
  .ptf-opt { display: flex; align-items: center; gap: 4px; }
  .mc-blk > .ptf-opt { gap: 6px; }
  .ptf-opt input.mc-in { flex: 1; }
  .ptf-opt input.mc-in.mc-prize-n { width: 56px; flex: none; padding: 0 4px; font-weight: 700; text-align: center; }
  .mc-times { flex: none; color: var(--muted); }
  .mc-del { display: flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
  .mc-blk .mc-del { width: 40px; }
  .mc-del:disabled { opacity: .3; }
  .mc-add { display: inline-flex; height: 40px; align-self: flex-start; align-items: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
  .mc-add:disabled { opacity: .4; }
  .mc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mc-sheet input.mc-in.mc-price { font-size: 17px; font-weight: 700; }
  .mc-rp-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--danger) 8%, var(--bg)); }
  .mc-rp-label { color: color-mix(in srgb, var(--danger) 85%, var(--ink)); font-size: 13px; font-weight: 700; }
  .mc-rp-bal { min-height: 20px; color: color-mix(in srgb, var(--danger) 85%, var(--ink)); font-size: 13px; }
  .mc-sheet input.mc-plain.mc-rp-total { width: 100%; height: 56px; flex: none; color: color-mix(in srgb, var(--danger) 55%, var(--ink)); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
  .mc-sheet input.mc-plain.mc-rp-total.bad { color: var(--danger); }
  .mc-rp-note { color: var(--muted); font-size: 14px; }
  .mc-more { display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
  .mc-more > span:first-child { flex: 1; min-width: 0; }
  .mc-more small { margin-left: 8px; color: var(--muted); font-size: 13px; }
  .mc-more-c { display: flex; flex: none; transition: rotate .2s ease; }
  .mc-more[aria-expanded="true"] .mc-more-c { rotate: 180deg; }
  .mc-more-body { display: flex; flex-direction: column; gap: 14px; }
  .mc-sum { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 14px; }
  .mc-sum-label { flex: 1; color: var(--muted); }
  .mc-sum strong { font-size: 18px; font-variant-numeric: tabular-nums; }
  .mc-radios { display: flex; flex-direction: column; margin: 0 -8px; }
  .mc-radio { display: flex; width: 100%; min-height: 56px; box-sizing: border-box; align-items: center; gap: 12px; padding: 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
  .mc-radio.on { background: var(--unread); }
  .mc-radio > span:first-child { flex: 1; min-width: 0; }
  .mc-radio strong, .mc-radio small { display: block; }
  .mc-radio strong { font-weight: 500; }
  .mc-radio.on strong { font-weight: 700; }
  .mc-radio small { color: var(--muted); font-size: 13px; }
  .mc-radio-check { display: flex; flex: none; color: var(--primary); }
  .mc-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .mc-custom { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .mc-custom label { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
  .mc-custom-ok { height: 48px; flex: none; padding: 0 18px; border: 0; border-radius: 24px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; }
  .mc-custom-ok:disabled { opacity: .4; }
  .mc-exit-note { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
  .mc-exit { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
  .mc-exit .btn { width: 100%; height: 52px; border: 0; border-radius: 26px; background: var(--fill); color: var(--ink); font-size: 16px; font-weight: 700; }
  .mc-exit .btn.primary { background: var(--primary-bg); color: var(--on-primary); }
  .mc-exit .btn.mc-exit-drop { background: var(--danger-bg); color: var(--danger); }
}
/* 附件的颜色：链接青、投票紫、红包红、抽奖琥珀、交易蓝，图片是主色。 */
[data-kind-color="image"] { --mc-kind: var(--primary); }
[data-kind-color="link"], .mc-att[data-kind="link"] { --mc-kind: #0E7490; }
[data-kind-color="poll"], .mc-att[data-kind="poll"] { --mc-kind: #6D28D9; }
[data-kind-color="envelope"], .mc-att[data-kind="envelope"] { --mc-kind: #D93A1E; }
[data-kind-color="lottery"], .mc-att[data-kind="lottery"] { --mc-kind: #B45309; }
[data-kind-color="trade"], .mc-att[data-kind="trade"] { --mc-kind: #1D4ED8; }
:root[data-theme="dark"] :is([data-kind-color="link"]) { --mc-kind: #5EC4D6; }
:root[data-theme="dark"] :is([data-kind-color="poll"]) { --mc-kind: #A78BFA; }
:root[data-theme="dark"] :is([data-kind-color="envelope"]) { --mc-kind: #FB8A6E; }
:root[data-theme="dark"] :is([data-kind-color="lottery"]) { --mc-kind: #F5B455; }
:root[data-theme="dark"] :is([data-kind-color="trade"]) { --mc-kind: #8DB3FF; }
/* 「存进草稿箱吗？」：比别的弹窗窄一点，盖在发帖弹窗上面。 */
dialog.modal.compose-leave { width: min(400px, calc(100vw - 32px)); padding: 22px 24px; }
dialog.modal.compose-leave h2 { font-size: 18px; }
dialog.modal.compose-leave .modal-actions { align-items: center; }
@media (max-width: 860px) {
  dialog.modal.compose-leave { width: calc(100vw - 32px); height: fit-content; margin: auto; border-radius: 16px; }
  dialog.modal.compose-leave .modal-actions { flex-wrap: wrap; }
}

/* ===== 登录、注册（设计稿 Login / Register / AuthModal 和手机版，模板 auth.html） =====
   单独的页面：宽屏左边深绿一栏、右边 560 宽的表单；手机上只有表单，顶上一条关闭和 logo。
   弹窗：桌面 440 宽居中；手机上从底部升起（顶上一条小横杠，右上角关闭）。 */
.auth-logo { display: none; }
body:has(.au-page) header.top { display: none; }
body:has(.au-page) :is(.shell, .page) { padding: 0; }
.page > .au-page { display: flex; max-width: none; min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--bg); }
.au-aside { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 40px 48px; overflow: hidden; color: #FFFFFF;
  background: radial-gradient(1200px 500px at 0% 0%, #12402F 0%, rgba(18, 64, 47, 0) 60%), radial-gradient(800px 500px at 100% 100%, #1C3A2E 0%, rgba(28, 58, 46, 0) 60%), #0B1F18; }
.au-aside::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(circle at 2px 2px, #8FD3B4 1.3px, transparent 1.6px); background-size: 28px 28px; pointer-events: none; }
.au-aside > * { position: relative; }
.au-aside-logo { align-self: flex-start; display: inline-flex; }
.au-aside-logo img { display: block; width: auto; height: 34px; filter: brightness(0) invert(1); }
.au-aside-body { display: flex; flex-direction: column; gap: 20px; max-width: 460px; margin: auto 0; }
.au-aside-title { margin: 0; font-family: "Bricolage Grotesque", var(--font); font-size: 36px; font-weight: 800; line-height: 1.2; }
.au-aside-label { font-size: 13px; letter-spacing: .06em; color: #8FB5A6; }
.au-hot { display: flex; flex-direction: column; gap: 10px; }
.au-hot a { display: block; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: rgba(255, 255, 255, .06); color: #FFFFFF; }
.au-hot a:hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.au-hot strong { display: block; }
.au-hot small, .au-perks small { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); }
.au-perks { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.au-perks li { display: flex; align-items: flex-start; gap: 14px; }
.au-perks strong { display: block; font-size: 16px; }
.au-perks small { font-size: 13px; color: rgba(255, 255, 255, .65); }
.au-perk-icon { flex: none; display: flex; width: 40px; height: 40px; border-radius: 12px; background: rgba(92, 199, 154, .16); color: #7BE0B4; align-items: center; justify-content: center; }
.au-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; color: #8FB5A6; }
.au-stats b { font-size: 18px; color: #FFFFFF; }
.au-main { flex: 0 0 560px; min-width: 0; display: flex; flex-direction: column; }
.au-bar { display: flex; justify-content: flex-end; padding: 20px 24px 0; }
.au-close, .au-bar-logo, .au-bar-end { display: none; }
.au-skip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 18px; color: var(--muted); font-size: 13px; }
.au-skip:hover { background: var(--hover); color: var(--ink); }
.au-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 56px 64px; }
.au-card { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 400px; }
.au-step { display: flex; flex-direction: column; gap: 22px; }
.au-step[hidden] { display: none; }
.au-title { margin: 0; font-family: "Bricolage Grotesque", var(--font); font-size: 30px; font-weight: 800; line-height: 1.25; outline: none; }
.au-switch { margin: 6px 0 0; color: var(--muted); }
.au-switch a { margin-left: 4px; font-weight: 700; }
.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-alert { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 13px; }
.au-alert[hidden] { display: none; }
.au-alert > .i { flex: none; margin-top: 2px; }
.au-alert > span { flex: 1; min-width: 0; }
.au-alert-act { flex: none; margin-left: 26px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.au-field label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.au-input { display: flex; align-items: center; gap: 10px; height: 46px; box-sizing: border-box; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); }
.au-input:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.au-input:has([aria-invalid="true"]) { border-color: var(--danger); }
.au-input > .i { flex: none; }
.au-input input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
.au-input input:focus-visible { box-shadow: none; }
.au-form :is(input, textarea)::placeholder { color: var(--outline-text); }
.au-eye { flex: none; display: flex; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); align-items: center; justify-content: center; cursor: pointer; }
.au-eye:hover { background: var(--hover); }
.au-eye .au-eye-off, .au-eye[aria-pressed="true"] .au-eye-on { display: none; }
.au-eye[aria-pressed="true"] .au-eye-off { display: block; }
.au-ok { flex: none; display: flex; margin-right: 8px; color: var(--primary); }
.au-ok[hidden] { display: none; }
.au-msg { margin: 5px 0 0; font-size: 12px; }
.au-msg:empty { display: none; }
.au-msg.is-error { color: var(--danger); }
.au-msg.is-ok { color: var(--primary); }
.au-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.au-code-row { display: flex; gap: 8px; }
.au-code-row .au-input { flex: 1; min-width: 0; padding-right: 14px; }
.au-code-row input { letter-spacing: .12em; }
.au-soft { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 112px; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.au-soft:hover { color: var(--ink); filter: brightness(.96); }
.au-soft[aria-disabled="true"] { opacity: .6; cursor: default; }
.au-strength { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.au-strength[hidden] { display: none; }
.au-strength span { flex: 1; height: 4px; border-radius: 2px; background: var(--fill); }
.au-strength b { flex: none; width: 52px; font-size: 12px; text-align: right; }
.au-strength[data-level="1"] { --au-strength: #A33A00; }
.au-strength[data-level="2"] { --au-strength: #B7791F; }
.au-strength[data-level="3"] { --au-strength: #2E9A6E; }
.au-strength[data-level="4"] { --au-strength: #007A52; }
.au-strength b { color: var(--au-strength); }
.au-strength[data-level="1"] span:nth-of-type(-n+1), .au-strength[data-level="2"] span:nth-of-type(-n+2), .au-strength[data-level="3"] span:nth-of-type(-n+3), .au-strength[data-level="4"] span { background: var(--au-strength); }
.au-field textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.au-field textarea[aria-invalid="true"] { border-color: var(--danger); }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.au-check { position: relative; display: inline-flex; align-items: flex-start; gap: 8px; color: var(--soft); font-size: 13px; line-height: 1.5; cursor: pointer; }
.au-check input { position: absolute; top: 1px; left: 0; width: 18px; height: 18px; margin: 0; opacity: 0; cursor: pointer; }
.au-box { flex: none; display: flex; width: 18px; height: 18px; box-sizing: border-box; margin-top: 1px; border: 1.5px solid var(--outline); border-radius: 5px; background: var(--bg); color: #FFFFFF; align-items: center; justify-content: center; }
.au-box .i { width: 12px; height: 12px; opacity: 0; }
.au-check input:checked + .au-box { border-color: var(--primary-bg); background: var(--primary-bg); }
.au-check input:checked + .au-box .i { opacity: 1; }
.au-check input:focus-visible + .au-box { outline: 2px solid var(--primary); outline-offset: 2px; }
.au-check input[aria-invalid="true"] + .au-box { border-color: var(--danger); }
.au-agree { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; color: var(--soft); font-size: 13px; line-height: 1.5; }
.au-agree a { text-decoration: underline; }
.au-agree + .au-msg { margin-top: -8px; }
.au-link { flex: none; padding: 4px 0; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.au-link.muted { padding: 4px 8px; color: var(--muted); font-weight: 400; }
.au-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.au-back.center { align-self: center; padding: 4px 8px; }
.au-submit { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; box-sizing: border-box; padding: 0 20px; border: 0; border-radius: 24px; background: var(--primary-bg); color: var(--on-primary); font: inherit; font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.au-submit:hover { background: #00573B; color: var(--on-primary); }
.au-submit:disabled { opacity: .7; cursor: progress; }
.au-or { display: flex; align-items: center; gap: 12px; color: var(--outline-text); font-size: 12px; }
.au-or[hidden] { display: none; }
.au-or span { flex: 1; height: 1px; background: var(--line); }
.au-oauth { display: flex; flex-wrap: wrap; gap: 8px; }
.au-provider { display: inline-flex; flex: 1 1 0; min-width: 96px; align-items: center; justify-content: center; gap: 6px; height: 44px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.au-provider span { overflow: hidden; text-overflow: ellipsis; }
.au-provider .i { flex: none; width: 17px; height: 17px; }
/* GitHub、Google、Telegram 的官方标志（设计稿原样）。GitHub 的是近黑色，深色下反白（GitHub 自己的规范：深色底上用白色标志）。 */
.au-brand { flex: none; display: block; width: 18px; height: 18px; }
:root[data-theme="dark"] .au-brand[data-brand="github"] { filter: invert(1); }
.au-provider:hover { background: var(--hover); color: var(--ink); }
.au-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 44px; padding: 0 14px; border: 1px dashed var(--thread); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.au-passkey[hidden] { display: none; }
.au-note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--soft); font-size: 13px; }
.au-note-icon, .au-sent-icon { flex: none; display: flex; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, var(--bg)); color: var(--primary); align-items: center; justify-content: center; }
.au-note [hidden] { display: none; }
.au-code { display: block; width: 100%; height: 56px; box-sizing: border-box; padding: 0 0 0 .5em; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 26px; letter-spacing: .5em; text-align: center; }
.au-code.is-backup { padding: 0; font-size: 18px; letter-spacing: .06em; }
.au-code[aria-invalid="true"] { border-color: var(--danger); }
.au-lead { margin: 0; color: var(--muted); }
.au-sent, .au-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.au-sent p, .au-done p { margin: 0; color: var(--soft); }
.au-sent-icon { width: 64px; height: 64px; }
.au-sent-icon .i { width: 24px; height: 24px; }
.au-sent .au-soft { height: 40px; min-width: 0; padding: 0 16px; border-radius: 20px; }
.au-done { padding: 8px 0; }
.au-done p { color: var(--muted); }
.au-done b { color: var(--signal-text); }
.au-initial { display: flex; width: 72px; height: 72px; border-radius: 50%; background: #6D28D9; color: #FFFFFF; font-size: 30px; font-weight: 800; align-items: center; justify-content: center; box-shadow: 0 0 0 6px color-mix(in srgb, #6D28D9 14%, var(--bg)); }
.au-done-name { font-size: 22px; font-weight: 800; }
.au-done .au-submit { margin-top: 4px; }
/* 弹窗 */
dialog.auth-modal { width: min(440px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); box-sizing: border-box; margin: auto; padding: 20px 24px 22px; overflow-x: hidden; overflow-y: auto; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 24px 64px rgba(11, 31, 24, .32); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
/* 换步骤时高度在过渡（static/auth.js 的 resize）：这期间不出滚动条。 */
dialog.auth-modal.is-resizing { overflow-y: hidden; }
dialog.auth-modal::backdrop { background: var(--scrim); animation: fade .16s ease-out; }
.au-card.in-modal { max-width: none; gap: 14px; }
.au-card.in-modal .au-step { gap: 14px; }
.au-card.in-modal .au-title { font-size: 20px; font-family: var(--font); }
.au-card.in-modal:not([data-step="login"]):not([data-step="register"]) :is(.au-tabs, .au-why, .au-legal) { display: none; }
.au-modal-head { display: flex; align-items: center; justify-content: space-between; }
.au-modal-logo { display: block; width: auto; height: 28px; }
.au-grab { display: none; }
.au-x { flex: none; display: flex; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.au-x:hover { background: var(--hover); }
.au-why { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 12%, var(--bg)); color: color-mix(in srgb, var(--primary) 70%, var(--ink)); font-size: 13px; font-weight: 500; }
.au-why .i { flex: none; }
/* 选中的白色滑块是一块（::before），切页签时从一边滑到另一边，文字颜色渐变（设计稿 Mobile-AuthModal）。 */
.au-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--fill); }
.au-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--seg-on); box-shadow: 0 1px 3px rgba(15, 26, 28, .12); transition: transform .32s cubic-bezier(.3, .7, .2, 1); pointer-events: none; }
.au-tabs[data-on="register"]::before { transform: translateX(100%); }
.au-tabs button { position: relative; z-index: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: color .25s; }
.au-tabs [aria-selected="true"] { color: var(--ink); }
.au-legal { margin: 0; color: var(--outline-text); font-size: 12px; text-align: center; }
.au-legal a { color: var(--muted); text-decoration: underline; }
@keyframes au-up { from { translate: 0 100%; } to { translate: 0 0; } }
/* 弹窗里换步骤：登录从左、注册从右淡入（跟页签滑块同方向），别的步骤稍微上浮着淡入。 */
@keyframes au-in-left { from { opacity: 0; translate: -28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes au-in-right { from { opacity: 0; translate: 28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes au-in-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.au-step.au-in-left { animation: au-in-left .32s cubic-bezier(.2, .8, .2, 1) both; }
.au-step.au-in-right { animation: au-in-right .32s cubic-bezier(.2, .8, .2, 1) both; }
.au-step.au-in-up { animation: au-in-up .28s cubic-bezier(.2, .8, .2, 1) both; }
@media (max-width: 860px) {
  .au-aside, .au-skip { display: none; }
  .au-main { flex: 1 1 auto; }
  .au-bar { position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; height: 56px; box-sizing: border-box; padding: 0 8px; border-bottom: 1px solid var(--fill); background: var(--bg); }
  .au-close { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); }
  .au-bar-logo { display: block; width: auto; height: 30px; }
  .au-bar-end { display: block; width: 44px; }
  .au-center { display: block; padding: 24px 20px 96px; }
  .au-card { max-width: none; gap: 18px; }
  .au-step { gap: 18px; }
  .au-title { font-size: 26px; }
  .au-provider { min-width: 0; padding: 0 6px; }
  dialog.auth-modal { width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 8px 18px 28px; border-radius: 20px 20px 0 0; animation: au-up .26s cubic-bezier(.2, .8, .2, 1); }
  /* 头上一条只有小横杠，关闭钉在右上角；这一条留够关闭按钮的高度，下面的页签不会被它压住。 */
  .au-modal-head { position: relative; align-items: flex-start; justify-content: center; height: 30px; }
  .au-modal-logo { display: none; }
  .au-grab { display: block; width: 40px; height: 4px; margin: 2px 0; border-radius: 2px; background: var(--line); }
  .au-x { position: absolute; top: -2px; right: -10px; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  dialog.auth-modal, dialog.auth-modal::backdrop, .au-step { animation: none; }
  .au-tabs::before, .au-tabs button { transition: none; }
}

/* ===== 手机上的全屏搜索层：顶上返回 + 胶囊输入框，下面是搜索、最近搜索和热门节点 ===== */
.search-back, .search-members { display: none; }
@media (max-width: 860px) {
  .top-search { display: none; }
  :root[data-search-full] .top-search { position: fixed; z-index: 80; inset: 0; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
  :root[data-search-full] .search-field { order: -1; display: flex; flex: none; height: 56px; align-items: center; gap: 4px; padding: 0 12px 0 4px; }
  :root[data-search-full] .search-back { display: inline-flex; }
  :root[data-search-full] .search-mark { display: none; }
  :root[data-search-full] .top-search input[type="search"] { flex: 1; height: 44px; padding: 0 16px; border: 0; background: var(--fill); text-align: left; }
  :root[data-search-full] .top-search input[type="search"]:focus { box-shadow: none; }
  :root[data-search-full] .search-box.scoped { flex: 1; min-width: 0; padding-left: 6px; background: var(--fill); box-shadow: none; }
  :root[data-search-full] .search-panel { position: static; flex: 1; min-height: 0; padding: 0; overflow-y: auto; border-radius: 0; box-shadow: none; animation: none; }
  :root[data-search-full] .search-scroll { max-height: none; padding: 0 8px 24px; border-top: 0; }
  :root[data-search-full] .search-row { min-height: 48px; padding: 0 12px; border-radius: 8px; }
  :root[data-search-full] .search-row.go { margin-top: 0; background: var(--surface); }
  :root[data-search-full] .search-label { padding: 16px 12px 4px; }
  :root[data-search-full] .search-suggest { display: none; }
  :root[data-search-full] .search-row.tall .avatar { width: 28px !important; height: 28px !important; font-size: 13px !important; }
  :root[data-search-full] .search-hot { display: none; }
  :root[data-search-full] .search-members { display: block; flex: none; margin-left: auto; color: var(--muted); font-size: 12px; }
  :root[data-search-full] .search-away { display: none; }
  :root[data-search-full] body { overflow: hidden; }
}

/* ===== 链接卡片（设计稿「控件标准 · 链接卡片」） ===== */
.linkcard { display: flex; max-width: 640px; gap: 12px; align-items: flex-start; margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); line-height: 1.5; }
.linkcard:hover { background: var(--hover); color: var(--ink); }
.linkcard-body { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.linkcard-site { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.linkcard-site > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard-icon { display: inline-flex; flex: none; width: 16px; height: 16px; overflow: hidden; border-radius: 4px; background: var(--fill); }
.linkcard-icon img { display: block; width: 16px; height: 16px; object-fit: cover; }
.linkcard-title { display: -webkit-box; overflow: hidden; color: var(--primary); font-size: 15px; font-weight: 700; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.linkcard-desc { display: -webkit-box; overflow: hidden; color: var(--soft); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.linkcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; color: var(--muted); font-size: 12px; }
.linkcard-lang { display: inline-flex; align-items: center; gap: 4px; }
.linkcard-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.linkcard-thumb { flex: none; width: 96px; height: 72px; border-radius: 8px; background: var(--fill); object-fit: cover; }
/* 本站的帖子：浅灰底，标题是正文色；顶上是作者、节点和时间。 */
.linkcard.topic { background: var(--surface); }
.linkcard.topic:hover { background: var(--fill); }
.linkcard.topic .linkcard-title { color: var(--ink); }
.linkcard-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.linkcard-who strong { color: var(--ink); font-weight: 700; }
.linkcard-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .linkcard-thumb { width: 72px; height: 54px; } }

/* 搜索面板里热门节点的第二行：最近最热的主题，一行放不下就省略。 */
.search-two { min-width: 0; }
.search-two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 列表页（照设计稿）：首页、全部主题、节点广场、节点页、自定义信息流、标签页 ===== */

/* 首页：排序胶囊 36 高；卡片视图的标题 16（节点页、信息流的卡片标题还是 18）。紧凑视图下右栏 280。
   帖子下面那一排（投票胶囊、评论、收藏、分享）宽屏上一律 36 高、圆角 18（控件标准「投票」），手机上保持 44。 */
@media (min-width: 861px) {
  .main-head .chips.sorts .chip.quiet { height: 36px; padding: 0 14px; border-radius: 18px; }
  :root:not([data-feed="compact"]) .feed.slim .card-title { font-size: 16px; }
  .actions > .pill { height: 36px; gap: 6px; padding: 0 14px; border-radius: 18px; }
  .actions > .votes.pill { gap: 0; padding: 0; }
  .actions > .votes.pill .vote { width: 36px; height: 36px; }
  /* 卡片视图的摘要不截断（设计稿首页、节点页、信息流都是整段）。 */
  :root:not([data-feed="compact"]) .card-excerpt { display: block; }
}
/* 首页的列表视图（设计稿「社区首页」，2026-11-22）：一行一个主题，像一张表——主题一栏是「n/节点 · u/作者 · 时间」、一行标题、
   转发帖多一行「转发自…」，有图的帖子右边一张 56×40 的小图，再右边是悬停才露出来的分享；后面是参与、投票、回复、浏览、最后回复几列，
   表头粘在顶栏下面。主栏变窄时从右往左收列（容器查询，断点照设计稿），最窄只留主题和投票，回复、浏览、最后回复挪到标题下面一行。
   用同一张卡片的标记（.feed.lc 里的 .card-post）：卡片视图和手机上这几列都藏着；手机上没有列表视图。
   列之间不用 column-gap、每列左边自带 12 的间距：没有小图的行，空着的那一列不会多出一道间距。 */
.lc-head, .lc-sub, .card-post > :is(.lc-part, .lc-rep, .lc-view, .lc-last) { display: none; }
@media (min-width: 861px) {
  :root[data-feed="compact"] :is(.home-cols, .node-cols) > .main { container: lcfeed / inline-size; }
  :root[data-feed="compact"] .lc-head { position: sticky; z-index: 5; top: 57px; display: grid; grid-template-columns: minmax(0, 1fr) 140px 112px 64px 72px 116px; align-items: center; padding: 10px 16px 8px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--muted); font-size: 12px; }
  :root[data-feed="compact"] .lc-head > * { display: block; margin-left: 12px; }
  :root[data-feed="compact"] .lc-head > .lc-topic { grid-column: 1; margin-left: 0; }
  :root[data-feed="compact"] .lc-head > .lc-part { grid-column: 2; }
  :root[data-feed="compact"] .lc-head > .lc-vote { grid-column: 3; text-align: center; }
  :root[data-feed="compact"] .lc-head > .lc-rep { grid-column: 4; text-align: center; }
  :root[data-feed="compact"] .lc-head > .lc-view { grid-column: 5; text-align: center; }
  :root[data-feed="compact"] .lc-head > .lc-last { grid-column: 6; text-align: right; }
  :root[data-feed="compact"] .feed.lc .card-post { grid-template-columns: minmax(0, 1fr) auto auto 140px 112px 64px 72px 116px; grid-template-rows: auto auto; column-gap: 0; align-items: center; align-content: center; min-height: 44px; padding: 10px 16px; }
  /* 主题一栏只占两行：顶行一行，标题和它下面可能有的几行（转发自、点击显示、窄时的回复浏览）合成一块——
     空着的网格行会被跨行的那几列撑出高度来。 */
  :root[data-feed="compact"] .feed.lc .card-post .meta { grid-column: 1; grid-row: 1; }
  :root[data-feed="compact"] .feed.lc .card-post .card-text { display: block; grid-column: 1; grid-row: 2; min-width: 0; }
  :root[data-feed="compact"] .feed.lc .card-post :is(.card-thumb, .actions > *, .lc-part, .lc-rep, .lc-view, .lc-last) { grid-row: 1 / 3; margin: 0 0 0 12px; }
  :root[data-feed="compact"] .feed.lc .card-post .meta .rpt-badge { display: none; }
  /* 节点页的行顶上是「u/作者 · 时间 · 类别」（设计稿「节点」）：类别从标题下面挪到顶行，是 18 高的小胶囊。.only-narrow 带 !important，只能这样盖。 */
  :root[data-feed="compact"] .feed.lc .card-post .meta > .kind-tag.only-narrow { display: inline-flex !important; }
  :root[data-feed="compact"] .feed.lc .card-post .meta > .kind-tag .tg { height: 18px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 500; }
  :root[data-feed="compact"] .feed.lc .card-post .card-title { -webkit-line-clamp: 1; margin-top: 1px; font-size: 15px; line-height: 1.45; }
  :root[data-feed="compact"] .feed.lc .card-post .rpt-from .i { width: 12px; height: 12px; }
  :root[data-feed="compact"] .feed.lc .card-post .card-thumb { grid-column: 2; width: 56px; height: 40px; border-radius: 8px; }
  :root[data-feed="compact"] .feed.lc .card-post .card-thumb.text { display: none; }
  :root[data-feed="compact"] .feed.lc .card-post .actions { display: contents; }
  :root[data-feed="compact"] .feed.lc .card-post .actions > a.pill { display: none; }
  :root[data-feed="compact"] .feed.lc .card-post .actions > .share { grid-column: 3; width: 32px; height: 32px; justify-content: center; padding: 0; border-radius: 50%; opacity: 0; transition: opacity .15s ease, background-color .18s ease; }
  :root[data-feed="compact"] .feed.lc .card-post .actions > .share > span { display: none; }
  :root[data-feed="compact"] .feed.lc .card-post .actions > .share .i { width: 17px; height: 17px; }
  :root[data-feed="compact"] .feed.lc .card-post:is(:hover, :focus-within) .actions > .share { opacity: 1; }
  :root[data-feed="compact"] .feed.lc .card-post .actions > :is(.votes, .pill.static) { grid-column: 5; justify-self: center; }
  :root[data-feed="compact"] .feed.lc .card-post .votes.pill { height: 36px; padding: 0 2px; border-radius: 18px; }
  :root[data-feed="compact"] .feed.lc .card-post .lc-part { display: flex; grid-column: 4; align-items: center; padding-left: 7px; }
  :root[data-feed="compact"] .feed.lc .card-post .lc-rep { display: block; grid-column: 6; color: var(--ink); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: center; }
  :root[data-feed="compact"] .feed.lc .card-post .lc-view { display: block; grid-column: 7; color: var(--soft); font-size: 15px; font-variant-numeric: tabular-nums; text-align: center; }
  :root[data-feed="compact"] .feed.lc .card-post .lc-last { display: block; grid-column: 8; min-width: 0; line-height: 1.35; text-align: right; }
  @container lcfeed (max-width: 859px) {
    :root[data-feed="compact"] .lc-head { grid-template-columns: minmax(0, 1fr) 140px 112px 64px 0 116px; }
    :root[data-feed="compact"] .feed.lc .card-post { grid-template-columns: minmax(0, 1fr) auto auto 140px 112px 64px 0 116px; }
    :root[data-feed="compact"] :is(.lc-head, .feed.lc .card-post) > .lc-view { display: none; }
  }
  @container lcfeed (max-width: 779px) {
    :root[data-feed="compact"] .lc-head { grid-template-columns: minmax(0, 1fr) 0 112px 64px 0 116px; }
    :root[data-feed="compact"] .feed.lc .card-post { grid-template-columns: minmax(0, 1fr) auto auto 0 112px 64px 0 116px; }
    :root[data-feed="compact"] :is(.lc-head, .feed.lc .card-post) > .lc-part { display: none; }
  }
  @container lcfeed (max-width: 619px) {
    :root[data-feed="compact"] .lc-head { grid-template-columns: minmax(0, 1fr) 0 112px 0 0 0; }
    :root[data-feed="compact"] .feed.lc .card-post { grid-template-columns: minmax(0, 1fr) auto auto 0 112px 0 0 0; }
    :root[data-feed="compact"] :is(.lc-head, .feed.lc .card-post) > :is(.lc-rep, .lc-last) { display: none; }
    :root[data-feed="compact"] .feed.lc .card-post .lc-sub { display: flex; }
  }
}
@media (min-width: 861px) and (hover: none) {
  :root[data-feed="compact"] .feed.lc .card-post .actions > .share { opacity: 1; }
}
.lc-face { display: flex; flex: none; width: 28px; height: 28px; box-sizing: border-box; margin-left: -6px; overflow: hidden; border: 2px solid var(--bg); border-radius: 50%; background: var(--bg); }
.lc-face .avatar { width: 24px; height: 24px; font-size: 12px !important; font-weight: 800; }
.lc-more { display: inline-flex; flex: none; align-items: center; height: 24px; margin-left: 2px; padding: 0 6px; border-radius: 12px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; }
/* 回复数：多的（和「全部主题」同一个门槛）是醒目的橙色加粗；没有回复的淡下去。 */
.lc-rep.hot, .lc-sub-rep.hot { color: var(--signal-text) !important; font-weight: 700 !important; }
.lc-rep.none, .lc-sub-rep.none, .lc-none { color: color-mix(in srgb, var(--outline) 65%, var(--bg)) !important; }
:root[data-theme="dark"] :is(.lc-rep.none, .lc-sub-rep.none, .lc-none) { color: var(--outline-text) !important; }
.lc-last-at { display: block; color: var(--soft); font-size: 14px; white-space: nowrap; }
.lc-last :is(a, .lc-last-by) { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lc-last a:hover { color: var(--ink); }
.lc-sub { min-width: 0; align-items: center; gap: 6px; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; }
.lc-sub > * { flex: none; }
.lc-sub > .clip { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lc-sub-rep { color: var(--ink); font-weight: 500; }
.meta-by { display: inline-flex; align-items: center; gap: 8px; }
.side-footer { padding: 0 16px; color: var(--muted); font-size: 12px; }
.side-footer a { color: var(--muted); }
.side-footer a:hover { color: var(--ink); }
/* 首页右栏的「近期热门」（照设计稿首页）：每条是「节点 · 时间」、两行以内的标题、「N 赞 · N 评论」，有图的右边一张 72 的小图。 */
.panel.hm-hot { padding: 16px 16px 8px; }
.hm-hot-head { display: flex; align-items: center; }
.hm-hot-head .panel-label { flex: 1; margin: 0; }
.hm-hot-head > span { color: var(--outline-text); font-size: 12px; }
.hm-hot-list { display: flex; flex-direction: column; margin-top: 4px; }
.hm-hot-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.hm-hot-item:last-child { border-bottom: 0; }
.hm-hot-item:hover { color: var(--ink); }
.hm-hot-item:hover .hm-hot-title { color: var(--primary); }
.hm-hot-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.hm-hot-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hm-hot-node { min-width: 0; overflow: hidden; color: var(--soft); font-weight: 700; text-overflow: ellipsis; }
.hm-hot-title { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hm-hot-stats { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hm-hot-thumb { position: relative; flex: none; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; background: var(--fill); }
.hm-hot-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-hot-badge { position: absolute; left: 6px; bottom: 6px; display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 6px; background: rgba(11, 31, 24, .75); color: #FFFFFF; }
.hm-hot-badge .i { width: 12px; height: 12px; }
.hm-hot > .btn.text.flush { margin-left: -14px; padding: 0 14px; }
/* 节点页卡片上的类别（本节点的专用标签）：宽屏在标题下面，手机在顶上一行里。 */
.kind-tag { display: flex; margin-top: 6px; }
.meta .kind-tag { display: inline-flex; margin-top: 0; }
:root[data-feed="compact"] .card-post .card-text > .kind-tag { display: none; }

/* 全部主题：表格（参与者一列、未读加粗加橙点、有图的小缩略图），表格太窄时横向滚。 */
.topics-page .tab { height: 36px; padding: 0 12px; border-bottom-width: 2px; }
.topic-filters .chip { height: 32px; padding: 0 12px; border-radius: 16px; }
.topic-filters .sel-button { height: 32px; }
.ttable-scroll { overflow-x: auto; }
.ttable-scroll .ttable { min-width: 640px; }
.ttable-scroll .trow { grid-template-columns: minmax(0, 1fr) 116px 56px 64px 72px; padding: 8px 16px; }
.trow-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trow-text { flex: 1; min-width: 0; }
.trow-thumb { display: block; flex: none; width: 56px; height: 42px; overflow: hidden; border-radius: 8px; background: var(--fill); }
.trow-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ttable-scroll .trow-title { font-size: 14px; }
.trow.unread .trow-title { font-weight: 700; }
.trow-pin { display: inline-flex; margin-right: 4px; color: var(--muted); vertical-align: -2px; }
.trow-pin .i { width: 14px; height: 14px; }
.trow-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--signal); vertical-align: middle; }
.trow-people { display: flex; align-items: center; gap: 4px; }
.trow-face { display: flex; border-radius: 50%; }
.trow-face.last { box-shadow: 0 0 0 2px var(--toast-ok); }
.ttable-scroll .trow-replies { height: 32px; font-size: 13px; }
.legend + .legend { margin-top: 8px; }
.legend .trow-dot { margin: 0 4px; }
.legend-face { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--fill); box-shadow: 0 0 0 2px var(--toast-ok); }
.trending { padding-bottom: 8px; }
.trending .panel-topic small:first-child { margin-bottom: 2px; }
.trending .panel-topic:last-child { padding-bottom: 10px; }
.topics-page .pager .btn, .topics-page .pagenum { height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13px; }
.topics-page .pagenum { min-width: 36px; padding: 0 8px; }

/* 财富榜页也用了 .rank-main（整页的主栏，有内边距），这里的是一行里的文字那一栏（应用目录）。 */
.rank-row .rank-main { padding: 0; }

/* ===== 节点广场（设计稿「节点广场」；/nodes 和 /welcome 共用。nodes.js 管显示更多、切换分类和边打字边搜） ===== */
.main.solo.ns-main { width: 100%; max-width: 1080px; margin: 0 auto; gap: 0; padding-top: 24px; }
.ns-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.ns-intro { flex: 1 1 260px; min-width: 0; }
.ns-title { font-family: "Bricolage Grotesque", var(--font); font-size: 30px; font-weight: 800; line-height: 1.25; }
.ns-intro p { margin-top: 2px; font-size: 14px; }
.ns-tools { display: flex; flex: 0 1 auto; align-items: center; gap: 8px; }
.ns-tools-wide { margin-top: 16px; }
.ns-search { flex: 1; min-width: 240px; }
.ns-tools-wide .ns-search { flex: 0 1 480px; }
.ns-search-field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 22px; background: var(--bg); color: var(--muted); cursor: text; }
.ns-search-field .i { width: 18px; height: 18px; }
.ns-search-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.ns-create { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--primary-bg); color: var(--on-primary); font-size: 14px; font-weight: 700; white-space: nowrap; }
.ns-create:hover { color: var(--on-primary); filter: brightness(.95); }
.ns-create:active { scale: .95; }
.ns-create .i { width: 18px; height: 18px; }
.ns-cats-bar { position: relative; margin-top: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ns-cats { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.ns-cats::-webkit-scrollbar { display: none; }
.ns-cats-bar.can-scroll .ns-cats { padding-right: 48px; }
.ns-cat { display: inline-flex; flex: none; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ns-cat:hover { background: var(--hover); color: var(--ink); }
.ns-cat:active { scale: .95; }
.ns-cat.on { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); }
.ns-cats-next { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); box-shadow: -16px 0 12px var(--bg), 0 0 0 1px var(--line); color: var(--ink); }
.ns-cats-next .i { width: 18px; height: 18px; }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ns-group-title { margin: 28px 0 12px; font-size: 18px; font-weight: 700; }
.ns-group:first-child .ns-group-title { margin-top: 20px; }
.ns-group-title span { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 400; }
.ns-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); transition: border-color .18s ease; }
.ns-card:hover { border-color: var(--outline); }
.ns-card-top { display: flex; align-items: center; gap: 12px; }
.ns-card-id { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.35; }
.ns-card-name { display: flex; align-items: center; min-width: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.ns-card-name:hover { color: var(--ink); }
.ns-card-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-card-hit { position: absolute; inset: 0; border-radius: 16px; }
.ns-card-meta { overflow: hidden; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.ns-card .btn.toggle { position: relative; z-index: 1; min-width: 64px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; }
.ns-card .btn.toggle:not(.on) { border-color: transparent; background: var(--fill); color: var(--ink); }
.ns-card .btn.toggle.on { border-color: var(--outline); }
.ns-card-desc { display: -webkit-box; min-height: 39px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.ns-more { display: flex; justify-content: center; margin-top: 12px; }
.ns-more-btn { height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; }
.ns-more-btn:hover { filter: brightness(.95); }
/* 「全部」下每组先只露一行：脚本量出列数之前先按三个折起来，免得整组一闪而过；量好以后由脚本逐张收放。 */
.ns-group[data-ns-group]:not([data-ready]) .ns-card:nth-child(n+4) { display: none; }
.ns-skeleton { padding-top: 20px; }
.ns-skel { height: 116px; border-radius: 16px; background: linear-gradient(90deg, var(--surface) 25%, var(--fill) 50%, var(--surface) 75%); background-size: 200% 100%; animation: ns-shimmer 1.2s ease-in-out infinite; }
@keyframes ns-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ns-view.loading [data-ns-results] { display: none; }
.ns-empty { padding: 48px 24px; color: var(--muted); text-align: center; }
.ns-empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }
.ns-empty p { font-size: 13px; }
.ns-main .pager { justify-content: center; margin-top: 20px; border-top: 0; }
.ns-main .pager-note { display: none; }
.ns-main .pager .btn { padding: 0 18px; }
.ns-main .pagenum { width: 44px; min-width: 44px; padding: 0; border-radius: 50%; }

/* 节点页：邀请、通知铃铛、加入；右栏的数字、管理员、联系管理员。 */
.iconbtn.outline { border: 1px solid var(--ink); background: var(--bg); }
.iconbtn.outline:hover { background: var(--hover); }
.node-bell.on { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); }
.node-bell.on:hover { background: var(--chip-on-bg); color: var(--chip-on-fg); filter: brightness(1.1); }
.node-bell.on .i { fill: currentColor; }
.node-actions .btn.toggle { min-width: 88px; }
.node-about .panel-user small { margin-left: auto; font-size: 12px; }
.node-contact { margin-top: 12px; font-size: 13px; }
.node-tab { padding: 12px 16px; }
.nodebar { display: none; }

/* 自定义信息流：帖子和头部左右不留白（和设计稿一样跟主栏左对齐）。 */
@media (min-width: 861px) {
  .feedpage .feed-tabs { padding: 0 0 4px; }
  .feedpage .feed-head { padding: 16px 0 0; }
  .feedpage .feed-desc { margin: 10px 0 0; }
  .feedpage .main-head.feed-sorts { padding: 0 0 10px; }
  .feedpage .card-post { padding: 12px 0; }
}

/* 标签页：头部（图标块、组名、标题、数字、关注）、筛选、行式列表；右栏是关于、本月的人、相关标签。 */
.tag-main { padding-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; height: 44px; color: var(--muted); font-weight: 500; }
.back-link .i { width: 18px; height: 18px; }
.back-link:hover { color: var(--ink); }
.tag-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; }
.tag-mark { display: flex; flex: none; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 16px; }
.tag-mark :is(.i, .tgi) { width: 28px; height: 28px; }
.tag-head-text { flex: 1 1 280px; min-width: 0; }
.tag-head-text h1 { margin-top: 6px; font-size: 30px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.tag-desc { margin-top: 6px; color: var(--soft); }
.tag-figures { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.tag-figures strong { color: var(--ink); }
.tag-follow-big { padding: 0 18px; border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.tag-follow-big:hover { color: var(--on-primary); }
.tag-follow-big .i { width: 16px; height: 16px; }
.tag-follow-big.on { border-color: var(--outline); background: var(--bg); color: var(--ink); }
.tag-follow-big.on:hover { color: var(--ink); }
.tag-filters { margin-top: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tag-filters .chip { height: 40px; padding: 0 16px; border-radius: 20px; font-size: 14px; }
.chip-num { margin-left: 4px; font-weight: 400; opacity: .75; }
.tag-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--fill); }
.solve-mark { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--note-bg); color: var(--note-fg); }
.solve-mark.ok { background: var(--unread); color: var(--primary-hover); }
.solve-mark .i { width: 16px; height: 16px; }
.tag-row-main { flex: 1; min-width: 0; }
.tag-row-title { display: block; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.tag-row-title:hover { color: var(--primary); }
.tag-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; color: var(--muted); font-size: 12px; }
.tag-row-meta a { color: var(--muted); }
.tag-row-meta .nodemark { color: var(--ink); font-weight: 700; }
.solved-chip { padding: 0 6px; border-radius: 6px; background: var(--unread); color: var(--primary-hover); font-weight: 700; }
.tag-row-replies { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 4px; min-width: 56px; height: 36px; padding: 0 10px; border-radius: 18px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; }
.tag-row-replies .i { width: 15px; height: 15px; }
.tag-row-replies:hover { color: var(--ink); filter: brightness(.95); }
.tag-page .pager { margin-top: 0; padding: 16px 0 0; border-top: 0; }
.related-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.panel-user.leader { min-height: 44px; }
.panel-user.leader .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .btn.only-narrow { display: inline-flex !important; }
  .main-head .chips.sorts .chip.quiet { height: 44px; }
  /* 手机首页的卡片顶上不写作者；大图圆角 12，计数小一号。 */
  .meta-by { display: none; }
  .card-media { margin-top: 8px; }
  /* 手机上轮播没有左右的按钮（用手划），播放器没有音量条（用机身的音量键）。 */
  .cr, .vp-root { max-height: 460px; border-radius: 12px; }
  .cr-arrow, .vp-vslider { display: none; }
  /* 手机上 16:9 的播放器只有两百来高：设置的面板收紧一点、贴着按钮放，两排选项才不用滚。 */
  .vp-menu { bottom: 48px; max-height: calc(100% - 52px); gap: 8px; padding: 10px 12px; }

  /* 手机全部主题：一行是标题 + 「节点头像 n/节点 · u/作者 · 时间」，右边有图时一张 64×48 的小图和回复胶囊。 */
  .topic-filters .chip { height: 36px; padding: 0 14px; border-radius: 18px; }
  .topic-filters .sel-button { height: 36px; }
  .ttable-scroll { overflow: visible; }
  .ttable-scroll .ttable { min-width: 0; }
  .ttable-scroll .trow { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
  .ttable-scroll .trow.head { display: none; }
  .topic-filters { border-bottom: 1px solid var(--line); }
  .trow-main { flex: 1; gap: 10px; }
  .trow-thumb { order: 2; width: 64px; height: 48px; }
  .ttable-scroll .trow-title { font-weight: 700; }
  .trow-meta { gap: 2px 8px; }
  .trow-meta .nodemark { gap: 6px; color: var(--ink); font-weight: 700; }
  .nodemark-face { display: inline-flex !important; }
  .ttable-scroll .trow-replies { min-width: 48px; height: 32px; padding: 0 8px; border-radius: 16px; font-size: 12px; }
  .topics-page .pager .btn { height: 40px; }
  .topics-page .main-head.plain { align-items: center; }

  .rank-row .btn.toggle { min-width: 72px; padding: 0 14px; font-size: 13px; }

  /* 手机节点广场：标题小一号，搜索框占满一行、「创建」只剩加号，分类小块贴着屏幕两边滑。 */
  .main.solo.ns-main { padding-top: 16px; }
  .ns-title { font-size: 24px; }
  .ns-intro p { font-size: 13px; }
  .ns-tools { flex: 1 1 100%; }
  .ns-search, .ns-tools-wide .ns-search { flex: 1; min-width: 0; }
  .ns-create { padding: 0 12px; }
  .ns-create span { display: none; }
  .ns-cats-bar { margin: 12px -16px 0; }
  .ns-cats { padding: 0 16px; }
  .ns-cats-bar.can-scroll .ns-cats { padding-right: 16px; }
  .ns-cats-next { display: none; }
  .ns-tools-wide { margin-top: 12px; }

  /* 手机节点页：自己的顶栏；头图是夜色；邀请只是一个圆形图标。 */
  .top.has-nodebar > :not(.nodebar, .top-search, .search-away) { display: none !important; }
  .top.has-nodebar .nodebar { display: flex !important; flex: 1; min-width: 0; align-items: center; gap: 0; }
  .nodebar-name { flex: 1; min-width: 0; padding: 0 4px; overflow: hidden; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .node-page:not(.tinted) .node-banner:not(.has-image) { background: var(--night); }
  .node-invite { width: 44px; padding: 0; border-radius: 50%; }
  .node-actions .btn.toggle { min-width: 84px; }

  /* 手机所有标签：搜索框占一行，工具行换行，卡片一列。 */
  .tags-title h1 { font-size: 24px; }
  .tags-filter { flex: 1 1 100%; }
  .tags-tools .segmented { display: flex; }
  .tags-tools .grow { display: none; }
  .tags-grid { grid-template-columns: minmax(0, 1fr); }

  /* 手机标签页：图标块 48，标题 24，行标题 15；右栏不要，只在列表下面放相关标签。 */
  .tag-main { padding: 0 16px; }
  .tag-mark { width: 48px; height: 48px; }
  .tag-mark :is(.i, .tgi) { width: 24px; height: 24px; }
  .tag-head-text h1 { font-size: 24px; }
  .tag-row-title { font-size: 15px; }
  .tag-related { display: block !important; margin-top: 8px; }
}

/* personal: 手机上的帖子页（设计稿 Mobile-Post）：自己的顶栏、首帖下面 8px 的粗分隔、收藏和分享只是圆形图标；
   嵌套是头像在头行里、每层缩进 14、2px 的竖线不拐弯，收起是头行右边的文字；回帖的操作靠右；底部固定的评论条。 */
@media (max-width: 860px) {
  .top.has-topicbar > :not(.topicbar, .top-search, .search-away) { display: none !important; }
  .top.has-topicbar .topicbar { display: flex !important; flex: 1; min-width: 0; align-items: center; gap: 4px; }
  .topicbar-node { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; color: var(--ink); line-height: 1.3; }
  .topicbar-node:hover { color: var(--ink); }
  .topicbar-node > span { min-width: 0; }
  .topicbar-node strong, .topicbar-node small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topicbar-node strong { font-size: 14px; }
  .topicbar-node small { color: var(--muted); font-size: 12px; }
  .topicbar-join .btn.toggle { min-width: 72px; height: 44px; padding: 0 14px; font-size: 13px; }
  .topicbar-join .btn.toggle.on { border-color: var(--outline); }
  .topic-main .post-top { display: none; }
  .topic-main { padding-top: 16px !important; }
  .topic-main :is(.post-title, .post-title-row) { margin-top: 0; }
  .topic-main .op { margin: 12px -16px 0; padding: 0 16px 12px; border-bottom: 8px solid var(--surface); }
  .topic-main .op .prose { font-size: 15px; line-height: 1.75; }
  .topic-main .op .actions { margin-top: 12px; }
  .op .actions .pill.save, .op .actions .pill.share { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .op .actions .pill.save [data-label], .op .actions .pill.share span { display: none; }
  .op .actions .grow { display: block !important; flex: 1; }
  .topic-main .comments { margin-top: 8px; }
  .topic-main .comments-head h2 { font-size: 14px; }
  .topic-main .segmented.labeled a { padding: 0 14px; }
  .topic-main .replies:not(.nested) .reply-col { display: none; }
  .topic-main .reply-face { display: inline-flex !important; margin-right: 2px; }
  .topic-main .reply-head { min-height: 28px; }
  .topic-main .reply-quote { padding: 6px 10px; font-size: 12px; }
  /* 嵌套 */
  .replies.nested .reply-col { display: none; }
  .replies.nested .reply-body { padding-left: 0; }
  .replies.nested .reply[data-depth="0"], .replies.nested .reply-more[data-depth="0"], .replies.nested .action-line { margin-top: 12px; }
  .replies.nested .reply:not([data-depth="0"]) .reply-body, .replies.nested .reply-more:not([data-depth="0"]) .more-row { padding-top: 8px; }
  .replies.nested .gut { width: 14px; }
  .replies.nested .gut .vline { left: 5px; width: 2px; border-radius: 1px; }
  .replies.nested .gut .elbow { display: none; }
  .replies.nested .gut:last-of-type::after { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; border-radius: 1px; background: var(--thread); }
  .topic-main .fold-text { display: inline-flex !important; min-height: 28px; padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
  .topic-main .unfold { display: none !important; }
  .reply.folded .fold-text { color: var(--ink); }
  .more-row { min-height: 36px; color: var(--primary); }
  /* 回帖的操作：回复、赞同、票数、反对，靠右；分享收进「更多操作」。 */
  .topic-main .reply-actions { justify-content: flex-end; margin-left: 0; }
  .topic-main .reply-actions .reply-to { order: -1; }
  .topic-main .reply-actions .votes.inline .score { color: var(--ink); font-size: 13px; font-weight: 700; }
  /* 底部固定的评论条。 */
  .comment-bar { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: flex !important; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
  .comment-fake { display: flex; flex: 1; min-width: 0; align-items: center; height: 44px; padding: 0 16px; overflow: hidden; border: 0; border-radius: 22px; background: var(--fill); color: var(--muted); font-size: 14px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
  .comment-fake:hover { color: var(--muted); }
  .comment-fake.off { cursor: default; font-size: 13px; }
  .comment-bar .btn.primary { flex: none; height: 44px; padding: 0 18px; }
  .topic-main .pager { padding-bottom: 8px; }
}

/* ==== 能量明细（/points）==== */
/* 流水类型的颜色（浅底 / 深色字）和构成条的颜色。 */
:root {
  --en-checkin-bg: #EEF7F2; --en-checkin: #007A52;
  --en-tip-bg: #FCE7F0; --en-tip: #9D174D;
  --en-games-bg: #FFF1E0; --en-games: #8A4B00; --en-games-bar: #FF9C38;
  --en-reward-bg: #EFE7FB; --en-reward: #6D28D9;
  --en-recv-bg: #E0F2F6; --en-recv: #0E7490;
  --en-plain-bg: #E5EBEE; --en-plain: #2A3C42;
  --en-plus: #00573B;
}
:root[data-theme="dark"] {
  --en-checkin-bg: #173326; --en-checkin: #5CC79A;
  --en-tip-bg: #3A1A28; --en-tip: #F49AC1;
  --en-games-bg: #3A2A12; --en-games: #FFCF94; --en-games-bar: #F0A05A;
  --en-reward-bg: #2A2142; --en-reward: #C4B5FD;
  --en-recv-bg: #13323A; --en-recv: #67E8F9;
  --en-plain-bg: #272B2F; --en-plain: #C4CACD;
  --en-plus: #5CC79A;
}
.energy { gap: 0; padding-bottom: 40px; }
.energy-head { margin-bottom: 16px; }
.energy-head h1.big { font-size: 28px; font-weight: 800; line-height: 1.25; }
@media (min-width: 861px) {
  .energy-head { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* 余额卡：Night 底。 */
.energy-card { padding: 20px 24px; }
.energy-card-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.energy-card-balance { flex: 1 1 200px; min-width: 0; }
.energy-card-label { display: flex; align-items: center; gap: 6px; color: var(--on-night-soft); font-size: 13px; }
.energy-card-label .energy-bolt { width: 16px; height: 16px; color: #FF9C38; }
.energy-card-value { margin-top: 2px; font-size: 40px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.energy-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.energy-card-pill, .energy-card-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; white-space: nowrap; }
.energy-card-pill { background: var(--night-tint-strong); color: var(--on-night-soft); font-weight: 500; }
.energy-card-pill .i, .energy-card-btn .i { width: 16px; height: 16px; }
.energy-card-btn { padding: 0 18px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: var(--on-night); font-weight: 700; cursor: pointer; }
.energy-card-btn:hover { background: var(--night-tint); }
.energy-card-btn.solid { border-color: transparent; background: var(--on-night-accent); color: var(--night); }
.energy-card-btn.solid:hover { background: var(--on-night-accent); filter: brightness(.95); }
.energy-card-note { font-weight: 500; }
.energy-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); }
.energy-card-stats .energy-card-label { font-size: 12px; }
.energy-card-stat { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.energy-card-stat.accent { color: var(--on-night-accent); }
a.energy-card-rank, a.energy-card-rank:hover { color: var(--on-night); }
/* 筛选：收支分段 + 月份下拉，下一行类型胶囊（描边式）。 */
.energy-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 20px; }
.energy-filters .grow { flex: 1; }
.energy-filters .segmented { background: var(--fill); }
.energy-month { display: block; }
.energy-month .sel { width: auto; min-width: 140px; }
.energy-chips { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.energy-chip { display: inline-flex; flex: none; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.energy-chip:hover { background: var(--hover); }
.energy-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
/* 按天分组的流水。 */
.energy-list { margin-top: 8px; }
.energy-loading { padding: 24px 12px; }
.energy-day { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 18px 12px 6px; border-bottom: 1px solid var(--line); }
.energy-day h2 { margin: 0; font-size: 14px; font-weight: 700; }
.energy-day h2 span { margin-left: 6px; color: var(--muted); font-weight: 400; }
.energy-day-sum { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.energy-row { border-bottom: 1px solid var(--fill); }
.energy-row-main { display: flex; width: 100%; min-height: 64px; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.energy-row-main:hover { background: var(--hover); }
.energy-row-main:active { scale: 1; }
.energy-ico { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--en-plain-bg); color: var(--en-plain); }
.energy-ico .i { width: 20px; height: 20px; }
.energy-ico.t-checkin { background: var(--en-checkin-bg); color: var(--en-checkin); }
.energy-ico.t-tipIn { background: var(--en-tip-bg); color: var(--en-tip); }
.energy-ico.t-games { background: var(--en-games-bg); color: var(--en-games); }
.energy-ico:is(.t-reward, .t-invite) { background: var(--en-reward-bg); color: var(--en-reward); }
.energy-ico.t-sendIn { background: var(--en-recv-bg); color: var(--en-recv); }
.energy-row-text { flex: 1; min-width: 0; }
.energy-row-title, .energy-row-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.energy-row-title { font-size: 15px; font-weight: 500; }
.energy-row-sub { color: var(--muted); font-size: 13px; }
.energy-row-amount { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.energy-row-amount > span { display: block; }
.energy-row-amount .plus, .energy-row-amount .minus { font-size: 16px; font-weight: 700; }
.energy-row-amount .plus { color: var(--en-plus); }
.energy-row-amount .minus { color: var(--ink); }
.energy-row-bal { color: var(--muted); font-size: 12px; }
.energy-row-chevron { flex: none; color: var(--outline-text); transition: rotate .18s ease; }
.energy-row-chevron .i { width: 16px; height: 16px; }
.energy-row.open .energy-row-chevron { rotate: 180deg; }
.energy-row.open .energy-row-main { background: transparent; }
.energy-detail { margin: 0 12px 12px 64px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 13px; animation: fade .18s ease-out; }
.energy-detail dl { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.energy-detail dt { color: var(--muted); }
.energy-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.energy-detail dd a { font-weight: 500; }
.energy-more { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0 8px; }
.energy-more > span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.energy-end { margin: 20px 0 8px; color: var(--muted); font-size: 13px; text-align: center; }
.energy-empty { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; color: var(--muted); text-align: center; }
.energy-empty-ico { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); color: var(--outline-text); }
.energy-empty-ico .i { width: 24px; height: 24px; }
.energy-empty-title { margin-top: 8px; color: var(--ink); font-size: 16px; font-weight: 700; }
.energy-empty .btn { margin-top: 14px; }
/* 右栏。 */
.energy-aside { flex-basis: 300px; }
.energy-side-title { margin: 0; font-size: 14px; font-weight: 700; }
.energy-mix-note { margin-top: 2px; color: var(--muted); font-size: 12px; }
.energy-mix-row { margin-top: 10px; }
.energy-mix-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.energy-mix-top strong { font-variant-numeric: tabular-nums; }
.energy-bar { height: 8px; margin-top: 4px; border-radius: 4px; background: var(--fill); }
.energy-bar > div { height: 100%; border-radius: 4px; background: var(--outline); }
.energy-bar > .c-checkin { background: var(--en-checkin); }
.energy-bar > .c-tip { background: var(--en-tip); }
.energy-bar > .c-games { background: var(--en-games-bar); }
.energy-bar > .c-reward { background: var(--en-reward); }
.energy-bar > .c-send { background: var(--en-recv); }
.energy-bar > .c-spend { background: var(--en-plain); }
.energy-bar > .c-send.out { background: var(--outline); }
.energy-way { display: flex; min-height: 36px; align-items: center; gap: 12px; font-size: 13px; }
.energy-way span { flex: 1; }
.energy-way strong { color: var(--en-plus); white-space: nowrap; }
a.energy-invite { display: flex; min-height: 44px; align-items: center; justify-content: space-between; margin-top: 4px; padding: 0 12px; border-radius: 10px; background: var(--unread); color: var(--primary); font-size: 13px; font-weight: 700; }
a.energy-invite:hover { filter: brightness(.97); color: var(--primary-hover); }
.energy-uses { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
/* 转赠弹窗：宽屏居中（460，离顶 12vh），手机从底部升起。 */
dialog.energy-send { width: min(460px, calc(100vw - 32px)); max-height: 84vh; margin: 12vh auto auto; padding: 24px; overflow-y: auto; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.energy-send[open] { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.energy-send::backdrop { background: var(--scrim); }
.energy-send-form { display: flex; flex-direction: column; }
.energy-send-form > .sel-handle { display: none; }
.energy-send-head { display: flex; align-items: center; justify-content: space-between; }
.energy-send-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.energy-send-head .iconbtn { margin-right: -10px; }
.energy-send-desc { margin: 0 0 16px; color: var(--muted); }
.energy-send-form .notebox { margin: 0 0 14px; }
.energy-field { display: block; margin-top: 14px; }
.energy-field:first-of-type { margin-top: 0; }
.energy-field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.energy-field-label .hint { margin-left: 2px; color: var(--muted); font-weight: 400; }
.energy-prefixed > span.energy-prefix { color: var(--muted); font-weight: 700; }
.energy-prefixed input { font-size: 15px; }
.energy-prefixed[aria-invalid="true"] { padding: 0 13px; border: 2px solid var(--danger); }
.energy-amount { display: flex; flex-wrap: wrap; gap: 8px; }
.energy-amount input { flex: 1 1 120px; width: auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.energy-quick { flex: none; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.energy-quick[aria-pressed="true"] { border-color: var(--en-checkin); background: var(--en-checkin-bg); }
.energy-send-fee { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.energy-send-form .modal-error { margin-top: 14px; }
.energy-send-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 860px) {
  .energy-head h1.big { font-size: 24px; line-height: 1.3; }
  .energy-head { margin-bottom: 12px; }
  .energy-card { padding: 16px; }
  .energy-card-value { font-size: 32px; }
  .energy-card-stat { font-size: 16px; }
  .energy-filters { margin-top: 16px; }
  .energy-month .sel { min-width: 0; }
  .sel:has(> select[data-energy-month]) > .sel-button { padding: 0 12px 0 16px; border: 0; border-radius: 22px; background: var(--fill); font-size: 13px; font-weight: 700; }
  .energy-day { padding: 18px 0 6px; }
  .energy-row-main { padding: 10px 0; }
  .energy-row-main:hover { background: transparent; }
  .energy-detail { margin: 0 0 12px; }
  dialog.energy-send { position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 90dvh; margin: 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: none; }
  dialog.energy-send[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .energy-send-form > .sel-handle { display: block; }
  .energy-send-actions .btn { flex: 1; }
}

/* ==== 邀请（/invites、受邀落地页、节点邀请）==== */
/* 邀请用到的两种新颜色：「又邀请了 N 人」的紫色小标签；落地页背景上的点阵和光晕。 */
:root { --inv-sub-bg: #EFE7FB; --inv-sub-fg: #6D28D9; --land-dots: rgba(15, 26, 28, .07); --land-glow-a: rgba(255, 156, 56, .10); --land-glow-b: rgba(139, 162, 173, .22); }
:root[data-theme="dark"] { --inv-sub-bg: #2A1F45; --inv-sub-fg: #C4B0F5; --land-dots: rgba(232, 239, 236, .06); --land-glow-a: rgba(255, 156, 56, .08); --land-glow-b: rgba(92, 199, 154, .08); }

/* ----- /invites ----- */
.invites { gap: 0; padding-bottom: 40px; }
.invites-head { margin-bottom: 16px; }
.invites-head h1.big { font-size: 28px; font-weight: 800; line-height: 1.25; }
.invites-head p { margin: 2px 0 0; }
.invites-main { display: flex; flex-direction: column; gap: 16px; }
.invite-hero { padding: 24px; }
.invite-hero-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(92, 199, 154, .16); color: var(--on-night-accent); font-size: 12px; font-weight: 700; }
.invite-hero-tag .i { width: 14px; height: 14px; }
.invite-hero h2 { margin: 10px 0 0; font-size: 26px; font-weight: 800; line-height: 1.3; }
.invite-hero > p { margin: 6px 0 0; }
.invite-steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.invite-steps-list li { display: flex; gap: 12px; padding: 12px 14px; }
.invite-step-n { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--on-night-accent); color: #0B1F18; font-weight: 800; }
.invite-steps-list li > span:last-child { min-width: 0; }
.invite-step-when { display: block; color: var(--on-night-soft); font-size: 13px; }
.invite-steps-list strong { display: block; margin-top: 2px; }
.invite-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.invite-card h2 { margin: 0; font-size: 16px; font-weight: 700; }
.invite-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.invite-link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.invite-link-input { flex: 1 1 240px; width: auto; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; }
.invite-copy { min-width: 120px; }
.invite-copy.copied, .ni-copy.copied { background: var(--primary-hover); }
.invite-link-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.invite-code-line { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.invite-code { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .12em; cursor: pointer; }
.invite-code .i { width: 14px; height: 14px; }
.invite-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.invite-stat { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.invite-stat-label { color: var(--muted); font-size: 12px; }
.invite-stat b { margin-top: 2px; font-size: 24px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.invite-stat b.good { color: var(--primary-hover); }
.invite-mile-next { color: var(--primary-hover); font-size: 13px; font-weight: 700; }
.invite-miles .invite-card-head { justify-content: space-between; align-items: baseline; }
.invite-mile-bar { position: relative; height: 8px; margin: 32px 16px 0; border-radius: 4px; background: var(--fill); }
.invite-mile-fill { height: 100%; border-radius: 4px; background: var(--primary); }
.invite-mile-dot { position: absolute; top: 50%; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--outline); border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 800; translate: -50% -50%; }
.invite-mile-dot.on { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.invite-mile-dot .i { width: 14px; height: 14px; }
.invite-mile-labels { position: relative; height: 56px; margin: 0 16px; }
.invite-mile-label { position: absolute; top: 20px; width: 120px; font-size: 12px; line-height: 1.35; text-align: center; translate: -50% 0; }
.invite-mile-label:last-child { text-align: right; translate: -100% 0; }
.invite-mile-label b { display: block; color: var(--ink); }
.invite-mile-label.on b { color: var(--primary-hover); }
.invite-mile-label small { display: block; }
.invite-friends { padding: 8px 24px 16px; }
.invite-friends > .invite-card-head { padding: 12px 0 8px; }
.invite-chips { display: flex; gap: 6px; overflow-x: auto; }
.invite-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.invite-chip > span { font-weight: 400; opacity: .75; }
.invite-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.invite-friend { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 0; border-top: 1px solid var(--fill); }
.invite-friend[hidden] { display: none; }
.invite-friend-avatar { flex: none; display: flex; }
.invite-friend-main { flex: 1; min-width: 0; }
.invite-friend-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.invite-friend-name a { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.invite-sub { flex: none; padding: 0 6px; border-radius: 6px; background: var(--inv-sub-bg); color: var(--inv-sub-fg); font-size: 11px; font-weight: 700; line-height: 18px; }
.invite-friend-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.invite-progress { display: inline-flex; gap: 3px; }
.invite-progress i { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.invite-progress i.on { background: var(--primary); }
.invite-stage { color: var(--primary-hover); font-weight: 500; }
.invite-stage.warn { color: var(--warn-ink); }
.invite-earn { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.invite-earn b { display: block; color: var(--primary-hover); font-size: 15px; font-weight: 700; }
.invite-earn small { display: block; }
.invite-nudge { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.invite-nudge:disabled { border-color: var(--line); color: var(--muted); cursor: default; }
.invite-empty { padding: 24px 0; border-top: 1px solid var(--fill); text-align: center; }
.invite-empty p { margin: 0; }
.invite-foot { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.invite-side-title { margin: 0; font-size: 14px; font-weight: 700; }
.invite-side-note { margin: 0; color: var(--muted); font-size: 12px; }
.invite-board-row, .invite-board-me { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; }
.invite-board-row b, .invite-board-me b { font-variant-numeric: tabular-nums; }
.invite-board-name { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.invite-rank { flex: none; width: 20px; font-weight: 800; text-align: center; }
.invite-rank.inv-top { color: var(--primary); }
.invite-board-me { margin-top: 4px; padding: 0 8px; border-radius: 10px; background: var(--unread); }
.invite-rule { border-bottom: 1px solid var(--line); }
.invite-rule summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0; color: var(--ink); font-weight: 500; list-style: none; cursor: pointer; }
.invite-rule summary::-webkit-details-marker { display: none; }
.invite-rule summary .i { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: rotate .18s ease; }
.invite-rule[open] summary .i { rotate: 180deg; }
.invite-rule p { margin: 0 0 12px; color: var(--soft); font-size: 13px; }
.invites-aside .invite-rules { padding-bottom: 8px; }
/* 海报 / 二维码弹窗。 */
dialog.invite-share { width: min(420px, calc(100vw - 32px)); max-height: 88vh; margin: 6vh auto auto; padding: 20px 24px 24px; overflow-y: auto; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.invite-share[open] { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.invite-share::backdrop, dialog.ni-dialog::backdrop, dialog.landing-sheet::backdrop { background: rgba(11, 31, 24, .55); }
.invite-share-head { display: flex; align-items: center; gap: 8px; }
.invite-share-tabs { display: flex; flex: 1; }
.invite-share-tabs button { flex: 1; }
.invite-poster { max-width: 320px; margin: 16px auto 0; overflow: hidden; border-radius: 16px; background: #0B1F18; color: #FFFFFF; box-shadow: 0 8px 24px rgba(11, 31, 24, .2); }
.invite-poster[hidden], .invite-qr[hidden] { display: none; }
.invite-poster-top { padding: 20px 20px 0; }
.invite-poster-site { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.invite-poster-site img { border-radius: 8px; }
.invite-poster-title { margin-top: 24px; font-size: 24px; font-weight: 800; line-height: 1.3; }
.invite-poster-who { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; line-height: 1.4; }
.invite-poster-face { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #007A52; object-fit: cover; font-weight: 700; }
.invite-poster-who strong, .invite-poster-who small { display: block; }
.invite-poster-who small { color: #C9D6D0; font-size: 13px; }
.invite-poster-foot { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 20px; background: #FFFFFF; color: #576F76; font-size: 12px; line-height: 1.5; }
.invite-poster-foot strong { color: #0F1A1C; }
.invite-poster-foot .spaced { letter-spacing: .08em; }
.invite-poster-qr { display: flex; flex: none; }
.invite-qr { display: flex; flex-direction: column; align-items: center; margin-top: 20px; text-align: center; }
.invite-qr-frame { display: flex; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #FFFFFF; }
.invite-qr p { margin: 10px 0 0; font-size: 13px; }
.invite-share-actions { display: flex; gap: 8px; margin-top: 16px; }
.invite-share-actions .btn { flex: 1; }

/* ----- 落地页（/i/<码>、/j/<码>）：没有左侧导航，顶栏只有 logo 和「登录」。 ----- */
.top.bare { justify-content: space-between; }
.bare-login { font-weight: 700; color: var(--ink); }
body:has(.landing) { background: var(--surface); }
/* 节点邀请落地页：整页 Surface 底上叠左上橙色光晕、右下灰蓝光晕和 22px 点阵（铺满窗口，不随内容宽度）。 */
body:has(.node-landing) { background:
  radial-gradient(circle at 15% 0%, var(--land-glow-a), transparent 40%) fixed,
  radial-gradient(circle at 90% 100%, var(--land-glow-b), transparent 45%) fixed,
  radial-gradient(var(--land-dots) 1px, transparent 1px) 0 0 / 22px 22px fixed,
  var(--surface); }
.landing { min-height: calc(100dvh - 64px); padding: 24px 16px 48px; }
.node-landing { display: flex; justify-content: center; align-items: flex-start; }
.landing-column { display: flex; flex-direction: column; gap: 16px; width: min(480px, 100%); margin: 0 auto; }
.landing-hero { padding: 24px 20px 20px; border-radius: 20px; }
.landing-inviter { display: flex; align-items: center; gap: 12px; }
.landing-inviter-avatar { display: flex; flex: none; padding: 2px; border-radius: 50%; background: var(--on-night-accent); }
.landing-inviter strong, .landing-inviter small { display: block; }
.landing-inviter small { margin-top: 2px; font-size: 12px; }
.landing-hero h1 { margin: 20px 0 0; font-size: 28px; font-weight: 800; line-height: 1.25; }
.landing-hero > p { margin: 8px 0 0; }
.landing-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.landing-numbers b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.landing-numbers small { display: block; }
.landing-reward { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--warn-line); border-radius: 16px; background: var(--warn-bg); }
.landing-reward-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #FF9C38; color: #FFFFFF; }
.landing-reward strong { display: block; font-size: 15px; }
.landing-reward small { display: block; color: var(--soft); font-size: 13px; }
.landing-nodes { padding: 4px 0; }
.landing-nodes h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.landing-node { display: flex; align-items: center; gap: 12px; min-height: 60px; color: var(--ink); }
.landing-node:hover { color: var(--ink); }
.landing-node > span { min-width: 0; }
.landing-node strong { display: block; font-weight: 700; }
.landing-node small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.landing-code { margin: 0; color: var(--muted); font-size: 12px; }
.landing-code strong { color: var(--ink); letter-spacing: .06em; }
.landing-cta { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.landing-cta .btn { width: 100%; height: 48px; font-size: 16px; }
.landing-cta p { margin: 0; color: var(--muted); font-size: 12px; }
.landing-cta p a { font-weight: 700; }
.landing-card { padding: 32px 24px 28px; border-radius: 20px; background: var(--bg); box-shadow: 0 16px 48px rgba(15, 26, 28, .12), 0 0 0 1px var(--line); text-align: center; }
.landing-state h1 { margin: 16px 0 0; font-size: 22px; }
.landing-state p { margin: 8px 0 0; }
.landing-state-actions, .nl-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.landing-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; background: var(--unread); color: var(--primary); }
.landing-state-icon .i { width: 36px; height: 36px; }
.landing-state-icon.off { background: var(--fill); color: var(--muted); }
/* 注册弹层：手机从底部升起（最高 90%），宽屏居中。 */
dialog.landing-sheet { width: min(440px, calc(100vw - 32px)); max-height: 90dvh; margin: 10vh auto auto; padding: 20px 24px 24px; overflow-y: auto; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.landing-sheet[open] { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.landing-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.landing-sheet-head h2 { margin: 0; font-size: 19px; }
.landing-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-top: 8px; padding: 0 12px; border-radius: 14px; background: var(--unread); color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.landing-badge .i { width: 14px; height: 14px; }
.landing-sheet .form { gap: 12px; }
.landing-sheet .btn.tall { height: 48px; font-size: 16px; }
.landing-terms { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.landing-done { padding: 12px 0 4px; text-align: center; }
.landing-done[hidden], .landing-sheet-body[hidden] { display: none; }
.landing-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--unread); color: var(--primary); }
.landing-done-icon .i { width: 32px; height: 32px; }
.landing-done h2 { margin: 16px 0 0; font-size: 22px; }
.landing-done p { margin: 8px 0 0; color: var(--soft); }
.landing-done-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
/* 节点邀请卡。 */
.nl-card { width: min(440px, 100%); margin-top: 4vh; padding: 32px 32px 28px; border-radius: 20px; background: var(--bg); box-shadow: 0 16px 48px rgba(15, 26, 28, .12), 0 0 0 1px var(--line); text-align: center; animation: pop .32s cubic-bezier(.2, .8, .2, 1); }
.nl-from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.nl-icon { position: relative; width: 88px; height: 88px; margin: 20px auto 0; }
.nl-icon .avatar { border-radius: 26px; font-size: 38px !important; }
.nl-lock { position: absolute; right: -6px; bottom: -6px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 3px solid var(--bg); border-radius: 50%; background: var(--ink); color: var(--bg); }
.nl-lock .i { width: 14px; height: 14px; }
.nl-card h1 { margin: 16px 0 0; font-size: 26px; font-weight: 700; line-height: 1.3; }
.nl-card h1.nl-small { margin-top: 16px; font-size: 22px; }
.nl-card.done h1.nl-small { font-size: 24px; }
.nl-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.nl-counts { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.nl-dot { width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--outline); }
.nl-dot.on { margin-left: 0; background: #2BB673; }
.nl-desc { margin: 12px 0 0; color: var(--soft); }
.nl-text { margin: 8px 0 0; color: var(--soft); }
.nl-follow { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.nl-faces { display: flex; flex: none; }
.nl-faces .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.nl-faces .avatar:first-child { margin-left: 0; }
.nl-rules { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.nl-rules summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font-weight: 500; list-style: none; cursor: pointer; }
.nl-rules summary::-webkit-details-marker { display: none; }
.nl-rules summary .i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: rotate .18s ease; }
.nl-rules[open] summary .i { rotate: 180deg; }
.nl-rules ol { margin: 0; padding: 0 14px 12px 34px; color: var(--soft); font-size: 13px; }
.nl-rules li + li { margin-top: 6px; }
.nl-note { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 13px; font-weight: 700; text-align: left; }
.nl-note textarea { min-height: 84px; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; resize: vertical; }
.nl-note textarea[aria-invalid="true"] { border: 2px solid var(--danger); }
.nl-card .field-error { margin: 6px 0 0; text-align: left; }
.nl-main { width: 100%; height: 48px; margin-top: 20px; font-size: 16px; }
.nl-main.busy { opacity: .6; }
.nl-second { width: 100%; margin-top: 4px; color: var(--ink); }
.nl-foot { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

/* ----- 节点邀请弹窗（节点页的「邀请」） ----- */
dialog.ni-dialog { width: min(460px, calc(100vw - 32px)); max-height: 80vh; margin: 10vh auto auto; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.ni-dialog[open] { display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.ni-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.ni-view[hidden] { display: none; }
.ni-head { flex: none; padding: 20px 20px 12px; }
.ni-title { display: flex; align-items: center; gap: 12px; }
.ni-title h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.ni-title .iconbtn { margin-right: -10px; }
.ni-search { position: relative; display: block; margin-top: 14px; }
.ni-search > span { position: absolute; top: 12px; left: 14px; color: var(--muted); }
.ni-search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.ni-list { flex: 1; min-height: 120px; overflow-y: auto; padding: 0 20px; overscroll-behavior: contain; }
.ni-person { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.ni-person-main { flex: 1; min-width: 0; }
.ni-person-main strong { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ni-person-main small { display: block; }
.ni-invite { flex: none; min-width: 72px; height: 36px; padding: 0 14px; border: 1px solid var(--primary-bg); border-radius: 18px; background: var(--primary-bg); color: var(--on-primary); font-size: 13px; font-weight: 700; cursor: pointer; }
.ni-invite.off, .ni-invite:disabled { border-color: var(--line); background: var(--bg); color: var(--muted); cursor: default; }
.ni-empty { margin: 16px 0; color: var(--muted); font-size: 13px; text-align: center; }
.ni-foot { flex: none; padding: 14px 20px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.ni-foot-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.ni-link { display: flex; gap: 8px; margin-top: 8px; }
.ni-link input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; }
.ni-copy { flex: none; min-width: 88px; }
.ni-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.ni-edit { height: 32px; padding: 0 4px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ni-edit-head { display: flex; flex: none; align-items: center; gap: 4px; padding: 14px 12px 6px; }
.ni-edit-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ni-edit-body { display: flex; flex: 1; flex-direction: column; gap: 18px; min-height: 0; padding: 4px 20px 16px; overflow-y: auto; }
.ni-field-label { margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.ni-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.ni-radio { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.ni-radio[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.ni-switch { display: flex; align-items: center; gap: 12px; }
.ni-switch > span { flex: 1; }
.ni-switch strong, .ni-switch small { display: block; }
.ni-switch strong { font-size: 14px; }
.ni-replace { padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--soft); font-size: 13px; }
.ni-edit-actions { display: flex; flex: none; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; border-top: 1px solid var(--line); }


@media (max-width: 860px) {
  .invites-head h1.big { font-size: 24px; }
  .invite-hero { padding: 20px 16px; }
  .invite-hero h2 { font-size: 22px; }
  .invite-steps-list { grid-template-columns: minmax(0, 1fr); }
  .invite-card { padding: 16px; }
  .invite-friends { padding: 4px 16px 12px; }
  .invite-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-copy { flex: 1 1 100%; }
  .invite-link-more .grow { display: none; }
  .invite-code-line { flex: 1 1 100%; }
  .invite-link-more .btn { flex: 1; }
  /* 窄屏上四档的说明排不下一行：进度条下面改成两列的小表。 */
  .invite-mile-labels { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; height: auto; margin: 24px 0 0; }
  .invite-mile-label, .invite-mile-label:last-child { position: static; width: auto; text-align: left; translate: none; }
  .invite-mile-label b { display: inline; margin-right: 6px; }
  .invite-mile-label small { display: inline; }
  .invite-friend { flex-wrap: wrap; }
  .invite-friend-main { flex-basis: calc(100% - 52px); }
  .invite-earn, .invite-nudge { margin-left: 52px; }
  .invite-earn { text-align: left; }
  dialog.invite-share, dialog.ni-dialog, dialog.landing-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; margin: 0; border-radius: 20px 20px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.invite-share { max-height: 92dvh; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  dialog.ni-dialog { max-height: 88dvh; }
  dialog.landing-sheet { max-height: 90dvh; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .landing { padding: 0 0 120px; }
  .invite-landing .landing-column { width: 100%; gap: 0; }
  .invite-landing .landing-hero { border-radius: 0; padding: 24px 16px 20px; }
  .invite-landing .landing-reward { margin: 16px; }
  .invite-landing .landing-nodes { padding: 0 16px; }
  .invite-landing .landing-code { padding: 8px 16px 0; }
  .invite-landing .landing-cta { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
  .invite-landing .landing-card { margin: 16px; }
  .node-landing { padding: 16px 16px 48px; }
  .nl-card { margin-top: 0; padding: 24px 20px; }
}

/* ===== resources 组：关于、常见问题、条款与隐私（说明页） ===== */
/* 关于、常见问题、条款与隐私、节点管理员守则（templates/docs.html）。主栏最宽 780，右栏是目录（宽屏才有）。 */
.doc-page .split-main { flex-basis: 560px; }
.doc-col { max-width: 780px; }
.doc-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.doc-admin .notebox { flex: 1 1 320px; }
.doc-col > .notebox { margin-bottom: 12px; }
.legal-doc .doc-admin { margin: 16px 0 0; }
.doc-title { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.25; }
.doc-sub { margin: 4px 0 0; color: var(--muted); }
.doc-h2 { margin: 40px 0 12px; font-size: 22px; font-weight: 700; scroll-margin-top: 72px; }
.doc-more { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; font-weight: 700; }
.doc-more.big { margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.doc-toc hr, .legal-aside hr { margin: 10px 0; }
.doc-side-link.side-card-item { color: var(--primary); font-size: 13px; font-weight: 700; }

.about-hero { padding: 16px 0 8px; }
.about-logo { display: block; width: auto; height: 48px; }
.about-title { margin: 20px 0 0; font-size: 36px; font-weight: 800; line-height: 1.25; }
.about-intro { margin-top: 10px; color: var(--soft); font-size: 17px; line-height: 1.7; }
.about-intro p { margin: 0 0 10px; }
.about-intro p:last-child { margin-bottom: 0; }
.about-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.about-figure { padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.about-figure b { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.about-figure span { color: var(--muted); font-size: 13px; }
.about-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.about-value { padding: 18px; border-radius: 16px; background: var(--surface); }
.about-value-icon { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--bg); color: var(--primary); }
.about-value-icon .i { width: 22px; height: 22px; }
.about-value h3 { margin: 12px 0 0; font-size: 16px; font-weight: 700; }
.about-value p { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.about-how { padding: 4px 20px; border: 1px solid var(--line); border-radius: 16px; }
.about-how-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--fill); }
.about-how-row:last-child { border-bottom: 0; }
.about-how-icon { flex: none; margin-top: 2px; color: var(--muted); }
.about-how-icon .i { width: 20px; height: 20px; }
.about-how-title { font-weight: 700; }
.about-how-text { margin-top: 2px; color: var(--soft); font-size: 14px; }
.about-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.about-person { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.about-person:hover { background: var(--hover); color: var(--ink); }
.about-person > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.about-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.about-person small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.about-history { margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); list-style: none; }
.about-history li { position: relative; padding: 0 0 20px 16px; }
.about-dot { position: absolute; top: 4px; left: -27px; width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--outline); box-shadow: 0 0 0 2px var(--outline); }
.about-history li:last-child .about-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.about-date { color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.about-event { margin-top: 2px; font-weight: 700; }
.about-event-text { color: var(--soft); font-size: 14px; }
.about-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.about-contact-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.about-contact-text { margin-top: 2px; color: var(--muted); font-size: 13px; }
#contact.doc-h2 { margin-top: 28px; }
:is(#values, #how, #team, #history, #contact) { scroll-margin-top: 72px; }

.faq-search { position: relative; display: block; margin-top: 16px; }
.faq-search > .i { position: absolute; top: 14px; left: 16px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.faq-search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); font-size: 15px; }
.faq-cats { display: flex; gap: 8px; margin: 12px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.faq-cats::-webkit-scrollbar { display: none; }
.faq-cat { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.faq-cat span { font-weight: 400; opacity: .75; }
.faq-cat[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.faq-group-name { margin: 24px 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.faq-item { border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.faq-q { margin: 0; font: inherit; }
.faq-toggle { display: flex; width: 100%; min-height: 56px; align-items: center; gap: 12px; padding: 12px 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; }
.faq-toggle > span:first-child { flex: 1; }
.faq-chevron { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); transition: transform .18s ease, background-color .18s ease; }
.faq-toggle[aria-expanded="true"] .faq-chevron { background: var(--fill); transform: rotate(180deg); }
.faq-a { padding: 0 0 16px; }
.faq-answer { color: var(--soft); font-size: 15px; line-height: 1.75; }
.faq-answer p { margin: 0 0 8px; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.faq-vote-btn { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.faq-vote-btn:hover { background: var(--hover); }
.faq-empty { padding: 48px 16px; text-align: center; }
.faq-empty-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); color: var(--outline-text); }
.faq-empty strong { display: block; margin-top: 12px; font-size: 16px; }
.faq-empty p { margin: 4px 0 0; color: var(--muted); }
.faq-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
.faq-help h2 { margin: 0; font-size: 17px; font-weight: 700; }
.faq-help p { margin: 4px 0 0; color: var(--on-night-soft); }
.btn.faq-help-btn { background: var(--on-night-accent); color: #0B1F18; }
.faq-hot.side-card-item { min-height: 36px; padding-top: 6px; padding-bottom: 6px; line-height: 1.4; }

.legal-switch { align-self: flex-start; background: var(--fill); }
.legal-switch a { display: inline-flex; align-items: center; }
.legal-title { margin-top: 18px; font-size: 32px; }
.legal-dates { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
/* 条款的译文：顶上注明以中文版本为准。 */
.legal-reference { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; }
.legal-changes { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--surface); }
.legal-changes summary { font-weight: 700; cursor: pointer; }
.legal-changes ul { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.legal-toc-m { margin-top: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.legal-toc-m summary { min-height: 44px; padding: 10px 0; font-weight: 700; cursor: pointer; }
.legal-toc-m ol { margin: 0 0 8px; padding: 0; list-style: none; }
.legal-toc-m a { display: flex; min-height: 36px; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.legal-toc { margin: 0; padding: 0; list-style: none; }
.legal-toc .side-card-item { min-height: 34px; }
.legal-toc-n { flex: none; width: 18px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.legal-print.side-card-item { width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.legal-print.side-card-item:hover { background: var(--fill); }
.legal-section { scroll-margin-top: 72px; }
.legal-section h2 { margin: 28px 0 8px; font-size: 19px; font-weight: 700; }
.legal-body { color: var(--soft); font-size: 15px; line-height: 1.85; }
.legal-body p { margin: 0 0 10px; }
.legal-body > :last-child { margin-bottom: 0; }
.legal-foot { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .doc-title { font-size: 24px; }
  .legal-title { font-size: 26px; }
  .about-logo { height: 36px; }
  .about-title { font-size: 26px; }
  .about-intro { font-size: 15px; }
  .about-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-values, .about-contact { grid-template-columns: minmax(0, 1fr); }
  .about-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .top, .side, .split-aside, .legal-switch, .doc-admin, .legal-toc-m, .legal-foot, .toast, .fab { display: none !important; }
  .shell, .page, .doc-page .split-main { display: block; padding: 0; }
  .legal-doc[hidden] { display: none !important; }
  .legal-body { color: #000; }
}


/* ===== resources 组：草稿箱 ===== */
/* 草稿箱（/drafts，static/drafts.js）：标题行 + 搜索、类型胶囊或批量条、草稿行、空状态、页脚；编辑抽屉宽屏从右边、手机从底下出来。
   发帖框和回复框上的冲突提示（.draft-conflict）也在这里。 */
:root { --dr-reply-bg: #E0F2F6; --dr-reply-fg: #0E7490; }
:root[data-theme="dark"] { --dr-reply-bg: #12303A; --dr-reply-fg: #7DD3E8; }
.drafts-page .dr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.drafts-page .dr-head-text { flex: 1 1 220px; min-width: 0; }
.drafts-page .dr-title { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.25; }
.dr-summary { color: var(--muted); font-size: 13px; }
.dr-search { position: relative; display: block; flex: 0 1 260px; }
.dr-search > .i { position: absolute; top: 13px; left: 14px; color: var(--muted); pointer-events: none; }
.dr-search input[type="search"] { display: block; width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.dr-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 56px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.dr-tabs[hidden], .dr-bulk[hidden] { display: none; }
.dr-tab { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; }
.dr-tab[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.dr-tab-n { font-weight: 400; opacity: .75; }
.dr-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 56px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--toast-ok); border-radius: 12px; background: var(--unread); }
.dr-bulk .btn { height: 40px; }
.dr-bulk-delete { border-color: var(--danger); background: var(--bg); color: var(--danger); }
.dr-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--fill); }
.dr-check { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px 0 0 -8px; padding: 0; border: 0; background: transparent; }
.dr-box { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 2px solid var(--outline); border-radius: 5px; background: var(--bg); color: var(--on-primary); }
.dr-box > .i { visibility: hidden; }
.dr-check[aria-checked="true"] .dr-box { border-color: var(--primary-bg); background: var(--primary-bg); }
.dr-check[aria-checked="true"] .dr-box > .i { visibility: visible; }
.dr-main { flex: 1; min-width: 0; }
.dr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 12px; }
.dr-kind { padding: 0 8px; border-radius: 6px; background: var(--fill); color: var(--ink); font-weight: 700; line-height: 22px; }
.dr-kind.reply { background: var(--dr-reply-bg); color: var(--dr-reply-fg); }
.dr-kind.scheduled { background: var(--unread); color: var(--primary-hover); }
.dr-target { min-width: 0; overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dr-row-title { display: block; width: 100%; margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.dr-row-title.untitled { color: var(--outline-text); }
.dr-excerpt { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: var(--soft); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.dr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dr-saved { display: inline-flex; align-items: center; gap: 4px; }
.dr-warn { color: var(--warn-ink); font-weight: 700; }
.dr-note { margin-top: 10px; }
.dr-conflict, .draft-conflict { flex-wrap: wrap; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 10px; }
.draft-conflict { margin: 0 0 12px; }
.dr-conflict > .grow, .draft-conflict > .grow { flex: 1 1 200px; }
:is(.dr-conflict, .draft-conflict) .btn { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; }
.dr-conflict-use, .draft-conflict-use { background: var(--ink); color: var(--bg); }
.dr-conflict-use:hover, .draft-conflict-use:hover { color: var(--bg); }
.dr-actions { display: flex; flex: none; align-items: flex-start; gap: 4px; }
.dr-cta { height: 40px; padding: 0 16px; }
.dr-trash { width: 40px; height: 40px; color: var(--muted); }
.dr-unschedule { height: 40px; padding: 0 12px; }
.dr-empty { padding: 64px 24px; color: var(--muted); text-align: center; }
.dr-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--outline-text); }
.dr-empty-title { margin-top: 10px; color: var(--ink); font-size: 16px; font-weight: 700; }
.dr-foot { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.draft-restored { margin: 0 0 8px; }
@media (max-width: 860px) {
  .drafts-page .dr-title { font-size: 24px; }
  .dr-search { flex: 1 1 100%; }
  .dr-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dr-row { gap: 10px; }
  .dr-row-title { font-size: 16px; }
  .dr-actions { flex-direction: column; align-items: flex-end; }
}

/* ===== resources 组：创建节点 ===== */
/* 创建节点（设计稿 CreateNode / Mobile-CreateNode）：左边四段白卡片的表单，右边贴住的预览卡，底下贴底的操作栏；
   建好之后整块换成居中的成功卡片。手机上没有标题区（在自己的顶栏里），段落是 8px 粗线隔开的通栏，预览在表单下面，底栏固定在屏幕底部。 */
.nc-page { display: flex; flex-direction: column; }
.nc-back { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; height: 44px; margin-left: -6px; padding: 0 6px; border-radius: 22px; color: var(--muted); font-weight: 500; }
.nc-back:hover { background: var(--fill); color: var(--ink); }
.nc-back .i { width: 18px; height: 18px; }
h1.big.nc-title { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.25; }
.nc-lead { margin: 4px 0 20px; color: var(--muted); }
.nc-grid { display: grid; grid-template-columns: minmax(0, 680px) minmax(280px, 340px); justify-content: space-between; align-items: start; gap: 32px; padding-bottom: 32px; }
.nc-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nc-allow { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--unread); color: var(--ink); font-size: 13px; }
.nc-allow > .i { color: var(--primary-hover); }
.nc-allow.nc-allow-no { border: 1px solid var(--warn-line); background: var(--warn-bg); }
.nc-allow.nc-allow-no > .i { color: var(--warn-ink); }
.nc-summary { padding: 12px 16px; border: 1px solid var(--error-line); border-radius: 12px; background: var(--error-bg); }
.nc-summary-head { display: flex; align-items: center; gap: 8px; color: var(--danger); font-weight: 700; }
.nc-summary ul { margin: 6px 0 0; padding-left: 44px; font-size: 13px; }
.nc-summary li { margin-top: 2px; }
.nc-summary a { color: var(--danger); text-decoration: underline; text-underline-offset: 2px; }
.nc-sec { padding: 20px 24px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); scroll-margin-top: 72px; }
.nc-sec h2 { margin: 0; font-size: 17px; font-weight: 700; }
.nc-optional { color: var(--muted); font-weight: 400; }
.nc-sec-note { margin: 2px 0 16px; color: var(--muted); font-size: 13px; }
.nc-fields { display: flex; flex-direction: column; gap: 20px; }
.nc-field { scroll-margin-top: 80px; }
.nc-label-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nc-label-row label, .nc-label { font-size: 14px; font-weight: 700; }
.nc-req { color: var(--danger); }
.nc-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.nc-count.nc-warn { color: var(--warn-ink); }
.nc-input { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
input.nc-input { height: 44px; padding: 0 14px; }
.nc-input-strong { font-weight: 700; }
.nc-input::placeholder, .nc-prefixed input::placeholder { color: var(--outline-text); font-weight: 400; }
.nc-prefixed { display: flex; align-items: stretch; height: 44px; overflow: hidden; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
.nc-prefixed > span { display: flex; flex: none; align-items: center; padding: 0 12px; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; }
.nc-prefixed input { flex: 1; min-width: 0; padding: 0 12px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
.nc-field[data-invalid] :is(.nc-input, .nc-prefixed), .nc-field[data-invalid] .filepick-box { border: 2px solid var(--danger); }
.nc-help, .nc-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.nc-hint { color: var(--warn-ink); }
.nc-help[hidden], .nc-hint[hidden], .nc-err[hidden], .nc-ok[hidden] { display: none; }
.nc-err { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--danger); font-size: 13px; }
.nc-err .i, .nc-ok .i { width: 16px; height: 16px; }
.nc-ok { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--primary-hover); font-size: 13px; font-weight: 700; }
.nc-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.nc-swatch { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--bg); cursor: pointer; }
.nc-swatch > span { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; color: #FFFFFF; }
.nc-swatch .i { visibility: hidden; width: 18px; height: 18px; }
.nc-swatch[aria-checked="true"] { border-color: var(--ink); }
.nc-swatch[aria-checked="true"] .i { visibility: visible; }
.nc-rules { display: flex; flex-direction: column; gap: 12px; }
.nc-rules:empty { display: none; }
.nc-rule { display: flex; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.nc-rule[data-invalid] { border-color: var(--danger); }
.nc-rule[data-invalid] input { border: 2px solid var(--danger); }
.nc-rule-n { display: flex; flex: none; width: 24px; height: 44px; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nc-rule-fields { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 8px; }
.nc-rule-fields textarea { font-size: 14px; }
.nc-rule-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.nc-rule-foot .nc-count { margin-left: auto; font-size: 12px; }
.nc-rule-err { display: none; color: var(--danger); font-weight: 700; }
.nc-rule[data-invalid] .nc-rule-err { display: inline; }
.nc-rule-remove { color: var(--muted); }
.nc-add { padding: 0 20px; }
.nc-add:disabled { opacity: .45; }
.nc-choices { display: flex; flex-direction: column; gap: 8px; }
.nc-choice { display: flex; min-height: 56px; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.nc-choice > .i { color: var(--muted); }
.nc-choice[aria-checked="true"] { padding: 9px 13px; border: 2px solid var(--primary); background: var(--unread); }
.nc-radio { position: relative; display: flex; flex: none; width: 20px; height: 20px; border: 2px solid var(--outline); border-radius: 50%; }
.nc-choice[aria-checked="true"] .nc-radio { border-color: var(--primary); }
.nc-choice[aria-checked="true"] .nc-radio::after { position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); content: ""; }
.nc-choice-text { display: flex; flex: 1; flex-direction: column; }
.nc-choice-text > span { color: var(--muted); font-size: 13px; }
.nc-agree { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; }
.nc-check { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; margin: 0 -12px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.nc-box { display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; border: 2px solid var(--outline); border-radius: 5px; background: var(--bg); color: #FFFFFF; }
.nc-box .i { visibility: hidden; width: 14px; height: 14px; }
.nc-check[aria-checked="true"] .nc-box { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.nc-check[aria-checked="true"] .nc-box .i { visibility: visible; }
.nc-field[data-invalid] .nc-check:not([aria-checked="true"]) .nc-box { border-color: var(--danger); }
.nc-agree > span { flex: 1; min-width: 0; }

.nc-side { position: sticky; top: 80px; }
.nc-side-label { margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.nc-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.nc-card-band { height: 56px; background: var(--primary); }
.nc-card-body { padding: 0 16px 16px; }
.nc-card-top { display: flex; align-items: flex-end; gap: 10px; margin-top: -26px; }
.nc-card-avatar { display: flex; flex: none; width: 56px; height: 56px; align-items: center; justify-content: center; border: 3px solid var(--bg); border-radius: 50%; background: var(--primary-bg) center / cover no-repeat; color: #FFFFFF; font-size: 22px; font-weight: 700; }
.nc-card-join { display: inline-flex; height: 36px; align-items: center; padding: 0 16px; border-radius: 18px; background: var(--primary-bg); color: var(--on-primary); font-size: 13px; font-weight: 700; }
.nc-card-name { margin-top: 8px; overflow-wrap: anywhere; font-size: 18px; font-weight: 700; }
.nc-card-name.nc-empty, .nc-card-desc.nc-empty { color: var(--outline-text); }
.nc-card-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.nc-card-desc { margin: 8px 0 0; color: var(--soft); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.nc-card-rules { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--fill); font-size: 13px; }
.nc-card-rules[hidden] { display: none; }
.nc-card-rules-title { margin-bottom: 4px; font-weight: 700; }
.nc-card-rules ol { margin: 0; padding-left: 18px; }
.nc-card-rules li { margin-top: 6px; font-weight: 700; }
.nc-card-rules li > span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 400; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.nc-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--bg); box-shadow: 0 -6px 16px rgba(15, 26, 28, .06); }
.nc-bar-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.nc-bar-status .i { width: 18px; height: 18px; }
.nc-bar-status.bad { color: var(--danger); }
.nc-bar-status.good { color: var(--primary-hover); }

.nc-done { max-width: 560px; margin: 32px auto 64px; padding: 40px 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); text-align: center; }
.nc-done[hidden] { display: none; }
.nc-done-avatar { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary-bg) center / cover no-repeat; color: #FFFFFF; font-size: 28px; font-weight: 700; }
.nc-done h1 { margin: 16px 0 0; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.nc-done h1:focus { outline: none; }
.nc-done-url { display: inline-block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.nc-done p { margin: 6px 0 0; color: var(--muted); }
.nc-done-actions { display: flex; flex-direction: column; gap: 8px; max-width: 280px; margin: 24px auto 0; }
.nc-done-actions .btn.ghost { font-weight: 700; }

:root[data-theme="dark"] .nc-bar { box-shadow: 0 -6px 16px rgba(0, 0, 0, .35); }
/* 夜色那一格在深色底上看不见：描一圈细边。 */
:root[data-theme="dark"] .nc-swatch > span { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }

@media (max-width: 1100px) {
  .nc-grid { grid-template-columns: minmax(0, 1fr); }
  .nc-side { position: static; max-width: 560px; }
}
/* 手机：自己的顶栏（返回 + 「创建节点」）、通栏分段、预览在表单下面、底栏固定在屏幕底部。 */
@media (max-width: 860px) {
  .top.has-pagebar > :not(.pagebar, .top-search, .search-away) { display: none !important; }
  .top.has-pagebar .pagebar { display: flex !important; flex: 1; min-width: 0; align-items: center; gap: 4px; }
  .pagebar-title { flex: 1; min-width: 0; overflow: hidden; font-size: 17px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .nc-grid { gap: 0; padding-bottom: 0; }
  .nc-form { gap: 0; }
  .nc-allow, .nc-summary { margin: 12px 16px 0; }
  .nc-sec { margin-top: 12px; padding: 20px 16px; border: 0; border-top: 8px solid var(--surface); border-radius: 0; }
  .nc-side { padding: 20px 16px 24px; border-top: 8px solid var(--surface); }
  .nc-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .nc-bar-status { flex: 1 1 100%; font-size: 13px; }
  .nc-bar .grow { display: none; }
  .nc-bar .btn { flex: 1; }
  .nc-done { margin: 16px; padding: 32px 20px; }
  .nc-swatches { gap: 4px; }
  .nc-swatch { width: 40px; height: 40px; }
  .nc-swatch > span { width: 30px; height: 30px; }
  .main.nc { padding-bottom: 80px; }
}
@media print { .nc-bar { display: none; } }

/* ===== 首页的站点公告轮播（设计稿 Main / Mobile-Home「站点公告」，模板 home-ann，脚本 home-ann.js） =====
   桌面 104 高、16 圆角：左边 44 的类型图标、类型标签 + 日期、标题和摘要各一行（超出省略），右边胶囊按钮，再右边是
   「n / 共几条」、上一条、下一条、关闭（32 的圆钮），左下是轮播点（当前那个拉长成 22）。手机 176 高：没有图标和计数，
   标题、摘要各最多两行，按钮变成标题下面的一行彩字，控件在右上角，轮播点在右下角。
   四种类型的配色照设计稿的 NLANN_T（底、字、标签底、强调色），深色模式另配一套；有封面时一律深底白字、强调色是金黄。 */
.hann-notice { --hann-bg: #0B1F18; --hann-fg: #FFFFFF; --hann-chip: rgba(255, 255, 255, .14); --hann-acc: #5CC79A; }
.hann-event { --hann-bg: #EEF7F2; --hann-fg: #00573B; --hann-chip: #D3EEE2; --hann-acc: #007A52; }
.hann-maintenance { --hann-bg: #FFF1E0; --hann-fg: #6B3A00; --hann-chip: #FBDDB8; --hann-acc: #A85400; }
.hann-rules { --hann-bg: #EAF0F3; --hann-fg: #0F1A1C; --hann-chip: #D5E0E6; --hann-acc: #2A3C42; }
:root[data-theme="dark"] .hann-notice { --hann-bg: #0F2A20; --hann-fg: #FFFFFF; --hann-chip: rgba(255, 255, 255, .12); --hann-acc: #5CC79A; }
:root[data-theme="dark"] .hann-event { --hann-bg: #17271F; --hann-fg: #B9E6D2; --hann-chip: #22392D; --hann-acc: #6FCFA8; }
:root[data-theme="dark"] .hann-maintenance { --hann-bg: #33240F; --hann-fg: #FFD9A8; --hann-chip: #4A3517; --hann-acc: #F0A860; }
:root[data-theme="dark"] .hann-rules { --hann-bg: #1F2427; --hann-fg: #E6E9EB; --hann-chip: #2E353A; --hann-acc: #C4CACD; }
/* 写成 :root 开头，压过上面深色模式的类型配色。 */
:root .hann .hann-slide.is-cover, :root section.hann.is-cover { --hann-bg: #0B1F18; --hann-fg: #FFFFFF; --hann-chip: rgba(255, 255, 255, .2); --hann-acc: #FFD666; --hann-cta-bg: #FFFFFF; --hann-cta-fg: #0B1F18; --hann-ctl-bg: rgba(0, 0, 0, .28); }
.hann { position: relative; height: 104px; margin: 0 0 12px; overflow: hidden; border-radius: 16px; touch-action: pan-y; }
:root[data-theme="dark"] .hann { box-shadow: inset 0 0 0 1px var(--line); }
.hann-track { display: flex; align-items: flex-start; height: 100%; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hann-slide { position: relative; display: flex; flex: 0 0 100%; align-items: center; gap: 14px; min-width: 0; height: 100%; padding: 16px 196px 22px 18px; overflow: hidden; background: var(--hann-bg); color: var(--hann-fg); }
.hann-slide.is-cover { background: linear-gradient(90deg, rgba(4, 20, 14, .78) 0%, rgba(4, 20, 14, .35) 55%, rgba(4, 20, 14, 0) 100%), linear-gradient(0deg, rgba(4, 20, 14, .55) 0%, rgba(4, 20, 14, 0) 60%), var(--hann-img) center / cover no-repeat, var(--hann-bg); }
.hann-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hann-chip); color: var(--hann-acc); }
.hann-icon .i { width: 22px; height: 22px; stroke-width: 1.9; }
.hann-text { flex: 1; min-width: 0; }
.hann-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.5; }
.hann-type { padding: 1px 8px; border-radius: 6px; background: var(--hann-chip); color: var(--hann-acc); font-weight: 700; }
.hann-date { opacity: .75; }
.hann-title { display: block; margin-top: 4px; overflow: hidden; font-size: 16px; font-weight: 700; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.hann-sum { margin-top: 2px; overflow: hidden; font-size: 13px; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; opacity: .85; }
.hann-cta { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--hann-cta-bg, var(--hann-chip)); color: var(--hann-cta-fg, var(--hann-fg)); font-size: 13px; font-weight: 700; white-space: nowrap; }
.hann-cta:hover { color: var(--hann-cta-fg, var(--hann-fg)); }
.hann-cta .i { width: 14px; height: 14px; stroke-width: 2.4; }
/* 整条都能点进公告：按钮的伪元素铺满这一条（控件、轮播点叠在它上面）。 */
.hann-cta::after { content: ""; position: absolute; inset: 0; }
.hann-cta:focus-visible { outline: 2px solid var(--hann-acc); outline-offset: 2px; }
.hann-ctl { position: absolute; top: 50%; right: 14px; z-index: 1; display: flex; align-items: center; gap: 6px; transform: translateY(-50%); }
.hann-nav { display: flex; align-items: center; gap: 6px; }
.hann-pos { min-width: 36px; color: var(--hann-fg); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; opacity: .75; }
.hann-btn { display: flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--hann-ctl-bg, var(--hann-chip)); color: var(--hann-fg); }
.hann-btn .i { width: 16px; height: 16px; stroke-width: 2.4; }
.hann-btn:focus-visible, .hann-dot:focus-visible { outline: 2px solid var(--hann-fg); outline-offset: 2px; }
.hann-dots { position: absolute; bottom: 8px; left: 80px; z-index: 1; display: flex; align-items: center; gap: 6px; height: 8px; }
.hann-dot { width: 8px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: var(--hann-fg); opacity: .4; transition: width .3s ease, opacity .3s ease; }
.hann-dot[aria-current="true"] { width: 22px; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hann-track, .hann-dot { transition: none; }
}
@media (max-width: 860px) {
  /* 手机上轮播在排序条下面（设计稿 Mobile-Home）：主栏改成纵向排列，把它挪到排序条后面。 */
  .home-cols > .main:has(> .hann) { display: flex; flex-direction: column; }
  .home-cols > .main:has(> .hann) > * { order: 2; }
  .home-cols > .main:has(> .hann) > :is(.ob-bar, .main-head) { order: 0; }
  .home-cols > .main > .hann { order: 1; flex: none; }
  .hann { height: 176px; margin: 12px 12px 4px; }
  .hann-slide { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 14px 16px; }
  .hann-icon, .hann-pos { display: none; }
  .hann-text { flex: none; width: 100%; padding-right: 108px; }
  .hann-title { display: -webkit-box; font-size: 15px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hann-sum { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hann-cta { height: auto; padding: 0; border-radius: 0; background: none; color: var(--hann-acc); }
  .hann-cta:hover { color: var(--hann-acc); }
  .hann-ctl { top: 10px; right: 10px; transform: none; }
  .hann-dots { right: 14px; bottom: 18px; left: auto; }
  .hann-dot { height: 8px; border-radius: 4px; }
}

/* ===== 节点页的置顶轮播（设计稿「节点」「Mobile-Node」的置顶轮播，模板 node-pins，脚本 carousel.js 和首页公告同一套） =====
   16 圆角，底色是节点外观里的「置顶帖底色」（.nlook-pinned 时换成它，见文件末尾「节点外观」；没设时浅绿，深色模式下深绿）。
   一张：类型小标签（置顶是白底主题色字，精华是金色）· 作者 · 时间，标题一行、摘要一行，有图时右边 112×76 的缩略图。
   底下一行是当前这一张的赞同、评论数，多条时右边是轮播点（当前那个拉长成 16）、「n / 共几条」、上一条、下一条（30 的圆钮）。
   手机（Mobile-Node）：左右各留 12，标题最多两行、没有摘要，缩略图 72×72，底下只有轮播点（用手划）。 */
.npin { --npin-def: #EEF7F2; position: relative; margin: 0 0 12px; overflow: hidden; border-radius: 16px; background: var(--npin-def); color: var(--ink); touch-action: pan-y; }
:root[data-theme="dark"] .npin { --npin-def: #17271F; box-shadow: inset 0 0 0 1px var(--line); }
.npin-track { display: flex; align-items: flex-start; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.npin-slide { display: flex; flex: 0 0 100%; gap: 14px; min-width: 0; padding: 14px 16px 0; }
.npin-text { flex: 1; min-width: 0; }
.npin-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; line-height: 20px; white-space: nowrap; }
.npin-type { display: inline-flex; flex: none; align-items: center; gap: 3px; padding: 0 7px; border-radius: 9px; background: rgba(255, 255, 255, .75); color: var(--key, var(--primary)); font-weight: 700; }
.npin-type .i { width: 12px; height: 12px; stroke-width: 2.4; }
.npin-type.featured { background: #FBE7B5; color: #7A4E00; }
:root[data-theme="dark"] .npin-type { background: rgba(255, 255, 255, .1); color: var(--pin-ink); }
:root[data-theme="dark"] .npin-type.featured { background: #4A3517; color: #FFD9A8; }
.npin-who { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink); font-weight: 700; }
.npin-who .avatar { flex: none; width: 18px; height: 18px; font-size: 10px; }
.npin-name { overflow: hidden; text-overflow: ellipsis; }
.npin-meta time { flex: none; }
.npin-title { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow-wrap: anywhere; }
.npin-title:hover { color: var(--ink); text-decoration: underline; }
.npin-sum { margin: 2px 0 0; overflow: hidden; color: var(--soft); font-size: 13px; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
.npin-thumb { position: relative; display: flex; flex: none; width: 112px; height: 76px; overflow: hidden; border-radius: 10px; background: var(--fill); }
.npin-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.npin-foot { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 8px 16px 10px; color: var(--muted); font-size: 12px; }
.npin-stats { display: inline-flex; align-items: center; gap: 10px; }
.npin-stat { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.npin-stat .i { width: 14px; height: 14px; }
.npin-dots { display: flex; align-items: center; gap: 4px; }
.npin-dot { display: flex; align-items: center; justify-content: center; width: 16px; height: 20px; padding: 0; border: 0; background: transparent; }
.npin-dot::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--ink); opacity: .25; transition: width .3s ease, opacity .3s ease; }
.npin-dot[aria-current="true"]::before { width: 16px; opacity: .85; }
.npin-nav { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.npin-pos { min-width: 34px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.npin-btn { display: flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.npin-btn:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.npin-btn .i { width: 15px; height: 15px; stroke-width: 2.4; }
.npin :is(.npin-btn, .npin-dot, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .npin-track, .npin-dot::before { transition: none; }
}
@media (max-width: 860px) {
  .npin { margin: 12px 12px 8px; }
  .npin-slide { padding: 12px 14px 0; }
  .npin-title { font-size: 15px; -webkit-line-clamp: 2; }
  .npin-sum, .npin-nav { display: none; }
  .npin-thumb { width: 72px; height: 72px; }
  .npin-foot { padding: 8px 14px 10px; }
  .npin-dots { gap: 0; }
  .npin-dot { width: 22px; height: 28px; }
}

/* ===== 置顶的期限：主题菜单里的「置顶到 X 月 X 日 / 永久置顶」（下面一行小字「修改期限」），和选期限的弹窗（features.js 的 topic-pin）=====
   期限是一排胶囊（单选，选中的是实心深色，和全站的筛选胶囊一个样子），选「自定义日期」时下面出来日期选择器。 */
.pin-term-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.pin-term-text small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.pin-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.pin-term { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pin-term:hover { background: var(--hover); }
.pin-term input { position: absolute; opacity: 0; pointer-events: none; }
.pin-term:has(input:checked) { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pin-term:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.pin-date { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; color: var(--ink); font-size: 14px; font-weight: 600; }

/* ===== 主题活动日志（主题菜单里的「活动日志」弹窗） ===== */
.tlog { display: flex; flex-direction: column; gap: 12px; }
.tlog-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tlog-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tlog-item:last-child { border-bottom: 0; }
.tlog-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--soft); }
.tlog-icon .i { width: 18px; height: 18px; }
.tlog-main { flex: 1; min-width: 0; }
.tlog-line { margin: 0; color: var(--body); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.tlog-line a { color: var(--primary-hover); }
.tlog-line strong { color: var(--ink); font-weight: 600; }
.tlog-actor { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; color: var(--ink) !important; font-weight: 600; vertical-align: top; }
.tlog-actor .avatar { width: 20px; height: 20px; font-size: 11px; }
.tlog-unknown { color: var(--muted) !important; font-weight: 400; }
.tlog-floor { font-weight: 600; white-space: nowrap; }
.tlog-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--muted); font-size: 12px; }
.tlog-backfill { padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; line-height: 18px; cursor: help; }
.tlog-empty { margin: 24px 0; color: var(--muted); text-align: center; }
.tlog-more { align-self: center; }
@media (max-width: 860px) {
  /* 手机上铺满屏幕，左上角关掉；顶栏右边不再放一个「关闭」。 */
  dialog.modal.ask.tlog-modal:not(.confirm) > .modal-head > .modal-head-confirm { display: none; }
}

/* ===== 被删的回帖（设计稿 Post / Mobile-Post「已删除」） =====
   头像换成垃圾桶、名字写「已删除」，正文换成一块占位；作者本人和管理者能展开看原内容。 */
.del-face { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--outline-text); }
.reply-face.del-face { width: 28px; height: 28px; }
.del-face .i { width: 16px; height: 16px; }
.reply-head .author.del-name { color: var(--muted); }
.del-note { margin: 2px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.del-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 13px; }
.del-line > .i { flex: none; width: 15px; height: 15px; }
.del-text { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.del-peek { display: inline-flex; flex: none; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); color: var(--ink); font: 700 12px/1 var(--font); cursor: pointer; }
.del-peek:hover { background: var(--hover); }
.del-orig { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--bg); }
.del-orig[hidden] { display: none; }
.del-orig-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.del-badge { padding: 0 6px; border-radius: 8px; background: var(--level-bg); color: var(--level-fg); font-weight: 700; line-height: 18px; }
.del-orig-body { margin-top: 6px; color: var(--muted); font-size: 14px; }
.del-orig-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.del-orig-note { flex: 1 1 200px; color: var(--outline-text); font-size: 12px; line-height: 1.5; }
.del-restore.btn.small { height: 30px; border-radius: 15px; font-weight: 700; }

/* ===== 编辑历史（设计稿「编辑历史」：帖子上的「已编辑」、弹窗） =====
   首帖：宽屏跟在顶上那一行的发布时间后面（虚线下划线），手机是标签那一行最后的胶囊「已编辑 N 次」；回帖跟在时间后面，颜色淡一档。
   弹窗：宽屏 920×680 居中，左边版本列表、右边内容；手机从底部升起（92% 高），版本横着排。新增绿底、删除红底带删除线。 */
:root {
  --edh-ins-bg: #D3F5E3; --edh-ins: #0B5A3C; --edh-ins-ring: #8FD3B0;
  --edh-del-bg: #FFE1DC; --edh-del: #A3271A; --edh-del-ring: #F3A79B; --edh-del-line: rgba(163, 39, 26, .55);
  --edh-sel-bg: #E8F3EE; --edh-sel-line: #9FD6BE; --edh-mod-bg: #E7EEFF; --edh-mod: #2F5BEA;
  --edh-rule: #EDF1F3; --edh-list: #FAFBFC; --edh-off: #B5C3C9; --edh-shadow: 0 24px 64px rgba(11, 31, 24, .28);
}
:root[data-theme="dark"] {
  --edh-ins-bg: #173A2A; --edh-ins: #7EE2A8; --edh-ins-ring: #2F7A55;
  --edh-del-bg: #43201C; --edh-del: #FF9B8F; --edh-del-ring: #8A3A31; --edh-del-line: rgba(255, 155, 143, .6);
  --edh-sel-bg: #18302A; --edh-sel-line: #2F7A5C; --edh-mod-bg: #1C2541; --edh-mod: #9DB4FF;
  --edh-rule: #262A2E; --edh-list: #181B1E; --edh-off: #4F575C; --edh-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.edited-btn, .edited-text { display: inline-flex; align-items: center; gap: 3px; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; vertical-align: baseline; }
.edited-btn { text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.edited-btn:hover { color: var(--ink); text-decoration-style: solid; }
:is(.edited-btn, .edited-text, .edited-chip) .i { width: 12px; height: 12px; stroke-width: 2; }
.reply-edited.edited-btn, .reply-edited.edited-text { padding: 0; color: var(--outline-text); text-decoration: none; }
.reply-edited .i { width: 11px; height: 11px; }
.edited-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: inherit; font-size: 12px; white-space: nowrap; }
button.edited-chip { cursor: pointer; }
button.edited-chip:hover { color: var(--ink); background: var(--hover); }

dialog.edh { width: min(920px, calc(100vw - 32px)); height: min(680px, calc(100vh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: var(--edh-shadow); }
dialog.edh[open] { display: flex; flex-direction: column; animation: pop .18s ease-out; }
dialog.edh::backdrop { background: var(--scrim); }
.edh-grip { display: none; }
.edh-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--edh-rule); }
.edh-head-text { flex: 1; min-width: 0; }
.edh-head h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; }
.edh-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.edh-close { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.edh-close:hover { background: var(--hover); }
.edh-close .i { width: 22px; height: 22px; stroke-width: 1.75; }
.edh-main { flex: 1; min-height: 0; display: flex; }
.edh-vers { flex: none; display: flex; flex-direction: column; gap: 10px; width: 270px; padding: 12px; box-sizing: border-box; overflow-y: auto; border-right: 1px solid var(--edh-rule); background: var(--edh-list); }
.edh-vers[hidden] { display: none; }
.edh-v { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.edh-v:hover { background: var(--hover); }
.edh-v[aria-selected="true"] { border-color: var(--edh-sel-line); background: var(--edh-sel-bg); }
/* 时间线：每一版的头像往下连到下一张（更旧的）卡片，最旧的那张不连。 */
.edh-v:not(:last-child)::after { content: ""; position: absolute; left: 25px; top: 40px; bottom: -10px; width: 2px; background: var(--line); }
.edh-v-face { position: relative; z-index: 1; flex: none; display: flex; }
.edh-v-face .avatar { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; }
.edh-v-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.edh-v-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.edh-v-n { color: var(--muted); font-size: 13px; }
.edh-v[aria-selected="true"] .edh-v-n { color: var(--primary); }
.edh-v-time { color: var(--muted); font-size: 12px; }
.edh-v-who { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.edh-v-reason { color: var(--soft); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.edh-v-reason.none { color: var(--outline-text); }
.edh-v-sum { color: var(--outline-text); font-size: 11px; font-variant-numeric: tabular-nums; }
.edh-v-meta, .edh-badge.mod.narrow { display: none; }
.edh-badge { display: inline-flex; align-items: center; gap: 2px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.edh-badge.cur { background: var(--primary-bg); color: var(--on-primary); }
.edh-badge.orig { background: var(--fill); color: var(--soft); }
.edh-badge.mod { height: 16px; padding: 0 5px; border-radius: 8px; background: var(--edh-mod-bg); color: var(--edh-mod); }
.edh-badge .i { width: 10px; height: 10px; }
.edh-view { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 28px; }
.edh-view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.edh-view-text { flex: 1 1 200px; min-width: 0; }
.edh-ver { color: var(--ink); font-size: 15px; font-weight: 700; }
.edh-ver-sub { margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.edh-modes { flex: none; display: inline-flex; padding: 3px; border-radius: 18px; background: var(--edh-rule); }
.edh-modes[hidden] { display: none; }
.edh-modes button { height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.edh-modes button[aria-selected="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 26, 28, .12); }
.edh-modes button[aria-disabled="true"] { color: var(--edh-off); cursor: default; }
.edh-title { margin-bottom: 10px; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.edh-title[hidden] { display: none; }
.edh-body { color: var(--body); font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.edh-para { margin: 0 0 10px; white-space: pre-wrap; }
.edh-ins, .edh-del { padding: 1px 2px; border-radius: 3px; text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.edh-ins { background: var(--edh-ins-bg); color: var(--edh-ins); }
.edh-del { background: var(--edh-del-bg); color: var(--edh-del); text-decoration: line-through; text-decoration-color: var(--edh-del-line); }
.edh-fold { display: block; margin: 10px 0; padding: 0 0 0 10px; border: 0; border-left: 2px solid var(--line); background: none; color: var(--outline-text); font: inherit; font-size: 12px; line-height: 1.6; text-align: left; }
button.edh-fold { cursor: pointer; }
button.edh-fold:hover { color: var(--ink); }
.edh-body > :first-child { margin-top: 0; }
.edh-empty { margin: 24px 0; color: var(--muted); text-align: center; }
.edh-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 40px; padding: 12px 20px; border-top: 1px solid var(--edh-rule); }
.edh-foot[hidden], .edh-foot [hidden] { display: none; }
.edh-foot .grow { flex: 1; }
.edh-legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.edh-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.edh-swatch { width: 10px; height: 10px; border-radius: 3px; }
.edh-swatch.ins { background: var(--edh-ins-bg); box-shadow: inset 0 0 0 1px var(--edh-ins-ring); }
.edh-swatch.del { background: var(--edh-del-bg); box-shadow: inset 0 0 0 1px var(--edh-del-ring); }
.edh-note { color: var(--outline-text); font-size: 12px; }
.edh-restore { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.edh-restore:hover { background: var(--hover); }
.edh-restore:disabled { opacity: .6; cursor: default; }
.edh-restore .i { width: 16px; height: 16px; }
@media (max-width: 860px) {
  /* 手机：从底部升起，顶上一根拖动条；版本横着排（头像、版本号、当前 / 版主，下一行时间和改了多少）。 */
  dialog.edh { inset: auto 0 0; width: 100%; height: 92dvh; margin: 0; border-radius: 20px 20px 0 0; box-shadow: none; }
  dialog.edh[open] { animation: sheet .26s cubic-bezier(.2, .8, .2, 1); }
  .edh-grip { display: block; flex: none; align-self: center; width: 40px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--line); }
  .edh-head { gap: 8px; padding: 4px 6px 4px 16px; border-bottom: 0; }
  .edh-head h2 { font-size: 16px; }
  .edh-main { flex-direction: column; }
  .edh-vers { flex-direction: row; gap: 8px; width: auto; padding: 6px 16px 12px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--edh-rule); background: transparent; scrollbar-width: none; }
  .edh-vers::-webkit-scrollbar { display: none; }
  .edh-v { flex: none; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 6px; width: auto; min-width: 132px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--edh-rule); }
  .edh-v:hover { background: transparent; }
  .edh-v[aria-selected="true"] { background: var(--edh-sel-bg); }
  .edh-v::after { display: none; }
  .edh-v-text { display: contents; }
  .edh-v-face .avatar { width: 22px; height: 22px; font-size: 11px; }
  .edh-v-top { flex-wrap: nowrap; gap: 6px; }
  .edh-v-time, .edh-v-who, .edh-v-reason, .edh-v-sum, .edh-badge.orig { display: none; }
  .edh-badge.mod.narrow { display: inline-flex; }
  .edh-badge.cur { height: 16px; padding: 0 5px; border-radius: 8px; }
  .edh-v-meta { display: block; grid-column: 1 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .edh-view { padding: 16px 16px 24px; }
  .edh-title { font-size: 18px; }
  .edh-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { dialog.edh[open] { animation: none; } }

/* ===== 担保交易：首帖上的交易卡片、发帖时的交易设置、「我的交易」、后台的纠纷详情 ===== */
.trade-kind-pill.sell { background: var(--unread); color: var(--primary); }
.trade-kind-pill.buy { background: var(--level-bg); color: var(--level-fg); }
.trade-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 0; }
.trade-facts > div { min-width: 0; padding: 8px 12px; border-radius: 12px; background: var(--bg); }
.trade-facts dt { color: var(--muted); font-size: 12px; }
.trade-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.trade-facts > .strong dd { color: var(--primary); }
.trade-facts > .bad dd { color: var(--danger); }
.trade-pay { grid-template-columns: minmax(0, 1fr); }
.trade-pay > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; background: var(--surface); }
.trade-total { color: var(--muted); font-size: 13px; }
.trade-total.bad { color: var(--danger); }
/* 分段按钮（出售 / 求购、抽奖的等级要求）：和站里其他分段按钮一个样子（未选灰字，选中白底深色字带一点阴影）。
   里面是 <label>，要盖掉表单里 label 竖排、加粗、带间距的通用样式。 */
.compose-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.form .compose-seg label { position: relative; display: flex; flex-direction: row; align-items: center; gap: 0; height: 38px; min-height: 0; padding: 0 16px; border-radius: 19px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.compose-seg input { position: absolute; opacity: 0; pointer-events: none; }
.form .compose-seg label:has(input:checked) { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 26, 28, .16); }
.compose-seg label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.form .trade-bargain { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.trade-bargain input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; accent-color: var(--primary); }
.trade-bargain span { display: flex; flex-direction: column; gap: 2px; }
.trade-bargain strong { font-size: 15px; font-weight: 700; }
.trade-bargain small { color: var(--muted); font-size: 13px; }
/* 「我的交易」：照设计稿「我的交易」「移动端 · 我的交易」。页头右边的可提现余额、待办提醒、按状态筛的胶囊、订单卡片（五步进度、纠纷三栏）、订单详情和操作弹窗、余额页 */
:root {
  --tr-pay-bg: #FFF1E0; --tr-pay: #9A4A00; --tr-ship-bg: #E3F0F4; --tr-ship: #0E5A70; --tr-recv-bg: #ECE8FA; --tr-recv: #4C2DA6;
  --tr-done-bg: #E6F2EC; --tr-done: #00573B; --tr-off-bg: #EEF1F3; --tr-off: #576F76; --tr-bad-bg: #FBE7E0; --tr-bad: #A33A00; --tr-settled: #2A3C42;
  --tr-banner-bg: #FFF6EE; --tr-banner: #5A2600; --tr-badge: #F07A1A; --tr-dot: #C9D3D8; --tr-buyer: #0E7490;
  --tr-hero: #0B1F18; --tr-hero-soft: #9CC9B4; --tr-scrim: rgba(11, 31, 24, .45); --tr-shadow: 0 24px 64px rgba(11, 31, 24, .3);
}
:root[data-theme="dark"] {
  --tr-pay-bg: #3A2A12; --tr-pay: #FFCF94; --tr-ship-bg: #13323A; --tr-ship: #7DD3E8; --tr-recv-bg: #2A2142; --tr-recv: #C4B5FD;
  --tr-done-bg: #173326; --tr-done: #3FB98A; --tr-off-bg: #272B2F; --tr-off: #99A3A8; --tr-bad-bg: #2F211D; --tr-bad: #F28B5B; --tr-settled: #C4CACD;
  --tr-banner-bg: #2E2312; --tr-banner: #FFCF94; --tr-dot: #3A3F44; --tr-buyer: #5EC4D6;
  --tr-hero: #22262A; --tr-scrim: rgba(0, 0, 0, .6); --tr-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.main.trades-page { max-width: 1040px; padding-top: 12px; padding-bottom: 48px; }
.trades-page > .view-body { gap: 16px; }
.trade-ic { flex: none; }
.trade-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.trade-head-text { flex: 1 1 360px; min-width: 0; }
.trade-head h1.big { margin: 0; font-family: "Bricolage Grotesque", "Noto Sans SC", var(--font); font-size: 30px; font-weight: 800; line-height: 1.25; }
.trade-lead { margin: 6px 0 0; color: var(--muted); }
.trade-balance { display: flex; flex: none; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); text-align: left; text-decoration: none; }
.trade-balance:hover { color: var(--ink); filter: brightness(.97); }
.trade-balance > .trade-ic { color: var(--muted); }
.trade-balance-label { display: block; color: var(--muted); font-size: 12px; }
.trade-balance-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.trade-tab { display: flex; flex: none; align-items: center; gap: 6px; height: 48px; margin-bottom: -1px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.trade-tab:hover { color: var(--ink); }
.trade-tab[aria-selected="true"] { border-bottom-color: var(--primary); color: var(--ink); font-weight: 700; }
.trade-tab-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--tr-badge); color: #FFFFFF; font-size: 11px; font-weight: 700; }
.trade-banner { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--tr-banner-bg); color: var(--tr-banner); font: inherit; text-align: left; cursor: pointer; }
.trade-banner:hover { filter: brightness(.97); }
.trade-banner-text { flex: 1; min-width: 0; }
.trade-banner > strong { font-weight: 700; white-space: nowrap; }
.trade-section { display: flex; flex-direction: column; gap: 12px; }
.trade-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.trade-chip { display: flex; flex: none; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.trade-chip:hover { filter: brightness(.95); }
.trade-chip.dim { opacity: .45; }
.trade-chip[aria-pressed="true"] { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); opacity: 1; }
.trade-chip-n { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
.trade-intro { margin: 0; color: var(--muted); font-size: 13px; }
.trade-list { display: flex; flex-direction: column; gap: 12px; }
.trade-empty { padding: 48px 24px; border: 1px dashed var(--tr-dot); border-radius: 16px; color: var(--muted); text-align: center; }
.trade-btn.trade-more { align-self: center; }
/* 按钮：主操作绿底、次要灰底、有风险的红字；弹窗底下的大一号。 */
.trade-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 4px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; transition: filter .18s ease, scale .12s ease; }
.trade-btn:hover { filter: brightness(.95); }
.trade-btn:active { scale: .95; }
.trade-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; scale: 1; }
.trade-btn.primary { background: var(--primary-bg); color: var(--on-primary); }
.trade-btn.danger { background: transparent; color: var(--danger); }
.trade-btn.danger:hover { background: var(--tr-bad-bg); filter: none; }
.trade-btn.danger-solid { background: var(--danger); color: var(--bg); }
.trade-btn.ghost { padding: 0 12px; background: transparent; color: var(--ink); }
.trade-btn.ghost:hover { background: var(--hover); filter: none; }
.trade-btn.big { height: 44px; padding: 0 20px; border-radius: 22px; font-size: 14px; }
.trade-btn.big:is(.primary, .danger-solid) { padding: 0 22px; }
.trade-btn.tiny { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; }
/* 状态胶囊 */
.trade-status { flex: none; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 24px; white-space: nowrap; }
.trade-status.pay { background: var(--tr-pay-bg); color: var(--tr-pay); }
.trade-status.ship { background: var(--tr-ship-bg); color: var(--tr-ship); }
.trade-status.recv { background: var(--tr-recv-bg); color: var(--tr-recv); }
.trade-status.done { background: var(--tr-done-bg); color: var(--tr-done); }
.trade-status.off { background: var(--tr-off-bg); color: var(--tr-off); }
.trade-status.bad { background: var(--tr-bad-bg); color: var(--tr-bad); }
.trade-status.settled { background: var(--tr-off-bg); color: var(--tr-settled); }
/* 订单卡片 */
.trade-order { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); scroll-margin: 96px; }
.trade-order.is-todo { border: 1.5px solid var(--primary); }
.trade-order.focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
.trade-order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.trade-order-title { flex: 1 1 240px; min-width: 0; overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.trade-order-title:hover { color: var(--primary); }
.trade-flag { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 0 8px; border-radius: 10px; background: var(--fill); color: var(--soft); font-size: 11px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.trade-flag.is-todo { background: var(--tr-pay-bg); color: var(--tr-pay); }
.trade-order-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-sum { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(4, minmax(110px, 1fr)); gap: 8px 16px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.trade-sum-cell { min-width: 0; }
.trade-sum-label { color: var(--muted); font-size: 12px; }
.trade-sum-value { margin-top: 2px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trade-sum-cell.total .trade-sum-value { font-size: 16px; }
.trade-sum-extra { margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trade-party { display: flex; min-width: 0; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; text-decoration: none; }
.trade-party:hover { color: var(--primary-hover); }
.trade-party > .avatar { flex: none; font-size: 11px !important; }
.trade-party > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-steps { display: flex; align-items: flex-start; margin-top: 14px; }
.trade-step { display: flex; flex: none; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.trade-step-dot { display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; border: 2px solid var(--tr-dot); border-radius: 50%; background: var(--bg); color: var(--outline-text); font-size: 11px; font-weight: 700; line-height: 1; }
.trade-step-label { color: var(--outline-text); font-size: 12px; font-weight: 500; white-space: nowrap; }
.trade-step.done .trade-step-dot { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.trade-step.done .trade-step-label { color: var(--ink); }
.trade-step.current .trade-step-dot { border-color: var(--primary); color: var(--primary); }
.trade-step.current .trade-step-label { color: var(--ink); font-weight: 700; }
.trade-step.bad .trade-step-dot { border-color: var(--danger); background: var(--danger); color: var(--bg); }
.trade-step.bad .trade-step-label { color: var(--danger); font-weight: 700; }
.trade-step-bar { flex: 1; min-width: 12px; height: 2px; margin: 10px -16px 0; border-radius: 1px; background: var(--line); }
.trade-step-bar.on { background: var(--primary); }
.trade-dispute { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.trade-dispute-col { min-width: 0; padding: 12px 14px; border-radius: 12px; }
.trade-dispute-col.is-reason { background: var(--tr-banner-bg); }
.trade-dispute-col.is-reply { background: var(--surface); }
.trade-dispute-col.is-result { border: 1px solid var(--line); }
.trade-dispute-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.trade-dispute-col.is-reason .trade-dispute-label { color: var(--tr-pay); }
.trade-dispute-text { margin-top: 4px; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.trade-dispute-text.strong { color: var(--ink); font-weight: 700; }
.trade-dispute-text.bad { color: var(--danger); }
.trade-dispute-text.quiet { color: var(--muted); }
.trade-split { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.trade-split-bar { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: var(--fill); }
.trade-split-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.trade-split-legend > span { display: flex; align-items: center; gap: 6px; }
.trade-split-legend i { width: 8px; height: 8px; border-radius: 2px; }
:is(.trade-split-bar span, .trade-split-legend i).buyer { background: var(--tr-buyer); }
:is(.trade-split-bar span, .trade-split-legend i).seller { background: var(--primary); }
:is(.trade-split-bar span, .trade-split-legend i).fee { background: var(--outline); }
.trade-order-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fill); }
.trade-order-note { display: flex; flex: 1 1 300px; min-width: 0; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 13px; }
.trade-order-note > .trade-ic { margin-top: 2px; }
:is(.trade-order-note, .trade-detail-note).warn { color: var(--tr-pay); }
:is(.trade-order-note, .trade-detail-note).recv { color: var(--tr-recv); }
:is(.trade-order-note, .trade-detail-note).bad { color: var(--danger); }
.trade-order-foot > .grow { flex: 1 1 0; }
.trade-left { white-space: nowrap; }
/* 弹窗：订单详情宽一些；窄屏上从底部升起 */
dialog.trade-dialog { width: min(520px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: var(--tr-shadow); }
dialog.trade-dialog.wide { width: min(600px, calc(100vw - 32px)); }
dialog.trade-dialog[open] { display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.trade-dialog::backdrop { background: var(--tr-scrim); }
dialog.trade-dialog:focus { outline: none; }
.trade-dialog-head { display: flex; flex: none; align-items: flex-start; gap: 8px; padding: 18px 16px 12px 24px; }
.trade-dialog.wide .trade-dialog-head { align-items: center; gap: 10px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--line); }
.trade-dialog-titles { flex: 1; min-width: 0; }
.trade-dialog-titles h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.trade-dialog.wide .trade-dialog-titles h2 { margin-top: 2px; font-size: 17px; line-height: 1.35; }
.trade-dialog-sub { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.trade-dialog-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trade-dialog-x { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer; }
.trade-dialog-x:hover { filter: brightness(.95); }
.trade-dialog-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 14px; min-height: 0; padding: 4px 24px 16px; overflow-y: auto; overscroll-behavior: contain; }
.trade-dialog.wide .trade-dialog-body { gap: 16px; padding: 16px 24px 24px; }
.trade-dialog-foot { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 24px 20px; border-top: 1px solid var(--line); }
.trade-dialog.wide .trade-dialog-foot { padding: 12px 24px; }
.trade-confirm-box { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--soft); }
.trade-sheet-note { margin: 0; color: var(--muted); font-size: 13px; }
.trade-reasons { display: flex; flex-direction: column; gap: 8px; }
.trade-reason { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.trade-reason:hover { background: var(--hover); }
.trade-reason[aria-checked="true"] { padding: 0 13px; border: 2px solid var(--primary); background: var(--unread); }
.trade-reason-dot { flex: none; width: 18px; height: 18px; border: 2px solid var(--outline); border-radius: 50%; transition: border-width .12s ease; }
.trade-reason[aria-checked="true"] .trade-reason-dot { border: 5px solid var(--primary); }
.trade-field { display: flex; flex-direction: column; gap: 6px; }
.trade-field-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; }
.trade-field-count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.trade-field-hint { color: var(--muted); font-size: 12px; }
.trade-field textarea { min-height: 0; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 12px; font: inherit; line-height: 1.55; resize: vertical; }
.trade-amount { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 8px 0 16px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
.trade-amount-prefix { font-size: 20px; font-weight: 700; }
.trade-amount input[type="text"] { flex: 1; width: auto; min-width: 0; height: 48px; min-height: 0; padding: 0; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-amount .trade-btn.tiny { height: 34px; border-radius: 17px; }
input[type="text"].trade-address { height: 44px; min-height: 0; font-family: var(--mono); font-size: 13px; }
.trade-form-error { color: var(--danger); font-size: 13px; }
/* 纠纷的截图证据（设计稿「我的交易」弹窗里的「上传截图或聊天记录」）：虚线框的上传按钮，下面一排缩略图。 */
.td-evidence { display: flex; flex-direction: column; gap: 8px; }
.td-upload { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px dashed var(--outline); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.td-upload:disabled { opacity: .5; cursor: not-allowed; }
.td-upload.busy { cursor: progress; }
.td-upload-hint { color: var(--muted); font-weight: 400; }
.td-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.td-evidence .td-shots { margin-top: 0; }
.td-shot { position: relative; display: block; flex: none; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.td-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.td-shot-x { position: absolute; top: 2px; right: 2px; display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(11, 31, 24, .72); color: #fff; cursor: pointer; }
.td-shots-count { margin-top: 4px; color: var(--muted); font-size: 12px; }
.trade-detail-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trade-detail-who .quiet { color: var(--muted); font-size: 13px; }
.trade-detail-name { font-weight: 700; text-decoration: none; }
.trade-detail-who > .grow { flex: 1; }
.trade-detail-dm { font-size: 13px; font-weight: 700; text-decoration: none; }
.trade-detail-note { display: flex; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; }
.trade-detail-table { border: 1px solid var(--line); border-radius: 12px; }
.trade-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--fill); }
.trade-detail-row:last-child { border-bottom: 0; }
.trade-detail-row > span { color: var(--muted); }
.trade-detail-row > strong { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.trade-detail-block > strong { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.trade-detail-block-head { display: flex; align-items: center; margin-bottom: 6px; }
.trade-detail-block-head > strong { flex: 1; font-size: 13px; font-weight: 700; }
.trade-detail-block .trade-delivery { padding: 12px 14px; border-radius: 12px; background: var(--surface); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.trade-detail-hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.trade-detail-block.dispute { display: flex; flex-direction: column; gap: 8px; }
.trade-detail-block.dispute > strong { margin-bottom: 0; }
.trade-detail-block.dispute .trade-dispute-col { padding: 10px 12px; border-radius: 10px; }
.trade-detail-block.dispute .trade-dispute-text { margin-top: 0; }
.trade-timeline { margin: 0; padding: 0; list-style: none; }
.trade-timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.trade-timeline li:not(:last-child)::before { position: absolute; top: 14px; bottom: 0; left: 5px; width: 2px; background: var(--fill); content: ""; }
.trade-timeline li:last-child { padding-bottom: 0; }
.trade-timeline-dot { position: relative; flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--tr-dot); }
.trade-timeline li.now .trade-timeline-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--tr-done-bg); }
.trade-timeline-text { flex: 1; min-width: 0; }
.trade-timeline-text strong { display: block; font-weight: 500; }
.trade-timeline li.now .trade-timeline-text strong { font-weight: 700; }
.trade-timeline-text time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* 余额 */
.trade-hero { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 24px; border-radius: 20px; background: var(--tr-hero); color: #FFFFFF; }
.trade-hero-main { flex: 1 1 260px; min-width: 0; }
.trade-hero-label { color: var(--tr-hero-soft); font-size: 13px; }
.trade-hero-value { margin-top: 4px; font-size: 40px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.trade-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.trade-hero-btn { height: 44px; padding: 0 22px; border: 0; border-radius: 22px; background: #FFFFFF; color: #0B1F18; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: filter .18s ease, scale .12s ease; }
.trade-hero-btn:hover { filter: brightness(.95); }
.trade-hero-btn:active { scale: .95; }
.trade-hero-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; scale: 1; }
.trade-hero-hint { color: var(--tr-hero-soft); font-size: 12px; }
.trade-hero-stats { display: grid; flex: 1 1 320px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; gap: 12px; }
.trade-hero-stat { min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.trade-hero-stat .trade-hero-label { font-size: 12px; }
.trade-hero-num { margin-top: 2px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-hero-note { color: var(--tr-hero-soft); font-size: 11px; }
.trade-panes { display: flex; flex-wrap: wrap; gap: 16px; }
.trade-pane { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.trade-pane.ledger { flex: 3 1 420px; }
.trade-pane.withdrawals { flex: 2 1 300px; align-self: flex-start; }
.trade-pane-head { display: flex; align-items: center; gap: 12px; min-height: 57px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.view .trade-pane-head h2 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; }
.trade-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.trade-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.trade-seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.trade-entry { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--fill); }
.trade-pane-rows > .trade-entry:last-of-type { border-bottom: 0; }
.trade-entry-ic { display: flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; }
.trade-entry-ic.in { background: var(--tr-done-bg); color: var(--primary); }
.trade-entry-ic.out { background: var(--tr-bad-bg); color: var(--danger); }
.trade-entry-text { flex: 1; min-width: 0; }
.trade-entry-kind { font-weight: 500; }
.trade-entry-ref { font-weight: 700; text-decoration: none; }
.trade-entry-text time { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trade-entry-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-entry-amount.in { color: var(--primary); }
.trade-entry-amount.out { color: var(--danger); }
.trade-pane-empty { padding: 24px 16px; color: var(--muted); font-size: 13px; }
.trade-pane-more { display: block; width: 100%; height: 44px; border: 0; border-top: 1px solid var(--fill); background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.trade-pane-more:hover { background: var(--hover); }
.trade-wd { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--fill); }
.trade-wd:last-child { border-bottom: 0; }
.trade-wd-top { display: flex; align-items: center; gap: 8px; }
.trade-wd-top > strong { flex: 1; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-wd .trade-status { padding: 0 8px; border-radius: 10px; line-height: 22px; }
.trade-wd-address { color: var(--soft); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.trade-wd-why { color: var(--danger); font-size: 12px; }
.trade-wd-note { color: var(--muted); font-size: 12px; }
.trade-wd > time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .trade-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .trade-sum-cell.party { grid-column: 1 / -1; }
  .trade-dispute { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .main.trades-page { padding-top: 4px; }
  .trades-page > .view-body { gap: 14px; }
  .trade-head h1.big { font-size: 24px; }
  .trade-lead { font-size: 13px; }
  .trade-chips { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .trade-order { padding: 14px; }
  .trade-step { width: 50px; }
  .trade-hero { padding: 20px; }
  .trade-hero-value { font-size: 34px; }
  .trade-hero-stats { flex-basis: 100%; gap: 8px; }
  .trade-hero-stat { padding: 10px; border-radius: 12px; }
  dialog.trade-dialog, dialog.trade-dialog.wide { width: 100%; max-width: 100%; max-height: 90dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog.trade-dialog.wide { max-height: 92dvh; }
  dialog.trade-dialog[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .trade-dialog-head { padding: 16px 12px 12px 16px; }
  .trade-dialog.wide .trade-dialog-head { padding: 12px 12px 12px 16px; }
  .trade-dialog-body { padding: 4px 16px 16px; }
  .trade-dialog.wide .trade-dialog-body { padding: 16px; }
  .trade-dialog-foot { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
  .trade-dialog.wide .trade-dialog-foot { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
}

/* ===== 日期选择（设计稿「组件 · 日期选择」，app.js 的 enhanceDate） ===== */
.dp { position: relative; display: flex; gap: 8px; width: 100%; min-width: 0; font-size: 14px; font-weight: 400; }
.dp-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.dp-field { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; height: 44px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
.dp-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.dp[data-invalid] .dp-field { border: 2px solid var(--danger); }
.dp-trigger { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; height: 100%; padding: 0 4px 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; outline: none; cursor: pointer; }
.dp-trigger:disabled { color: var(--muted); cursor: default; }
.dp-trigger .i { flex: none; width: 18px; height: 18px; color: var(--muted); }
.dp-text { flex: 1; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.dp[data-empty] .dp-text { color: var(--muted); }
.dp-clear { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dp-clear:hover { background: var(--fill); color: var(--ink); }
.dp-clear .i { width: 16px; height: 16px; }
/* 日期时间框：右边是时间选择器，固定宽。 */
.dp-with-time > .tp { flex: 0 0 136px; width: auto; }
.dp-away { position: fixed; inset: 0; z-index: 120; }
.dp-away.dim { background: var(--scrim); }
.dp-pop { position: fixed; z-index: 121; overflow: hidden; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; animation: pop .16s ease-out; }
.dp-pop.sheet { top: auto; right: 0; bottom: 0; left: 0; padding-bottom: env(safe-area-inset-bottom); border-radius: 20px 20px 0 0; animation: dp-up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes dp-up { from { translate: 0 100%; } to { translate: 0 0; } }
.dp-handle { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--thread); }
.dp-body { display: flex; }
.dp-pop.sheet .dp-body { flex-direction: column; }
.dp-quick { display: flex; flex: none; flex-direction: column; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--fill); }
.dp-pop.sheet .dp-quick { flex-direction: row; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--fill); }
.dp-q { flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; cursor: pointer; }
.dp-q:hover:not(:disabled) { background: var(--fill); }
.dp-q.on { background: var(--unread); color: var(--primary-hover); font-weight: 700; }
.dp-q:disabled { color: var(--thread); cursor: not-allowed; }
.dp-cal { flex: none; box-sizing: border-box; width: 308px; padding: 12px; }
.dp-pop.sheet .dp-cal { width: 100%; }
.dp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.dp-nav { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.dp-nav:hover, .dp-title:hover { background: var(--fill); }
.dp-title { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 36px; padding: 0 2px; border: 0; white-space: nowrap; border-radius: 18px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 700; cursor: pointer; }
.dp-title-arrow { display: inline-flex; color: var(--muted); transition: rotate .18s ease; }
.dp-title-arrow.up { rotate: 180deg; }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-week { margin-bottom: 2px; }
.dp-week span { display: flex; align-items: center; justify-content: center; height: 28px; color: var(--muted); font-size: 12px; }
.dp-week .weekend { color: var(--outline-text); }
.dp-grid { row-gap: 2px; border-radius: 10px; outline: none; }
.dp-cell { display: flex; justify-content: center; }
.dp-cell.band { background: var(--unread); }
.dp-cell.band-start { border-radius: 10px 0 0 10px; }
.dp-cell.band-end { border-radius: 0 10px 10px 0; }
.dp-cell.band-start.band-end { border-radius: 10px; }
.dp-day { width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.dp-pop.sheet .dp-day { width: 44px; height: 44px; }
.dp-day:hover:not(:disabled) { background: var(--fill); }
.dp-day.within:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.dp-day.other { color: var(--outline-text); }
.dp-day.today { border-color: var(--primary); font-weight: 700; }
.dp-day.on { background: var(--primary-bg); color: var(--on-primary); font-weight: 700; }
.dp-day.on:hover:not(:disabled) { background: var(--primary-hover); }
.dp-day:disabled { color: var(--thread); text-decoration: line-through; cursor: not-allowed; }
.dp-day.other:disabled { text-decoration: none; }
.dp-grid:focus-visible .dp-day.focus { box-shadow: 0 0 0 2px var(--primary); }
.dp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 0; }
.dp-month { height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.dp-month.now { border-color: var(--primary); }
.dp-month.on { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.dp-month:disabled { opacity: .4; cursor: not-allowed; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--fill); }
.dp-status { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dp-foot-actions { display: flex; gap: 8px; }
.dp-foot-btn { height: 36px; padding: 0 14px; font-size: 13px; }

/* ===== 时间选择（设计稿「组件 · 时间选择」，app.js 的 enhanceTime；触发器、面板、底栏和日期选择共用 dp- 的样式） ===== */
.tp-pop { width: 240px; padding: 8px 8px 10px; }
.tp-pop.h12 { width: 300px; }
.tp-pop.sheet { width: auto; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.tp-pop .dp-handle { margin: 0 auto 8px; }
.tp-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; padding: 0 0 8px; border-bottom: 1px solid var(--fill); }
.tp-quick .dp-q { height: 32px; padding: 0 10px; border-radius: 16px; font-variant-numeric: tabular-nums; }
.tp-cols { display: flex; gap: 2px; }
.tp-colwrap { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.tp-head { display: flex; align-items: center; justify-content: center; height: 28px; color: var(--muted); font-size: 12px; }
.tp-col { box-sizing: border-box; overflow-y: auto; padding: 0 4px; border-radius: 10px; outline: none; scroll-behavior: smooth; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.tp-col:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.tp-cell { display: flex; align-items: center; justify-content: center; width: 100%; margin-bottom: 2px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.tp-cell:hover:not(:disabled) { background: var(--fill); }
.tp-cell.on { background: var(--primary-bg); color: var(--on-primary); font-weight: 700; }
.tp-cell.on:hover:not(:disabled) { background: var(--primary-hover); }
.tp-cell:disabled { color: var(--thread); text-decoration: line-through; cursor: not-allowed; }
.tp-foot { padding: 10px 4px 0; }

/* ===== 节点管理（/n/{slug}/manage，node-manage.js）：左边一列管理菜单，右边是当前这一页 ===== */
.page > .view[data-view="node-manage"] { max-width: none; }
.view.nm-page { gap: 0; padding-top: 0; }
.view.nm-page > [data-view-title] { display: none; }
.view.nm-page > .view-body { display: block; }
.nm { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 0 32px; }
.nm-side { min-height: calc(100vh - 69px); border-right: 1px solid var(--line); }
.nm-side-in { position: sticky; top: 57px; display: flex; max-height: calc(100vh - 57px); flex-direction: column; overflow-y: auto; padding: 8px 16px 24px 0; scrollbar-width: none; }
.nm-back { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.nm-back:hover { background: var(--hover); color: var(--ink); }
.nm-node { display: flex; align-items: center; gap: 10px; padding: 12px 8px 16px; }
.nm-node > .avatar { flex: none; }
.nm-node > div { min-width: 0; }
.nm-node b { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.nm-node small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.nm-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.nm-label { padding: 4px 10px; color: var(--muted); font-size: 12px; }
.nm-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.nm-item .i { flex: none; width: 18px; height: 18px; color: var(--soft); }
.nm-item:hover { background: var(--hover); color: var(--ink); }
.nm-item[aria-current="page"] { background: var(--unread); color: var(--primary-hover); font-weight: 700; }
.nm-item[aria-current="page"] .i { color: currentColor; }
.nm-badge { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .nm-badge { color: var(--bg); }

.nm-main { display: flex; min-width: 0; max-width: 1080px; flex-direction: column; gap: 16px; padding: 16px 0 40px; }
.nm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.nm-titles { flex: 1 1 320px; min-width: 0; }
.nm-head h1 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.nm-head p { max-width: 760px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.nm-actions { display: flex; flex: none; gap: 8px; }
.nm-actions .btn { height: 40px; border-radius: 20px; }
.nm-quiet { margin: 0; color: var(--muted); font-size: 13px; }
.nm-note { margin: 0; color: var(--muted); font-size: 12px; }
.nm-sub { margin: 8px 0 -4px; font-size: 16px; }
.nm-pills { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.btn.soft { background: var(--unread); color: var(--primary-hover); }
.btn.ghost.red { color: var(--danger); }
.btn.ghost.green { color: var(--primary); }
.btn.small .i { width: 14px; height: 14px; }

.nm-card { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.nm-card.flush { gap: 0; padding: 0; overflow: hidden; }
.nm-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.nm-card-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.nm-card-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.nm-card .table { min-width: 600px; }
.nm-card .table th { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.nm-card .table td { padding: 10px 16px; font-size: 14px; }
.nm-card .table tbody tr:last-child td { border-bottom: 0; }
.nm-card .table :is(th, td):last-child { text-align: right; white-space: nowrap; }
.nm-card .table .row-actions { display: inline-flex; gap: 6px; }
.nm-card > .blank { padding: 24px 16px; }
.nm-empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.nm-empty b { display: block; color: var(--ink); }
.nm-empty p { margin: 4px 0 0; font-size: 13px; }
.nm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.nm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nm-search { position: relative; display: flex; flex: 0 1 260px; align-items: center; margin-left: auto; }
.nm-search input[type="search"] { height: 36px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-size: 13px; }
.nm-search input[type="search"]:focus { border-color: var(--primary); background: var(--bg); }
.nm-search .i { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.nm .admin-seg.small button { height: 28px; padding: 0 10px; font-size: 12px; }
.nm .admin-seg { flex-wrap: wrap; }
.nm-user { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; white-space: nowrap; }
.nm-user:hover { color: var(--primary); }
.nm-user .avatar { flex: none; }
.nm-role { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.nm-role.mod { background: var(--unread); color: var(--primary-hover); }
.nm-role.owner { background: var(--ink); color: var(--bg); }
.nm-more { display: inline-flex; height: 30px; align-items: center; gap: 2px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
.nm-more:hover { background: var(--fill); }
.nm-more .i { width: 14px; height: 14px; }
.nm-flair-add { display: inline-flex; height: 24px; align-items: center; gap: 4px; padding: 0 8px; border: 1px dashed var(--outline); border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.nm-flair-add:hover { border-color: var(--ink); color: var(--ink); }
.nm-flair-add .i { width: 12px; height: 12px; }
button.flair { border: 0; cursor: pointer; }

/* 概览 */
.nm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nm-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
a.nm-kpi:hover { border-color: var(--outline); color: var(--ink); }
.nm-kpi > span { color: var(--muted); font-size: 13px; }
.nm-kpi > b { font-size: 26px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.nm-kpi.hot > b { color: var(--danger); }
.nm-kpi > small { color: var(--muted); font-size: 12px; }
.nm-kpi .up { color: var(--primary); font-weight: 700; }
.nm-kpi .down { color: var(--danger); font-weight: 700; }
.nm-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 12px; align-items: start; }
.nm-stack { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.nm-bars { display: flex; height: 140px; align-items: flex-end; gap: 3px; }
.nm-col { flex: 1; min-width: 0; height: max(3px, calc(var(--v) * 1%)); border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--primary) 26%, transparent); }
.nm-col:hover { background: color-mix(in srgb, var(--primary) 55%, transparent); }
.nm-col.today { background: var(--primary-bg); }
.nm-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12px; }
.nm-todos { display: flex; flex-direction: column; margin: -4px 0; }
.nm-todo { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); }
.nm-todo:first-child { border-top: 0; }
.nm-todo:hover { color: var(--ink); }
.nm-todo:hover b { color: var(--primary); }
.nm-todo > span:nth-child(2) { flex: 1; min-width: 0; }
.nm-todo b { display: block; font-size: 14px; }
.nm-todo small { display: block; color: var(--muted); font-size: 12px; }
.nm-todo > .i:last-child { flex: none; color: var(--muted); }
.nm-todo-icon { display: flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface); }
.nm-todo-icon.bad { background: var(--danger-bg); color: var(--danger); }
.nm-todo-icon.ok { background: var(--unread); color: var(--primary); }
.nm-todo-icon.warn { background: var(--level-bg); color: var(--level-fg); }
.nm-people { display: flex; flex-wrap: wrap; gap: 10px 16px; }

/* 审核队列 */
.nm-qhead, .nm-qrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: start; }
.nm-qhead { padding: 10px 16px; border-top: 0; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.nm-qhead > span:last-child { text-align: right; }
.nm-qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.nm-qmeta a { color: var(--ink); font-weight: 700; }
.nm-kind { padding: 0 6px; border-radius: 4px; background: var(--fill); color: var(--soft); font-size: 11px; font-weight: 700; line-height: 18px; }
.nm-qtitle { display: block; margin-top: 4px; color: var(--ink); font-weight: 700; }
.nm-qtext { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: var(--soft); font-size: 13px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nm-qwhy small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.nm-qacts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.nm-qacts .iconbtn { width: 32px; height: 32px; }

/* 规则 */
.nm-rule { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 14px 16px; border-top: 1px solid var(--line); }
.nm-rule:first-child { border-top: 0; }
.nm-move { display: flex; flex-direction: column; }
.nm-move button { display: flex; width: 24px; height: 20px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.nm-move button:hover:not(:disabled) { background: var(--fill); color: var(--ink); }
.nm-move button:disabled { opacity: .35; cursor: default; }
.nm-num { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: var(--unread); color: var(--primary-hover); font-size: 14px; font-weight: 800; }
.nm-rule-text { padding-top: 3px; }
.nm-rule-text b { display: block; font-size: 15px; }
.nm-rule-text p { margin: 2px 0 0; color: var(--soft); font-size: 13px; white-space: pre-line; }
.nm-rule-acts { display: flex; gap: 2px; }
.nm-rule-form { display: flex; flex-direction: column; gap: 8px; grid-column: 3 / -1; }
.nm-rule-btns { display: flex; gap: 8px; }

/* 用户标识 */
.nm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; border-radius: 12px; background: var(--surface); font-size: 13px; }
.nm-bar > small { color: var(--muted); font-size: 12px; }
.nm-flairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.nm-flair { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.nm-flair .flair, .nm-flair-sample .flair { font-weight: 700; }
.nm-flair-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nm-flair-top small { color: var(--muted); font-size: 12px; }
.nm-flair-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.nm-flair-sample b { color: var(--ink); }
dialog .nm-flair-sample { margin: 0 0 12px; padding: 12px; border-radius: 10px; background: var(--surface); }
.nm-flair-acts { display: flex; align-items: center; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.nm-flair-acts > :first-child { margin-right: auto; }

/* 设置、外观、标签、邀请 */
.nm-form { display: flex; flex-direction: column; }
.nm-form > h2 { margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
.nm-form > h2:not(:first-child) { margin-top: 20px; }
.nm-form > .nm-card-foot { border-top: 0; }
.nm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px 24px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.nm-row-label b { display: block; font-size: 14px; }
.nm-row-label small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.nm-row-control { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.nm-row-control > :is(input, textarea, select, .sel) { width: 100%; }
.nm-row-control .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nm-static { width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); }
.nm-unit { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.nm-unit input { width: 160px; }
.nm-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.nm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nm-chip { display: inline-flex; height: 30px; align-items: center; gap: 2px; padding: 0 4px 0 12px; border-radius: 15px; background: var(--fill); font-size: 13px; font-weight: 700; }
.nm-chip button { display: flex; width: 24px; height: 24px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.nm-chip button:hover { background: var(--bg); color: var(--ink); }
.nm-chip-add { display: flex; flex-wrap: wrap; gap: 8px; }
.nm-chip-add input { flex: 0 1 280px; min-width: 0; }

@media (max-width: 1100px) {
  .nm-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .nm { grid-template-columns: minmax(0, 1fr); }
  .nm-side { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .nm-side-in { position: static; max-height: none; overflow: visible; padding: 4px 0 10px; }
  .nm-node { padding: 8px 4px 10px; }
  .nm-groups { display: flex; gap: 6px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .nm-group { flex-direction: row; gap: 6px; margin: 0; }
  .nm-label { display: none; }
  .nm-item { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--surface); white-space: nowrap; }
  .nm-item .i { width: 16px; height: 16px; }
  .nm-badge { margin-left: 2px; }
  .nm-main { padding-top: 12px; }
  .nm-head h1 { font-size: 22px; }
  .nm-search { flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .nm-qhead { display: none; }
  .nm-qrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .nm-qacts { justify-content: flex-start; }
  .nm-row { grid-template-columns: minmax(0, 1fr); }
  .nm-card { padding: 14px 16px; }
  .nm-card.flush { padding: 0; }
  .nm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-members .table { min-width: 0; }
  .nm-members :is(th, td):nth-child(4) { display: none; }
}
/* 手机上成员表放不下标识列，标识可以从「更多」里发 */
@media (max-width: 480px) {
  .nm-members :is(th, td):nth-child(3) { display: none; }
}

/* ===== 节点外观（nlook-）和侧栏小组件（nw-），按设计稿「节点」 ===== */
/* 节点区域（节点页、节点里的主题页）的颜色：节点主设了基础色时，整块铺成这个底色，并且在这一块上重新定义全站的颜色变量
   （定义在文件开头那两套里），浅底用浅色主题的文字、边框、填充颜色，深底用深色主题的。深色模式下底色换成它的深色样子
   （和设计稿整页反色的效果一样），文字配色跟着换。置顶帖底色同理，只作用在置顶轮播（.npin）上。哪套由服务端（和外观面板的预览）按底色亮度挑。 */
.nlook-based, .nlook-pinned .npin { color: var(--ink); }
/* 深色模式用底色的深色样子（服务端 nightColor 算好的 --nlook-*-d），照设计稿：浅底变成同色调的深底。 */
.nlook-based { --nlook-base: var(--nlook-base-l); }
.nlook-pinned { --nlook-pin: var(--nlook-pin-l); }
:root[data-theme="dark"] .nlook-based { --nlook-base: var(--nlook-base-d); }
:root[data-theme="dark"] .nlook-pinned { --nlook-pin: var(--nlook-pin-d); }
/* --bg 要压过同一元素上那套颜色变量里的 --bg（那几个选择器分数更高），所以用 !important。 */
.node-page.nlook-based, .cols.nlook-based { --bg: var(--nlook-base) !important; background: var(--bg); transition: background-color .2s ease; }
.nlook-pinned .npin { --bg: var(--nlook-pin) !important; background: var(--bg); }
/* 底色铺满内容区（从侧边栏的分割线到窗口右边、从顶栏下面到页面底），里面的内容照旧限宽居中。 */
@media (min-width: 861px) {
  .page > .node-page.nlook-based, .page > .cols.nlook-based { max-width: none; min-height: calc(100vh - 57px); margin: -12px -16px -40px -24px; padding: 12px 16px 40px 24px; }
  :root:not([data-feed="compact"]) .page > .node-page.nlook-based > * { max-width: 1124px; margin-inline: auto; }
}
@media (max-width: 860px) {
  .page > .node-page.nlook-based, .page > .cols.nlook-based { min-height: calc(100vh - 56px); margin-bottom: -96px; padding-bottom: 96px; }
}

/* 横幅的 6 个预设（编号存在 nodes.banner_preset）。0 跟随主题色：从主题色压暗到主题色本身。 */
.node-banner { position: relative; }
.node-head { position: relative; }
.tinted :is(.node-banner, .nlook-swatch).nlook-ban-0, .nlook-panel .nlook-ban-0 { background: linear-gradient(135deg, color-mix(in oklab, var(--key) 45%, #000) 0%, var(--key) 100%); }
@supports (color: hsl(from red h s l)) {
  .tinted :is(.node-banner, .nlook-swatch).nlook-ban-0, .nlook-panel .nlook-ban-0 { background: linear-gradient(135deg, hsl(from var(--key) h s 14%) 0%, var(--key) 100%); }
}
:is(.node-banner, .nlook-swatch).nlook-ban-1 { background: linear-gradient(120deg, #DDE9E3 0%, #B8D8E8 55%, #F3E3C3 100%); }
:is(.node-banner, .nlook-swatch).nlook-ban-2 { background: radial-gradient(circle at 18% 30%, #1E5A7A 0, transparent 45%), linear-gradient(135deg, #0B1F18, #16324A); }
:is(.node-banner, .nlook-swatch).nlook-ban-3 { background: repeating-linear-gradient(0deg, rgba(15, 26, 28, .07) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(15, 26, 28, .07) 0 1px, transparent 1px 22px), #F7F3EA; }
:is(.node-banner, .nlook-swatch).nlook-ban-4 { background: linear-gradient(100deg, #FFB86B 0%, #F0745A 55%, #8E3B6E 100%); }
:is(.node-banner, .nlook-swatch).nlook-ban-5 { background: repeating-linear-gradient(135deg, #0F2A22 0 14px, #143A2D 14px 28px); }
/* 头部的编辑入口：横幅右下角「编辑横幅」，头像右下角换图标的小圆按钮（只有节点主和管理人员有）。 */
.nlook-banner-edit { position: absolute; z-index: 1; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .92); color: #0F1A1C; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 26, 28, .2); }
.nlook-banner-edit:hover { background: #FFFFFF; color: #0F1A1C; }
.nlook-banner-edit .i { width: 16px; height: 16px; }
.nlook-face { position: relative; display: inline-flex; flex: none; }
.nlook-face-edit { position: absolute; right: -4px; bottom: 0; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 3px solid var(--bg); border-radius: 50%; background: var(--chip-on-bg); color: var(--chip-on-fg); }
.nlook-face-edit .i { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .nlook-banner-edit { right: 8px; bottom: auto; top: 8px; height: 32px; padding: 0 12px; }
  .nlook-face-edit { right: -6px; bottom: -2px; width: 28px; height: 28px; border-width: 2px; }
  .nlook-face-edit .i { width: 13px; height: 13px; }
}

/* 侧栏的小组件：一条分隔线、标题（管理者有编辑铅笔）和内容。 */
.nw-widget { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.nw-head { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.nw-head .panel-label { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.nw-pencil { width: 32px; height: 32px; background: var(--fill); }
.nw-pencil .i, .nlook-settings .iconbtn .i { width: 14px; height: 14px; }
.nw-empty { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--outline); border-radius: 10px; color: var(--muted); font-size: 12px; }
.panel .nw-text { margin-top: 6px; color: var(--soft); white-space: pre-line; overflow-wrap: anywhere; }
.nw-buttons, .nw-nodes, .nw-events { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.nw-button { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--ink); border-radius: 20px; color: var(--ink); font-size: 13px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.nw-button:hover { background: var(--fill); color: var(--ink); }
.nw-button.fill { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.tinted .nw-button.fill { border-color: var(--key); background: var(--key); color: var(--key-ink); }
.nw-button.fill:hover { filter: brightness(.95); }
.nw-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.nw-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--fill); }
.nw-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 「图片链接」小组件：一张图加一行说明，整块可点。 */
.nw-imagelink { display: block; margin-top: 8px; color: var(--ink); }
.nw-imagelink img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--fill); }
.nw-imagelink span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.nw-imagelink:hover span { text-decoration: underline; }
.nw-node { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.nw-node-name { display: flex; flex: 1; min-width: 0; flex-direction: column; color: var(--ink); line-height: 1.35; }
.nw-node-name:hover { color: var(--ink); }
.nw-node .btn.toggle { min-width: 0; height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12px; }
.tinted .nw-node .btn.toggle:not(.on) { border-color: var(--key); background: var(--key); color: var(--key-ink); }
.nw-event { display: flex; align-items: center; gap: 12px; }
.nw-date { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); line-height: 1.1; }
.nw-date span { color: var(--primary); font-size: 10px; font-weight: 700; }
.tinted .nw-date span { color: var(--key); }
:root[data-theme="dark"] .tinted:not(.nlook-dk-light) .nw-date span, :root:not([data-theme="dark"]) .nlook-dark .nw-date span { color: var(--primary); }
.nw-date b { font-size: 18px; }
.nw-event-text { display: flex; flex: 1; min-width: 0; flex-direction: column; overflow-wrap: anywhere; }
.nw-event-text b { font-size: 13px; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* 侧栏最底下的「节点设置」。 */
.nlook-settings { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.nlook-settings .panel-label { margin: 0; }
.nlook-set-row { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; }
.nlook-set-text { flex: 1; min-width: 0; color: var(--ink); }
.nlook-set-text small { display: block; }
.nlook-settings .iconbtn { width: 40px; height: 40px; }
.nw-edit-all { margin-top: 8px; background: var(--primary-bg); color: var(--on-primary); }
.tinted .nw-edit-all { background: var(--key); color: var(--key-ink); }
.nw-edit-all .i { width: 16px; height: 16px; }

/* 外观面板：左下角的浮层，不挡页面（不是模态），可以收起来看效果；手机上是底部弹层。 */
.nlook-panel { position: fixed; z-index: 66; left: 24px; bottom: 24px; display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: hidden; border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: 0 16px 48px rgba(15, 26, 28, .22), 0 0 0 1px var(--line); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
:root[data-theme="dark"] .nlook-panel { box-shadow: 0 16px 48px rgba(0, 0, 0, .55), 0 0 0 1px var(--line); }
.nlook-panel-head { display: flex; flex: none; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.nlook-panel-head h2 { flex: 1; min-width: 0; font-size: 16px; }
.nlook-panel-head .iconbtn { width: 36px; height: 36px; }
.nlook-panel-head .iconbtn.filled .i, .nlook-panel-head .iconbtn .i { width: 18px; height: 18px; }
.nlook-panel-head [data-collapse] .i { transition: transform .2s ease; }
.nlook-panel.collapsed [data-collapse] .i { transform: rotate(180deg); }
.nlook-panel.collapsed :is(.nlook-panel-body, .nlook-dark-row, .nlook-panel-foot) { display: none; }
.nlook-panel.collapsed .nlook-panel-head { border-bottom: 0; }
.nlook-panel-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; min-height: 0; padding: 8px 16px 16px; overflow: auto; overscroll-behavior: contain; }
.nlook-view { display: flex; flex-direction: column; gap: 14px; }
.nlook-view.home { gap: 2px; }
.nlook-row { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.nlook-row:hover { background: var(--hover); }
.nlook-row > span:first-child { flex: 1; }
.nlook-row .i { width: 16px; height: 16px; color: var(--muted); }
.nlook-row-value { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.nlook-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .16); }
.nlook-mini-face { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--key); color: var(--key-ink); font-size: 12px; font-weight: 700; }
.nlook-mini-face img { width: 100%; height: 100%; object-fit: cover; }
.nlook-mini-banner { flex: none; width: 64px; height: 22px; border-radius: 6px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .08); }
.nlook-note { margin: 8px 12px 0; color: var(--muted); font-size: 12px; }
.nlook-big-face { position: relative; align-self: center; margin-top: 8px; }
.nlook-big-face > span { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; overflow: hidden; border-radius: 50%; background: var(--key); color: var(--key-ink); font-size: 48px; font-weight: 700; }
.nlook-big-face > span.two { font-size: 38px; }
.nlook-big-face img { width: 100%; height: 100%; object-fit: cover; }
.nlook-big-face button { position: absolute; right: -6px; bottom: 0; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 3px solid var(--bg); border-radius: 50%; background: var(--soft); color: var(--bg); }
.nlook-big-face button .i { width: 15px; height: 15px; }
.nlook-seg { display: flex; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.nlook-seg button { flex: 1; height: 38px; border: 0; border-radius: 19px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.nlook-seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.nlook-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.nlook-field small { font-weight: 400; }
.nlook-field input[type="text"] { height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); font-size: 15px; font-weight: 400; }
.nlook-upload { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px; border: 1px dashed var(--outline); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: center; cursor: pointer; }
.nlook-upload:hover { background: var(--fill); }
.nlook-upload b { font-size: 14px; }
.nlook-upload small { font-size: 12px; }
.nlook-upload .i { width: 24px; height: 24px; }
.nlook-hint { color: var(--muted); font-size: 12px; }
/* 外观面板里「深色模式下的图标 / 横幅」：缩略图放在固定的深色底上，看得出深色模式下的样子；旁边上传、删除。 */
.nlook-dark-img { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.nlook-dark-pick { display: flex; align-items: center; gap: 10px; }
.nlook-dark-thumb { display: flex; flex: none; align-items: center; justify-content: center; overflow: hidden; background: #141618; color: #99a3a8; font-size: 11px; }
.nlook-dark-thumb.logoDark { width: 52px; height: 52px; border-radius: 50%; }
.nlook-dark-thumb.bannerDark { width: 104px; height: 36px; border-radius: 8px; }
.nlook-dark-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nlook-dark-thumb .quiet { color: #99a3a8; }
.nlook-dark-upload { display: inline-flex; flex: 1; min-width: 0; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px dashed var(--outline); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.nlook-dark-upload:hover { background: var(--fill); }
.nlook-dark-upload .i { flex: none; width: 18px; height: 18px; }
.nlook-dark-remove { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--danger); }
.nlook-dark-remove:hover { background: var(--danger-bg); }
.nlook-dark-remove .i { width: 16px; height: 16px; }
.nlook-banner-preview { height: 74px; margin-top: 8px; border-radius: 10px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .08); }
.nlook-label { font-size: 13px; font-weight: 700; }
.nlook-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nlook-preset { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 12px; }
.nlook-preset[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.nlook-swatch { display: block; height: 36px; border-radius: 8px; }
.nlook-remove { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: transparent; color: var(--danger); font-size: 13px; font-weight: 700; }
.nlook-remove:hover { background: var(--danger-bg); }
.nlook-remove .i { width: 15px; height: 15px; }
.nlook-color-desc { margin-top: 4px; color: var(--soft); }
.nlook-color-preview { height: 64px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .1); }
.nlook-slider { display: flex; flex-direction: column; gap: 8px; }
.nlook-slider > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; }
.nlook-slider input[type="range"] { width: 100%; height: 14px; margin: 6px 0; border-radius: 7px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.nlook-slider input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 4px rgba(15, 26, 28, .4); -webkit-appearance: none; }
.nlook-slider input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 4px rgba(15, 26, 28, .4); }
.nlook-hue { background: linear-gradient(90deg, #E5484D, #E8A33D 12%, #C9D23A 22%, #4CC55E 33%, #3CC7C7 50%, #3B6BE0 66%, #9A3BE0 80%, #E03B9A 92%, #E5484D); }
.nlook-hex { display: flex; flex-direction: column; gap: 4px; padding: 8px 14px; border-radius: 14px; background: var(--fill); }
.nlook-hex > span { color: var(--muted); font-size: 12px; }
.nlook-panel .nlook-hex input, .nlook-panel .nlook-hex input:focus-visible { height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font-family: var(--mono); font-size: 15px; outline: none; }
.nlook-hex:has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 1px var(--danger); }
.nlook-error { color: var(--danger); font-size: 12px; }
.nlook-warn { padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; }
.nlook-dark-row { display: flex; flex: none; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.nlook-dark-row > .i { width: 20px; height: 20px; }
.nlook-dark-row > span { flex: 1; min-width: 0; }
.nlook-dark-row small { display: block; }
.nlook-switch { position: relative; flex: none; width: 52px; height: 32px; padding: 0; border: 0; border-radius: 16px; background: var(--outline); }
.nlook-switch::after { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 26, 28, .3); content: ""; transition: left .2s ease; }
.nlook-switch[aria-checked="true"] { background: var(--primary-bg); }
.nlook-switch[aria-checked="true"]::after { left: 23px; }
.nlook-panel-foot { display: flex; flex: none; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.nlook-panel-foot > span { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.nlook-panel-foot .btn { height: 40px; padding: 0 16px; border-radius: 20px; font-size: 13px; }
.nlook-panel-foot .btn.dark { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.nlook-panel-foot .btn.dark:disabled { opacity: .4; }
@media (max-width: 860px) {
  .nlook-panel { left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
}

/* 小组件编辑弹窗：宽屏居中，手机铺满。 */
dialog.nw-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
dialog.nw-dialog[open] { display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
dialog.nw-dialog::backdrop { background: rgba(11, 31, 24, .45); }
.nw-dialog-head { display: flex; flex: none; align-items: center; gap: 8px; padding: 16px 16px 12px 24px; }
.nw-dialog-head h2 { flex: 1; min-width: 0; font-size: 17px; }
.nw-dialog-head [data-back] { margin-left: -10px; width: 36px; height: 36px; }
.nw-dialog-head .iconbtn.filled { width: 40px; height: 40px; }
.nw-dialog-body { flex: 1 1 auto; min-height: 0; padding: 4px 24px 16px; overflow: auto; overscroll-behavior: contain; }
.nw-list, .nw-form { display: flex; flex-direction: column; gap: 10px; }
.nw-form { gap: 16px; }
.nw-details { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.nw-details:hover { background: var(--fill); }
.nw-details > span { flex: 1; min-width: 0; }
.nw-details small { display: block; }
.nw-details .i { width: 18px; height: 18px; }
.nw-item { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px; border: 1px solid var(--line); border-radius: 12px; }
.nw-move { display: flex; flex-direction: column; }
.nw-move button { display: flex; align-items: center; justify-content: center; width: 32px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.nw-move button:hover:not(:disabled) { background: var(--fill); color: var(--ink); }
.nw-move button:disabled { opacity: .3; cursor: default; }
.nw-move .i { width: 14px; height: 14px; }
.nw-item-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.nw-item-open:hover { background: var(--hover); }
.nw-item-open > span { flex: 1; min-width: 0; }
.nw-item-open b, .nw-item-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-item-open .i { width: 16px; height: 16px; color: var(--muted); }
.nw-list-empty { padding: 16px; border: 1px dashed var(--outline); border-radius: 12px; color: var(--muted); font-size: 13px; }
.nw-count { color: var(--muted); font-size: 12px; }
.nw-add { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 0; border-radius: 24px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; }
.nw-add:disabled { opacity: .4; cursor: default; }
.nw-add .i { width: 16px; height: 16px; transition: transform .2s ease; }
.nw-add[aria-expanded="true"] .i { transform: rotate(180deg); }
.nw-menu { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px; box-shadow: var(--shadow-pop); }
.nw-menu button { display: flex; flex-direction: column; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.nw-menu button:hover { background: var(--hover); }
.nw-menu small { font-size: 12px; }
.nw-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.nw-field-label { display: flex; justify-content: space-between; gap: 8px; }
.nw-field-label small { font-weight: 400; }
.nw-input { height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); font-weight: 400; }
textarea.nw-input { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.55; }
.nw-input[aria-invalid="true"] { border-color: var(--danger); }
.nw-sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.nw-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); cursor: pointer; }
.nw-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.nw-check b { flex: none; color: var(--muted); }
.nw-check span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nw-row-between { display: flex; align-items: center; gap: 12px; }
.nw-row-between > :first-child { flex: 1; font-size: 13px; font-weight: 700; }
.nw-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.nw-seg button { height: 38px; padding: 0 16px; border: 0; border-radius: 19px; background: transparent; color: var(--muted); font-size: 13px; }
.nw-seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.nw-btn-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); }
.nw-btn-card-head { display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.nw-btn-card-head > span { flex: 1; }
.nw-btn-card-head .iconbtn { width: 32px; height: 32px; color: var(--muted); }
.nw-btn-card-head .iconbtn .i, .nw-event-del .i { width: 15px; height: 15px; }
.nw-btn-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
.nw-btn-fields .nw-input { height: 40px; padding: 0 12px; border-radius: 10px; }
.nw-err { color: var(--danger); font-size: 12px; }
.nw-dashed { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 1px dashed var(--outline); border-radius: 22px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; }
.nw-dashed:disabled { opacity: .4; cursor: default; }
.nw-dashed .i { width: 16px; height: 16px; }
.nw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 500; }
.nw-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--unread); font-weight: 700; }
.nw-chip small { font-size: 11px; }
.nw-chip .i { width: 14px; height: 14px; }
.nw-imgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nw-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--fill); }
.nw-img img { width: 100%; height: 100%; object-fit: cover; }
.nw-img button { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(11, 31, 24, .75); color: #FFFFFF; }
.nw-img button .i { width: 12px; height: 12px; }
.nw-img-add { display: flex; aspect-ratio: 4 / 3; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.nw-img-add .i { width: 20px; height: 20px; }
.nw-ev-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border-radius: 12px; background: var(--surface); }
.nw-ev-item > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nw-ev-item b, .nw-ev-item small { display: block; }
.nw-event-del { width: 32px; height: 32px; color: var(--muted); }
.nw-ev-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.nw-ev-when { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; }
.nw-ev-form > .btn { align-self: flex-end; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 13px; }
.nw-ev-form > .btn:disabled { opacity: .4; background: var(--chip-on-bg); color: var(--chip-on-fg); }
.nw-dialog-foot { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 24px 20px; border-top: 1px solid var(--line); }
.nw-dialog-foot > span { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.nw-dialog-foot .nw-delete { margin-left: -12px; padding: 0 12px; background: transparent; color: var(--danger); }
.nw-dialog-foot .nw-delete:hover { background: var(--danger-bg); filter: none; }
.nw-dialog-foot .btn.dark { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.nw-dialog-foot .btn.dark:disabled { opacity: .4; }
.nw-node-search { position: relative; }
@media (max-width: 860px) {
  dialog.nw-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .nw-dialog-head { padding: 12px 12px 8px 16px; }
  .nw-dialog-body { padding: 4px 16px 16px; }
  .nw-dialog-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .nw-ev-when { grid-template-columns: minmax(0, 1fr) 120px; }
}

/* ===== 节点首页（设计稿「节点」「Mobile-Node」，模板 node-home.html，脚本 node-home.js）=====
   按钮区：发帖（描边）、通知铃铛（成员才有，四种样子）、加入、管理节点（主题色实心）、更多；铃铛和「更多」的弹出菜单；
   屏蔽提示条；右栏的「继续完善节点」、节点信息卡（铅笔、显示名称、近 7 天）、邀请管理员；左侧栏「收藏」那一组。 */
.nh-side-favs { display: contents; }
.nh-actions { align-items: center; }
.nh-actions .btn.outline { border-color: var(--ink); background: var(--bg); color: var(--ink); }
.nh-manage { background: var(--primary-bg); color: var(--on-primary); }
.nh-manage:hover { color: var(--on-primary); }
.tinted .nh-manage { background: var(--key); color: var(--key-ink); }
.nh-bell.is-normal { border-color: var(--ink); background: var(--fill); }
.nh-bell.is-muted { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.nh-bell.is-muted:hover { background: var(--danger-bg); color: var(--danger); filter: brightness(.97); }
.nh-bell .i { width: 20px; height: 20px; }

.nh-pop { width: 280px; padding: 6px; border-radius: 14px; }
.nh-pop hr { margin: 6px 4px; }
.nh-pop .nh-item { height: auto; min-height: 44px; padding: 6px 12px; border-radius: 10px; }
.nh-pop .nh-item .i { flex: none; width: 20px; height: 20px; }
.nh-item-text { flex: 1; min-width: 0; }
.nh-item-text small { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); }
.nh-item-note { flex: none; font-size: 12px; color: var(--muted); }
.nh-item[role="menuitemradio"] > .i:last-child { visibility: hidden; color: var(--primary); }
.nh-item[aria-checked="true"] > .i:last-child { visibility: visible; }
.nh-item[aria-checked="true"] .nh-item-text { font-weight: 700; }
.nh-item[aria-checked="true"] .nh-item-text small { font-weight: 400; }
.nh-more:not(.sheet) { width: 300px; }
.nh-item[data-level="muted"] > .i:first-child { color: var(--danger); }
.nh-fav.on > .i { color: var(--signal-text); fill: currentColor; }
.nh-item:disabled { color: var(--muted); cursor: not-allowed; }
.nh-item:disabled:hover { background: transparent; }
.nh-pane { display: flex; flex-direction: column; }
.nh-pane-head { display: flex; align-items: center; gap: 4px; padding: 2px 4px 6px; font-weight: 700; }
.nh-pane-head .iconbtn { width: 36px; height: 36px; }
.nh-feed-list { display: flex; flex-direction: column; max-height: min(320px, 50vh); overflow-y: auto; }
.nh-feed-row { cursor: pointer; }
.nh-feed-tile { width: 26px; height: 26px; }
.nh-feed-row input { flex: none; width: 18px; height: 18px; accent-color: var(--primary); }
.nh-feed-empty { padding: 8px 12px; }
.nh-pop-title { padding: 4px 12px 8px; font-weight: 700; text-align: center; }
.nh-pop.sheet { width: auto; max-height: 85vh; overflow-y: auto; }
.nh-pop.sheet .nh-item { min-height: 52px; font-size: 15px; }

.nh-muted { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--danger-bg); color: var(--ink); }
.nh-muted > .i { flex: none; width: 20px; height: 20px; color: var(--danger); }
.nh-muted > span { flex: 1 1 260px; min-width: 0; }
.nh-unmute { height: 36px; padding: 0 16px; border-color: var(--danger); border-radius: 18px; background: var(--bg); color: var(--danger); font-size: 13px; }
.nh-unmute:hover { color: var(--danger); }

.nh-setup { margin-bottom: 12px; }
.nh-setup-head { display: flex; align-items: center; gap: 8px; }
.nh-setup-head h2 { flex: 1; min-width: 0; font-size: 15px; }
.nh-setup-toggle { width: 32px; height: 32px; }
.nh-setup-toggle .i { width: 18px; height: 18px; transform: rotate(180deg); transition: transform .2s ease; }
.nh-setup.closed .nh-setup-toggle .i { transform: none; }
.nh-setup-body { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.nh-progress { height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.nh-progress > div { height: 100%; border-radius: 3px; background: var(--primary-bg); transition: width .3s ease; }
.tinted .nh-progress > div { background: var(--key); }
.nh-task { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--bg); }
.nh-task > span { flex: 1; min-width: 0; }
.nh-task .btn { height: 34px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 17px; background: var(--bg); color: var(--ink); font-size: 12px; }
.nh-task.done > span { color: var(--muted); text-decoration: line-through; }
.nh-task.done .btn { border-color: var(--line); background: var(--bg); color: var(--muted); }

.nh-info-head { display: flex; align-items: center; gap: 8px; }
.nh-info-head h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nh-pencil { width: 32px; height: 32px; background: var(--fill); }
.nh-pencil .i { width: 14px; height: 14px; }
.nh-display { margin-top: 4px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.nh-info > p { margin-top: 8px; overflow-wrap: anywhere; }
.nh-info > p.quiet { margin-top: 6px; }
.nh-week-link { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--ink); font-size: 13px; font-weight: 700; }
.nh-week-link:hover { color: var(--ink); }
.nh-week-link span { color: var(--muted); font-weight: 500; }
.nh-week-link .i { width: 14px; height: 14px; color: var(--muted); }
.nh-info .stats.nh-week { margin-top: 8px; }
.nh-week b { color: var(--primary); }
.nh-info .stats:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
/* 紧跟着小组件时，小组件自己的上边线就是分隔，不再画第二条。 */
.nh-info:has(+ .nw-widget) .stats:last-child { padding-bottom: 0; border-bottom: 0; }
.nh-invite-mod { color: var(--ink); }
.nh-plus-ring { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px dashed var(--outline); border-radius: 50%; color: var(--muted); }
.nh-plus-ring .i { width: 14px; height: 14px; }

.nh-details-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.nh-details-form > * { grid-column: 1 / -1; }
.nh-details-form > label:has([name="member_label"]), .nh-details-form > label:has([name="online_label"]) { grid-column: auto; }
.nh-details-hint { margin-top: -6px; color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .nh-actions { gap: 8px; }
  .nh-actions .btn.toggle { min-width: 84px; }
  .nh-manage { padding: 0 16px; }
  .nh-muted { margin: 12px 16px 0; }
  .node-lead + .cols .nh-muted { margin-bottom: 0; }
}

/* ===== 标签和用户标识（设计稿「标签与标识图标」） =====
   页面只给 --tg（颜色），三种样式的配色照设计稿的 look()：浅色是 12% 的淡底加彩字，实心是彩底白字，描边是彩框彩字。
   深色模式下彩字往白色里调（--tg-lift），淡底浓一些（--tg-tint），不然深色底上看不清。没设颜色的按灰色。 */
.tg-soft, .tg-solid, .tg-outline { --tg-c: var(--tg, #475569); --tg-ink: color-mix(in srgb, var(--tg-c), #FFFFFF var(--tg-lift)); }
.tg-soft { border: 1px solid transparent; background: color-mix(in srgb, var(--tg-c) var(--tg-tint), transparent); color: var(--tg-ink); }
.tg-solid { border: 1px solid var(--tg-c); background: var(--tg-c); color: #FFFFFF; }
.tg-outline { border: 1px solid var(--tg-ink); background: var(--bg); color: var(--tg-ink); }
/* 图标库的图标默认和界面图标一样大（侧栏里点了名的标签），标签、标识里再各自缩小。 */
.tgi { flex: none; width: 20px; height: 20px; }
.side-icon .tgi { stroke-width: 2; }
.tg { display: inline-flex; flex: none; align-items: center; gap: 4px; max-width: 100%; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; }
.tg .tgi { flex: none; width: 14px; height: 14px; }
.tg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.tg:is(.tg-soft, .tg-outline):hover { color: var(--tg-ink); }
a.tg.tg-soft:hover { background: color-mix(in srgb, var(--tg-c) calc(var(--tg-tint) + 8%), transparent); }
a.tg.tg-solid:hover { color: #FFFFFF; filter: brightness(1.1); }
a.tg.tg-outline:hover { background: color-mix(in srgb, var(--tg-c) var(--tg-tint), var(--bg)); }
/* 用户名旁边的小标识：12px 的图标、11px 的字、高 18px，图标和字间距 3px。 */
/* 节点标识（设计稿「用户名后的标识」）：20 高的圆角胶囊。 */
.tg.fl { gap: 3px; height: 20px; padding: 0 8px 0 6px; border-radius: 10px; font-size: 11px; cursor: default; }
.tg.fl .tgi { width: 12px; height: 12px; stroke-width: 2.4; }
/* 节点页的标签条：和旁边的排序胶囊一样高，选中的外面一圈。 */
.tg.tg-chip { align-self: center; height: 36px; padding: 0 14px; border-radius: 18px; }
.tg.tg-chip.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--tg-ink); }
.trow-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.trow-meta .trow-tags .tg { height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; }
.trow-meta .trow-tags .tg .tgi { width: 12px; height: 12px; }
.tag-row-meta .tg { height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; }
.tag-row-meta .tg .tgi { width: 12px; height: 12px; }
.author-line { display: inline-flex; align-items: center; gap: 6px; }

/* 节点规则（设计稿「节点」）：一整行按钮，点了展开说明；手机「规则」tab 是大号的（.rl-big，编号在灰色圆里）。 */
.rl { display: flex; flex-direction: column; margin: 4px 0 0; padding: 0; list-style: none; }
.rl-item { border-bottom: 1px solid var(--line); }
.rl-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
button.rl-row { cursor: pointer; }
.rl-num { flex: none; width: 16px; color: var(--muted); }
.rl-title { flex: 1; min-width: 0; }
.rl-chev { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--muted); transition: transform .2s ease; }
.rl-row[aria-expanded="true"] .rl-chev { transform: rotate(180deg); }
.rl-body { margin: 0 0 12px 26px; color: var(--soft); font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.rl-big .rl-row { gap: 12px; padding: 14px 0; }
.rl-big .rl-num { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); color: var(--ink); font-size: 12px; }
.rl-big .rl-title { padding-top: 1px; }
.rl-big .rl-body { margin: -4px 0 14px 36px; }
.rl-edit { margin-top: 16px; }

/* 标签和标识的新建 / 编辑弹窗（tag-look.js，节点管理和后台共用）：颜色、样式、图标、谁能用、预览。 */
.tl-dialog { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
@media (min-width: 861px) { dialog.modal.ask:has(.tl-dialog) { width: min(520px, calc(100vw - 32px)); } }
.tl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-label { font-size: 13px; font-weight: 700; }
.tl-field > input, .tl-field > textarea { width: 100%; }
.tl-field > .admin-seg { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.tl-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-swatch { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--sw); }
.tl-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sw); }
.tl-icons { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tl-icon-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl-picked { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.tl-search { display: flex; flex: 0 1 168px; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 17px; color: var(--muted); }
.tl-search input { flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.tl-search .tgi { flex: none; width: 14px; height: 14px; }
.tl-seg.small button { height: 28px; padding: 0 10px; font-size: 12px; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 188px; padding: 2px; overflow-y: auto; }
.tl-cell { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0; border-radius: 10px; }
/* 没选中的格子是白底灰线；选中的格子带着 .tg-<样式>，按当前的颜色和样式画（设计稿），外加一圈 2px 的彩框。 */
.tl-cell:not(.tg-soft, .tg-solid, .tg-outline) { border: 1px solid var(--line); background: var(--bg); color: var(--soft); }
.tl-cell:not(.tg-soft, .tg-solid, .tg-outline):hover { border-color: var(--outline); }
.tl-cell .tgi { width: 18px; height: 18px; }
.tl-cell[aria-checked="true"] { border: 2px solid var(--tg-c); }
.tl-cell-none { font-size: 11px; font-weight: 700; }
.tl-none { margin: 0; padding: 12px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; }
.tl-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--surface); }
.tl-preview-label { color: var(--muted); font-size: 12px; }
.tl-preview-who { color: var(--ink); font-size: 13px; }
.tl-preview-ctx { min-width: 0; color: var(--muted); font-size: 13px; }
b.tl-preview-ctx { color: var(--ink); font-size: 14px; }

/* 节点管理：标识卡片、分配标识的弹窗、标签表。 */
.nm-mode { display: inline-flex; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 20px; }
.nm-flair-pick { display: inline-flex; padding: 0; border: 0; background: transparent; cursor: pointer; }
.nm-flair-pick:hover .tg { filter: brightness(.95); }
.nm-pick-head { display: flex; margin-bottom: 12px; }
.nm-pick-head + .nm-search { margin: 0 0 8px; flex-basis: auto; }
.nm-pick-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.nm-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; }
.nm-pick-row:last-child { border-bottom: 0; }
.nm-pick-row:hover { background: var(--hover); }
.nm-pick-box { display: flex; flex: none; width: 20px; height: 20px; border: 2px solid var(--outline); border-radius: 6px; }
.nm-pick-list[role="radiogroup"] .nm-pick-box { border-radius: 50%; }
.nm-pick-row[aria-checked="true"] .nm-pick-box { border: 6px solid var(--primary); }
.nm-pick-list.members .nm-pick-row[aria-checked="true"] .nm-pick-box { border: 0; background: var(--primary-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.nm-pick-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.nm-pick-note { flex: none; color: var(--muted); font-size: 12px; }
.nm-pick-foot { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.nm-count { font-variant-numeric: tabular-nums; }

/* ===== 发现更多游戏（/games）和侧栏「小游戏」。照设计稿 Games / Mobile-Games；类名前缀 gm-。 =====
   游戏卡片和图标的底色是游戏自己的颜色（四组，按应用编号分），不是界面色：深色模式下照样是浅色的卡片配深色的字。 */
.gm-tone-1 { --gm-tint: #FCEBB6; --gm-icon: #E9772B; --gm-icon-ink: #FDFDFD; }
.gm-tone-2 { --gm-tint: #E3DAF7; --gm-icon: #5B3FC4; --gm-icon-ink: #FDFDFD; }
.gm-tone-3 { --gm-tint: #DCE6F5; --gm-icon: #1B2A4A; --gm-icon-ink: #C9D7FF; }
.gm-tone-4 { --gm-tint: #FBE9C8; --gm-icon: #6B3A1E; --gm-icon-ink: #FFD66B; }
.gm-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--gm-icon, #E9772B); color: var(--gm-icon-ink, #FDFDFD); font-size: 13px; font-weight: 700; line-height: 1; }
.gm-icon img { width: 100%; height: 100%; object-fit: cover; }

/* 侧栏：第一个游戏是一张蓝色的大卡片（名字、一句话介绍、多少人在玩），其余的各一行。 */
.gm-side-top { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; padding: 10px 12px; border-radius: 14px; background: #A9D2FF; color: #10202E; white-space: nowrap; }
.gm-side-top:hover { color: #10202E; filter: brightness(.97); }
.gm-side-top .gm-icon { width: 40px; height: 40px; background: #FFD66B; color: #7A3E00; font-size: 18px; }
.gm-side-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.gm-side-text > span { font-size: 12px; }
.gm-side-text > small { margin-top: 2px; font-size: 11px; color: #2B4560; }
.gm-side-more { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; }
.gm-side-more .i { width: 22px; height: 22px; }

.gm-main { display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.gm-title { margin: 0 16px; font-size: 30px; font-weight: 800; line-height: 1.25; }
.gm-daily { display: flex; flex-direction: column; gap: 12px; margin: 0 16px; }
.gm-daily-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gm-daily-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; }
.gm-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.gm-note .i { width: 15px; height: 15px; }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.gm-game { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 16px 12px 12px; border-radius: 16px; background: var(--gm-tint); color: #16202A; text-align: center; box-shadow: 0 1px 0 rgba(22, 32, 42, .08), 0 3px 10px rgba(22, 32, 42, .08); }
.gm-game .gm-icon { width: 72px; height: 72px; font-size: 30px; }
.gm-game-name { max-width: 100%; margin-top: 10px; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.gm-game-desc { display: -webkit-box; min-height: 40px; max-width: 100%; margin-top: 2px; overflow: hidden; color: #33414D; font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.gm-game-rule { width: 100%; height: 1px; margin: 10px 0; background: rgba(22, 32, 42, .12); }
.gm-game-players { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12px; font-weight: 700; }
.gm-game-players .i { width: 16px; height: 16px; }
.gm-start { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; margin-top: 10px; border-radius: 18px; background: #111517; color: #FDFDFD; font-size: 13px; font-weight: 700; }
.gm-start:hover { color: #FDFDFD; filter: brightness(1.25); }
.gm-start:active { scale: .97; }
.gm-start:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gm-all { align-self: flex-start; margin-top: -4px; }
.gm-empty { padding: 32px 24px; }

/* 带游戏的主题：就是信息流的卡片，上面和「每日游戏」之间隔一条线；顶上一行右边的「加入」是 32 高的小按钮。 */
.gm-feed { border-top: 1px solid var(--line); }
.gm-feed .card-post { padding-top: 16px; }
.gm-page .gm-feed.feed.slim .card-post .card-title { font-size: 17px; }
/* 卡片上只有标题和游戏，摘要不要（照设计稿）。信息流自己的规则带着 :root:not(…)，这里要压过它。 */
.gm-page .gm-feed.feed .card-post .card-excerpt { display: none; }
.btn.gm-join { min-width: 0; height: 32px; min-height: 32px; padding: 0 14px; border-color: var(--ink); border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; }
.gm-pulse { animation: gm-pulse 1.4s ease-out; }
@keyframes gm-pulse { 0%, 60% { background: var(--surface); } 100% { background: transparent; } }

/* 右栏「近期热门」。 */
.gm-hot.panel { padding: 16px 16px 8px; }
.gm-hot-head { display: flex; align-items: center; gap: 8px; }
.gm-hot-head h2 { flex: 1; margin: 0; }
.gm-hot-head > span { font-size: 12px; color: var(--muted); }
.gm-hot-list { display: flex; flex-direction: column; margin-top: 4px; }
.gm-hot-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.gm-hot-row:last-child { border-bottom: 0; }
.gm-hot-row:hover { color: var(--ink); }
.gm-hot-row:hover .gm-hot-title { color: var(--primary); }
.gm-hot-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.gm-hot-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gm-hot-node { font-weight: 700; color: var(--soft); }
.gm-hot-title { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.gm-hot-stats { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gm-hot-thumb { position: relative; display: flex; flex: none; align-items: center; justify-content: center; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; background: var(--fill); color: var(--muted); }
.gm-hot-thumb.is-dark { background: #1F2933; color: #C9D3D8; }
.gm-hot-thumb > .i { width: 26px; height: 26px; }
.gm-hot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-hot-badge { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(11, 31, 24, .75); color: #FFFFFF; }
.gm-hot-badge .i { width: 12px; height: 12px; }

@media (max-width: 860px) {
  /* 手机：标题 24，「每日游戏」是一排可以横着划的卡片，没有右栏。 */
  .gm-main { gap: 18px; padding-top: 10px; }
  .gm-title { font-size: 24px; }
  .gm-grid { display: flex; gap: 10px; margin: 0 -16px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
  .gm-grid::-webkit-scrollbar { display: none; }
  .gm-game { flex: none; width: 150px; }
  .gm-aside { display: none; }
}

/* ===== 我的节点（/my/nodes，设计稿「MyNodes」「Mobile-MyNodes」）===== */
.main.solo.myn { gap: 24px; padding: 24px 0 40px; }
.myn-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.myn-title { flex: 1 1 240px; min-width: 0; }
.myn-title h1.big { font-size: 28px; font-weight: 800; line-height: 1.25; }
.myn-title p { margin: 2px 0 0; font-size: 13px; }
.myn-create { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px 0 14px; border-radius: 22px; background: var(--primary-bg); color: var(--on-primary); font-size: 14px; font-weight: 700; }
.myn-create:hover { color: var(--on-primary); filter: brightness(.95); }
.myn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.myn-tabs { display: flex; flex: none; gap: 8px; }
.myn-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.myn-tab:hover { color: var(--ink); background: var(--hover); }
.myn-tab span { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.myn-tab[aria-selected="true"] { border-color: var(--chip-on-bg); background: var(--chip-on-bg); color: var(--chip-on-fg); }
.myn-tab[aria-selected="true"] span { color: var(--chip-on-fg); }
.myn-search { display: flex; flex: 1 1 200px; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 20px; background: var(--bg); color: var(--muted); cursor: text; }
.myn-search .i { width: 18px; height: 18px; }
.myn-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.myn-search:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.myn-search input:focus-visible { box-shadow: none; }
.myn-split { gap: 24px 32px; }
.myn-main { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.myn-narrow { display: none; }
.myn-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.myn-sec-title { font-size: 18px; font-weight: 700; }
.myn-sec > .myn-sec-title { margin-bottom: 12px; }
.myn-sec-title span, .myn-panel h2 span { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.myn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.myn-card { --myn-c: #007A52; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; }
.myn-cover { position: relative; height: 52px; overflow: hidden; background: linear-gradient(120deg, var(--myn-c) 0%, #10202E 140%); }
.myn-cover-ring { position: absolute; top: -40px; right: -20px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.myn-status { position: absolute; top: 12px; right: 12px; padding: 1px 9px; border-radius: 10px; background: rgba(17, 21, 23, .45); color: #FDFDFD; font-size: 11px; font-weight: 700; }
.myn-status.is-read_only, .myn-status.is-banned, .myn-status.is-archived { background: var(--level-bg); color: var(--level-fg); }
.myn-card-body { display: flex; flex: 1; flex-direction: column; padding: 0 16px 14px; }
.myn-card-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -24px; }
.myn-card-av { position: relative; display: flex; flex: none; padding: 3px; border-radius: 16px; background: var(--bg); }
.myn-card-av .avatar { border-radius: 13px; font-size: 22px !important; }
.myn-role { margin-bottom: 2px; padding: 1px 9px; border-radius: 10px; background: var(--unread); color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.myn-card-id { display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: 8px; }
.myn-card-slug { min-width: 0; overflow: hidden; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.myn-card-slug:hover { color: var(--ink); text-decoration: underline; }
.myn-card-sub { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.myn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.myn-stats > div { display: flex; min-width: 0; flex-direction: column; }
.myn-stats b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.myn-stats b.warn { color: var(--danger); }
.myn-stats small { font-size: 12px; color: var(--muted); }
.myn-stat-note { overflow: hidden; font-size: 12px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.myn-stat-note.up { color: var(--primary); }
.myn-stat-note.warn { color: var(--danger); }
.myn-setup { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--level-bg); color: var(--level-fg); }
.myn-setup-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.myn-setup-head b { flex: 1; color: var(--ink); }
.myn-setup-head a { font-weight: 700; color: var(--level-fg); }
.myn-setup-track { height: 6px; overflow: hidden; border-radius: 3px; background: color-mix(in srgb, var(--signal) 22%, transparent); }
.myn-setup-track > div { height: 100%; border-radius: 3px; background: var(--signal); }
.myn-setup-note { font-size: 12px; }
.myn-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.myn-btn { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 8px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.myn-btn:hover { color: var(--ink); filter: brightness(.95); }
.myn-btn .i { width: 16px; height: 16px; }
.myn-btn.dark { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.myn-btn.dark:hover { color: var(--chip-on-fg); }

.myn-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 20px; border: 1px dashed var(--outline); border-radius: 16px; text-align: center; }
.myn-empty b { font-size: 16px; }
.myn-empty span { font-size: 13px; color: var(--muted); }
.myn-empty-btn { display: inline-flex; align-items: center; height: 40px; margin-top: 4px; padding: 0 18px; border-radius: 20px; background: var(--fill); color: var(--ink); font-weight: 700; }
.myn-empty-btn:hover { color: var(--ink); filter: brightness(.95); }
.myn-empty-btn.primary { background: var(--primary-bg); color: var(--on-primary); }
.myn-empty-btn.primary:hover { color: var(--on-primary); }
.myn-none { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.myn-none-title { margin-bottom: 4px; font-size: 16px; font-weight: 700; color: var(--ink); }

.myn-sorts { display: flex; gap: 2px; margin-left: auto; scrollbar-width: none; }
.myn-sorts::-webkit-scrollbar { display: none; }
.myn-sort { flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 18px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.myn-sort:hover { color: var(--ink); background: var(--hover); }
.myn-sort[aria-pressed="true"] { background: var(--fill); color: var(--ink); font-weight: 700; }
/* 每一行上面一条线：整个列表往上挪 1px 藏进外框，筛掉了第一行时也不会多出一条。 */
.myn-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.myn-row { position: relative; display: flex; align-items: center; gap: 12px; margin-top: -1px; padding: 12px 12px 12px 16px; border-top: 1px solid var(--line); }
.myn-row-av { position: relative; display: flex; flex: none; }
.myn-dot { position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--primary); }
.myn-row-text { flex: 1; min-width: 0; }
.myn-row-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.myn-row-slug { min-width: 0; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.myn-row-slug:hover { color: var(--ink); text-decoration: underline; }
.myn-row-name { flex: none; color: var(--muted); font-size: 13px; }
.myn-row-top .tg { flex: none; }
.myn-pin-mark { display: inline-flex; flex: none; color: var(--signal-text); }
.myn-pin-mark .i { width: 14px; height: 14px; }
.myn-row-line { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.myn-row-line b { color: var(--primary); }
.myn-ib { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.myn-ib:hover { background: var(--hover); }
.myn-bell.is-watching { background: var(--unread); color: var(--primary); }
.myn-bell.is-normal { color: var(--muted); }
.myn-bell.is-muted { color: var(--outline-text); }
.myn-pin { color: var(--muted); }
.myn-pin[aria-pressed="true"] { color: var(--signal-text); }
.myn-pin[aria-pressed="true"] svg path { fill: var(--signal); }

.myn-aside { gap: 16px; }
.myn-panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.myn-todo-item { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.myn-todo-item:hover { color: var(--ink); }
.myn-todo-item:hover b { text-decoration: underline; }
.myn-todo-item .avatar { border-radius: 10px; }
.myn-todo-text { flex: 1; min-width: 0; line-height: 1.35; }
.myn-todo-text b { display: block; font-size: 14px; }
.myn-todo-text span { display: block; font-size: 13px; color: var(--muted); }
.myn-todo-act { flex: none; color: var(--primary); font-size: 13px; font-weight: 700; }
.myn-quota { font-size: 14px; }
.myn-bar-track { height: 8px; overflow: hidden; border-radius: 4px; background: var(--fill); }
.myn-bar-track > div { height: 100%; border-radius: 4px; background: var(--primary-bg); transition: width .3s ease; }
.myn-note { font-size: 13px; color: var(--muted); }
.myn-rec { display: flex; align-items: center; gap: 10px; }
.myn-rec-text { flex: 1; min-width: 0; line-height: 1.35; }
.myn-rec-text a { display: block; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.myn-rec-text a:hover { color: var(--ink); text-decoration: underline; }
.myn-rec-text span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.myn-rec .btn.toggle { min-width: 60px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; }
.myn-rec .btn.toggle:not(.on) { border-color: transparent; background: var(--fill); color: var(--ink); }
.myn-rec .btn.toggle.on { border-color: var(--outline); }
.myn-more-link { font-size: 13px; font-weight: 700; }

/* 「我加入的」一行的更多菜单（宽屏贴着按钮）和手机上的底部面板。 */
.myn-menu { position: fixed; z-index: 90; width: 200px; padding: 6px; border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.myn-mi { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.myn-mi:hover { background: var(--hover); color: var(--ink); }
.myn-mi.danger { color: var(--danger); font-weight: 700; }
.myn-mi-text { flex: 1; min-width: 0; }
.myn-mi-text small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.myn-menu.sheet { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 88%; overflow-y: auto; padding: 0 12px calc(16px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 28px rgba(15, 26, 28, .18); animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
.myn-menu.sheet .myn-mi { min-height: 52px; padding: 0 8px; border-radius: 12px; font-size: 15px; }
.myn-menu.sheet .myn-mi .i { width: 22px; height: 22px; }
.myn-menu.sheet hr { margin: 8px; }
.myn-menu-head { padding: 12px 8px 8px; }
.myn-menu-title { font-size: 18px; font-weight: 700; }
.myn-menu-sub { font-size: 13px; color: var(--muted); }
.myn-menu-label { padding: 8px 8px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.myn-menu.sheet .myn-level-opt { min-height: 56px; padding: 6px 8px; }
.myn-level-opt > .i:last-child { visibility: hidden; color: var(--primary); }
.myn-level-opt[aria-checked="true"] { background: var(--unread); }
.myn-level-opt[aria-checked="true"] > .i:last-child { visibility: visible; }
.myn-level-opt[aria-checked="true"] .myn-mi-text { font-weight: 700; }
.myn-level-opt[aria-checked="true"] .myn-mi-text small { font-weight: 400; }

@media (max-width: 860px) {
  .main.solo.myn { gap: 20px; padding: 16px 16px 96px; }
  .myn-title h1.big { font-size: 24px; }
  .myn-tabs { flex: 1 0 100%; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .myn-tabs::-webkit-scrollbar { display: none; }
  .myn-main { gap: 20px; }
  .myn-narrow { display: block; }
  .myn-wide { display: none; }
  .myn-grid { grid-template-columns: minmax(0, 1fr); }
  .myn-sorts { flex: 1 0 100%; margin: 0 -16px; padding: 0 16px; overflow-x: auto; }
  .myn-sort { height: 36px; }
  .myn-row { gap: 10px; padding: 12px 8px 12px 14px; }
  .myn-row .myn-bell, .myn-row .myn-pin { display: none; }
  .myn-ib.myn-more { width: 44px; height: 44px; }
}

/* ===== 我的收藏（/bookmarks，设计稿 Saved / Mobile-Saved），前缀 sv- ===== */
.main.solo.sv { padding: 24px 0 40px; }
.sv-split { gap: 16px 24px; }
.sv-main { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.sv-aside { max-width: 320px; }
.sv-head h1.big { margin: 0; font-family: "Bricolage Grotesque", var(--font); font-size: 28px; font-weight: 800; line-height: 1.25; }
.sv-sub { margin-top: 2px; color: var(--muted); }
.sv-chips, .sv-private, .sv-gap { display: none; }
.sv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.sv-types { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 22px; background: var(--fill); }
.sv-type { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 19px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.sv-type:hover { color: var(--ink); background: var(--hover); }
.sv-type[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.sv-search { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; margin: 0; padding: 0 4px 0 14px; box-sizing: border-box; border: 1px solid var(--outline); border-radius: 22px; background: var(--bg); color: var(--muted); }
.sv-search:focus-within { border-color: var(--ink); }
.sv-search .i { flex: none; width: 18px; height: 18px; }
.sv-search input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); box-shadow: none; }
.sv-search input::-webkit-search-cancel-button { display: none; }
.sv-clear { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.sv-clear[hidden] { display: none; }
.sv-clear:hover { background: var(--hover); color: var(--ink); }
.sv-clear .i { width: 16px; height: 16px; }
.sv-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; }
.sv-pill:hover { color: var(--ink); filter: brightness(.97); }
.sv-pill .i { width: 16px; height: 16px; }
.sv-manage { padding: 0 16px; }
.sv-manage[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.sv-cur { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.sv-cur h2 { margin: 0; font-size: 18px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.sv-cur > span { font-size: 13px; color: var(--muted); }
.sv-cur-more { align-self: center; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.sv-cur-more:hover { background: var(--hover); color: var(--ink); }
.sv-results { display: flex; flex-direction: column; }
.sv-list { display: flex; flex-direction: column; gap: 16px; }
.sv-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 10px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.sv-item[data-selected] { border-color: var(--primary); }
.sv-check { display: none; flex: none; align-items: center; justify-content: center; width: 32px; height: 44px; margin: -8px 0 0 -6px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sv.is-manage .sv-check { display: flex; }
.sv-check > span { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; box-sizing: border-box; border: 2px solid var(--outline); border-radius: 50%; background: var(--bg); color: var(--on-primary); }
.sv-check .i { width: 13px; height: 13px; stroke-width: 3.2; visibility: hidden; }
.sv-check[aria-checked="true"] > span { border-color: var(--primary-bg); background: var(--primary-bg); }
.sv-check[aria-checked="true"] .i { visibility: visible; }
.sv-body { flex: 1; min-width: 0; }
.sv-top { display: flex; align-items: flex-start; gap: 12px; }
.sv-text { flex: 1; min-width: 0; }
.sv-item.is-gone .sv-text { opacity: .6; }
.sv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.sv-node { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: none; }
.sv-node:hover { color: var(--ink); text-decoration: underline; }
.sv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.sv-author { color: var(--muted); text-decoration: none; }
.sv-author:hover { color: var(--ink); }
.sv-kind { padding: 0 8px; border-radius: 9px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 18px; }
.sv-kind.is-off { background: var(--level-bg); color: var(--level-fg); }
.sv-ctx { margin-top: 6px; font-size: 13px; color: var(--muted); }
.sv-ctx a { font-weight: 700; color: var(--ink); text-decoration: none; }
.sv-ctx a:hover { text-decoration: underline; }
.sv-title { display: block; margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.sv-title:hover { color: var(--ink); text-decoration: underline; }
.sv-item.is-gone .sv-title { color: var(--muted); }
.sv-excerpt { display: -webkit-box; margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--soft); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sv-quote { margin: 8px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--soft); overflow-wrap: anywhere; }
.sv-thumb { flex: none; width: 128px; height: 96px; overflow: hidden; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(15, 26, 28, .08); background: var(--fill); }
.sv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sv-note { display: flex; align-items: flex-start; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 12px; box-sizing: border-box; border: 0; border-radius: 10px; background: var(--level-bg); color: var(--level-fg); font: inherit; font-size: 13px; line-height: 1.5; text-align: left; cursor: pointer; }
.sv-note[hidden] { display: none; }
.sv-note .i { flex: none; width: 14px; height: 14px; margin-top: 3px; }
.sv-note span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 6px; min-height: 40px; font-size: 13px; color: var(--muted); }
.sv-stat { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.sv-stat .i { width: 15px; height: 15px; stroke-width: 2; }
.sv-acts { display: flex; align-items: center; margin-left: auto; margin-right: -8px; }
.sv-move { display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 150px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.sv-move .i { flex: none; width: 15px; height: 15px; stroke-width: 2; }
.sv-move span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-icon-btn { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.sv-icon-btn:hover { background: var(--hover); }
.sv-acts .sv-icon-btn { margin-left: 4px; }
.sv-icon-btn .i { width: 18px; height: 18px; }
.sv-unsave { color: var(--primary); }
.sv-unsave .i { width: 20px; height: 20px; }
.sv-empty { padding: 64px 24px; border: 1px dashed var(--outline); border-radius: 16px; text-align: center; color: var(--muted); }
.sv-empty p { margin: 4px 0 0; }
.sv-empty .sv-empty-title { margin-top: 12px; font-size: 17px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.sv-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--fill); color: var(--ink); }
.sv-empty-icon .i { width: 26px; height: 26px; }
.sv-more { margin: 16px 0 0; text-align: center; }
.sv-panel { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.sv-folders { padding: 12px 8px 8px; }
.sv-folders-head { display: flex; align-items: center; padding: 0 8px 6px 10px; }
.sv-folders-head h2 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; }
.sv-folder { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.sv-folder:hover { background: var(--hover); color: var(--ink); }
.sv-folder[aria-current="true"] { background: var(--fill); font-weight: 700; }
.sv-folder .i { flex: none; width: 18px; height: 18px; }
.sv-folder-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-folder-n { flex: none; font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-lock { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.sv-lock-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fill); color: var(--ink); }
.sv-lock-icon .i { width: 18px; height: 18px; }
.sv-lock > div { flex: 1; min-width: 0; }
.sv-lock-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.sv-stale { background: var(--surface); }
.sv-stale-title { font-size: 14px; font-weight: 700; }
.sv-stale p { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.sv-stale-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 13px; font-weight: 700; text-decoration: none; }
.sv-stale-btn:hover { color: var(--chip-on-fg); filter: brightness(1.1); }
.sv-bulk { z-index: 40; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; width: min(560px, calc(100vw - 32px)); box-sizing: border-box; padding: 8px 8px 8px 20px; border: 1px solid var(--line); border-radius: 28px; background: var(--bg); box-shadow: 0 12px 32px rgba(15, 26, 28, .18); align-items: center; gap: 8px; animation: sv-rise .24s cubic-bezier(.2, .8, .2, 1); }
.sv-bulk[hidden] { display: none; }
.sv-bulk-label { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-bulk button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 20px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sv-bulk .sv-bulk-all { padding: 0 12px; }
.sv-bulk .sv-bulk-move { background: var(--fill); }
.sv-bulk .sv-bulk-move .i { width: 15px; height: 15px; stroke-width: 2; }
.sv-bulk .sv-bulk-remove { border: 1px solid var(--danger); color: var(--danger); }
.sv-bulk button:disabled { opacity: .45; cursor: default; }
body.sv-managing .toast { bottom: 96px; }
body.sv-managing .fab { display: none !important; }
.sv-dlg { width: min(440px, calc(100vw - 32px)); max-width: none; margin: 16vh auto auto; padding: 24px; box-sizing: border-box; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-modal); }
.sv-dlg::backdrop { background: var(--scrim); }
.sv-dlg h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.sv-dlg-sub { margin: 4px 0 0; color: var(--muted); }
.sv-dlg-move { margin-top: 12px; }
.sv-dlg-cols { margin: 0 -8px; max-height: 50vh; overflow-y: auto; }
.sv-dlg-col, .sv-dlg-newcol { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.sv-dlg-col:hover, .sv-dlg-newcol:hover { background: var(--hover); }
.sv-dlg-col[aria-checked="true"] { background: var(--surface); }
.sv-dlg-col .i, .sv-dlg-newcol .i { flex: none; width: 20px; height: 20px; }
.sv-dlg-col span:first-of-type { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-dlg-cur { flex: none; font-size: 12px; color: var(--muted); }
.sv-dlg-newcol { margin: 0 -8px; width: calc(100% + 16px); color: var(--primary); font-weight: 700; }
.sv-dlg-form { margin: 16px 0 0; }
.sv-dlg-form label { display: block; }
.sv-dlg-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.sv-dlg-form input, .sv-dlg-form textarea { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); font: inherit; font-size: 16px; color: var(--ink); }
.sv-dlg-form input { height: 48px; padding: 0 14px; }
.sv-dlg-form textarea { padding: 12px 14px; line-height: 1.5; resize: none; }
.sv-dlg-count { display: block; margin-top: 4px; text-align: right; font-size: 12px; color: var(--muted); }
.sv-dlg-err { margin: 6px 0 0; color: var(--danger); font-size: 13px; }
.sv-dlg-err[hidden] { display: none; }
.sv-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sv-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.sv-btn.primary { background: var(--primary-bg); color: var(--on-primary); }
.sv-btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 860px) {
  .main.solo.sv { padding: 16px 16px 112px; }
  .sv-main { gap: 14px; max-width: none; }
  .sv-aside { display: none !important; }
  .sv-head h1.big { font-size: 24px; }
  .sv-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .sv-chips::-webkit-scrollbar { display: none; }
  .sv-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; }
  .sv-chip:hover { color: var(--ink); }
  .sv-chip span { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
  .sv-chip[aria-current="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
  .sv-chip-new { border: 1px dashed var(--outline); background: transparent; gap: 4px; }
  .sv-chip-new .i { width: 16px; height: 16px; }
  .sv-bar { gap: 10px 8px; }
  .sv-search { order: -1; flex: 1 1 100%; }
  .sv-search input { font-size: 16px; }
  .sv-gap { display: block; flex: 1; }
  .sv-item { padding: 14px 14px 8px; }
  .sv-thumb { width: 76px; height: 76px; }
  .sv-private { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
  .sv-private .i { flex: none; width: 16px; height: 16px; }
  .sv-bulk { left: 0; right: 0; bottom: 0; transform: none; width: auto; padding: 10px 12px calc(18px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: 0 -6px 20px rgba(15, 26, 28, .08); }
  body.sv-managing .toast { bottom: 84px; }
  .sv-dlg { width: 100%; max-width: 100%; margin: auto 0 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; animation: sv-up .28s cubic-bezier(.2, .8, .2, 1); }
}
/* 我的收藏：提醒、公开的收藏夹 */
.sv-remind { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.sv-remind .i { width: 14px; height: 14px; }
.sv-remind.is-due { background: var(--level-bg); color: var(--level-fg); font-weight: 700; }
.sv-item[data-reminded] { border-color: var(--signal); }
.sv-icon-btn.is-on { color: var(--primary); }
.sv-pub-pill { align-self: center; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.sv-pub-pill .i { width: 13px; height: 13px; }
.sv-pub-pill:hover { color: var(--ink); }
.sv-lock-link { display: inline-block; margin-top: 6px; color: var(--primary); font-weight: 700; }
.sv-chip .i { width: 14px; height: 14px; }
.sv-private .i { flex: none; }
.sv-remind-form { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.sv-dlg-col.is-danger { color: var(--danger); }
.svp-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.svp-back .i { width: 16px; height: 16px; }
.svp .sv-sub { display: flex; align-items: center; gap: 6px; }
.svp .sv-sub .i { width: 16px; height: 16px; }
.svp .sv-main, .main.solo.svp { max-width: 760px; }
.svp-own { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; }
.svp-own .i { flex: none; width: 16px; height: 16px; }
.svp-own span { flex: 1 1 200px; }
.svp-own a { color: var(--primary); font-weight: 700; }
.svp-prof { margin-top: 4px; }
.svp-prof-list { display: flex; flex-wrap: wrap; gap: 6px; }
.svp-prof-item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.svp-prof-item span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svp-prof-item .i { flex: none; width: 14px; height: 14px; }
.svp-prof-item:hover { color: var(--ink); background: var(--hover); }
.profile-m .svp-prof { padding: 8px 0 0; }
@keyframes sv-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes sv-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----- 离开本站的提醒页（/go，设计稿 Leave / Mobile-Leave）。三种情况各一套底色：lv-safe 常见站点、lv-unknown 陌生站点、lv-danger 已被举报。 ----- */
:root {
  --lv-band: var(--surface); --lv-band-line: var(--line); --lv-hero-bg: var(--fill); --lv-hero-fg: var(--ink); --lv-box: var(--line);
  --lv-chip-bg: #EEF7F2; --lv-chip-fg: #00573B; --lv-initial: #334155;
  --lv-ok: #007A52; --lv-warn: #B7791F; --lv-bad: #B4261A; --lv-risk: #A33A00; --lv-risk-line: #E9A9A1;
  --lv-unknown-band: #FFF8EC; --lv-unknown-line: #F0DDB8; --lv-unknown-hero: #FFF1DF; --lv-unknown-fg: #8A5A00; --lv-unknown-box: #E8C98F; --lv-unknown-chip: #6B3D00; --lv-unknown-initial: #92400E;
  --lv-danger-band: #FDF1EF; --lv-danger-line: #F3C9C3; --lv-danger-hero: #FDE7E4; --lv-danger-fg: #B4261A; --lv-danger-chip: #8A1C12;
}
:root[data-theme="dark"] {
  --lv-chip-bg: #1F2724; --lv-chip-fg: #6FCFA8; --lv-initial: #475569;
  --lv-ok: #3FB98A; --lv-warn: #E0A84A; --lv-bad: #F28B7B; --lv-risk: #F28B5B; --lv-risk-line: #7A3A33;
  --lv-unknown-band: #221D14; --lv-unknown-line: #4A3A1E; --lv-unknown-hero: #3A2E1A; --lv-unknown-fg: #F0C070; --lv-unknown-box: #6B5326; --lv-unknown-chip: #F2C9A8; --lv-unknown-initial: #92400E;
  --lv-danger-band: #261917; --lv-danger-line: #5A2C26; --lv-danger-hero: #3A201D; --lv-danger-fg: #F28B7B; --lv-danger-chip: #F5B5AA;
}
.lv-unknown { --lv-band: var(--lv-unknown-band); --lv-band-line: var(--lv-unknown-line); --lv-hero-bg: var(--lv-unknown-hero); --lv-hero-fg: var(--lv-unknown-fg); --lv-box: var(--lv-unknown-box);
  --lv-chip-bg: var(--lv-unknown-hero); --lv-chip-fg: var(--lv-unknown-chip); --lv-initial: var(--lv-unknown-initial); }
.lv-danger { --lv-band: var(--lv-danger-band); --lv-band-line: var(--lv-danger-line); --lv-hero-bg: var(--lv-danger-hero); --lv-hero-fg: var(--lv-danger-fg); --lv-box: var(--lv-risk-line);
  --lv-chip-bg: var(--lv-danger-hero); --lv-chip-fg: var(--lv-danger-chip); --lv-initial: #B4261A; }
body:has(.lv) .shell, body:has(.lv) .page { padding: 0; }
body:has(.lv) .top { min-height: 64px; padding-inline: max(32px, calc((100% - 1080px) / 2)); }
.lv-home { min-height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-weight: 700; }
.lv-wrap { width: 100%; max-width: 1144px; box-sizing: border-box; margin: 0 auto; padding-inline: 32px; }
.lv-band { background: var(--lv-band); border-bottom: 1px solid var(--lv-band-line); }
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 448px; grid-template-areas: "hero dest" "acts dest" "trust dest"; grid-template-rows: auto auto 1fr; gap: 0 64px; padding-block: 64px; }
.lv-hero { grid-area: hero; animation: lv-in .3s cubic-bezier(.2, .8, .2, 1); }
.lv-hero-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--lv-hero-bg); color: var(--lv-hero-fg); }
.lv-eyebrow { margin-top: 24px; font-size: 13px; font-weight: 700; color: var(--lv-hero-fg); }
.lv-title { margin: 6px 0 0; font-family: "Bricolage Grotesque", "Noto Sans SC", var(--font); font-size: 44px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.lv-lead { max-width: 520px; margin: 16px 0 0; font-size: 17px; line-height: 1.7; color: var(--soft); }
.lv-actions { grid-area: acts; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lv-actions > a { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-width: 200px; height: 52px; padding: 0 28px; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 26px; font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.lv-actions > a:active { scale: .97; }
.lv-back { order: 2; background: var(--fill); color: var(--ink); }
.lv-back:hover { color: var(--ink); background: var(--line); }
.lv-go { order: 1; background: var(--primary-bg); color: var(--on-primary); }
.lv-go:hover { color: var(--on-primary); background: var(--primary-hover); }
.lv-unknown .lv-go { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.lv-unknown .lv-go:hover { color: var(--chip-on-fg); opacity: .9; }
.lv-danger .lv-back { order: 1; background: var(--primary-bg); color: var(--on-primary); }
.lv-danger .lv-back:hover { background: var(--primary-hover); color: var(--on-primary); }
.lv-danger .lv-go { order: 2; background: transparent; border-color: var(--lv-risk-line); color: var(--lv-risk); }
.lv-danger .lv-go[aria-disabled="true"] { border-color: var(--line); color: var(--outline-text); cursor: not-allowed; }
.lv-trust { grid-area: trust; margin-top: 12px; }
.lv-trust button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.lv-box { display: flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; box-sizing: border-box; border: 2px solid var(--outline); border-radius: 6px; background: var(--bg); color: #FFFFFF; }
.lv-box svg { display: none; }
.lv-trust [aria-checked="true"] .lv-box { border-color: var(--primary-bg); background: var(--primary-bg); }
.lv-trust [aria-checked="true"] .lv-box svg { display: block; }
.lv-trust-label { overflow-wrap: anywhere; }
.lv-dest { grid-area: dest; align-self: start; overflow: hidden; border: 1px solid var(--lv-box); border-radius: 20px; background: var(--bg); }
.lv-dest-head { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--fill); font-size: 12px; font-weight: 700; color: var(--muted); }
.lv-dash { flex: 1; height: 0; border-top: 1px dashed var(--outline); }
.lv-site { display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px; }
.lv-initial { display: flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--lv-initial); color: #FDFDFD; font-size: 20px; font-weight: 700; }
.lv-site-text { flex: 1; min-width: 0; }
.lv-host { font-size: 21px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.lv-chip { display: inline-block; margin-top: 5px; padding: 1px 9px; border-radius: 10px; background: var(--lv-chip-bg); color: var(--lv-chip-fg); font-size: 12px; font-weight: 700; }
.lv-url { display: flex; align-items: flex-start; gap: 8px; margin: 0 12px; padding: 8px 4px 8px 14px; border-radius: 12px; background: var(--surface); }
.lv-url-text { flex: 1; min-width: 0; padding: 6px 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.lv-url-text b { font-weight: 500; color: var(--ink); }
.lv-copy { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.lv-copy:hover { background: var(--fill); }
.lv-signals { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 16px 20px 20px; list-style: none; }
.lv-sig { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.lv-sig-icon { display: flex; flex: none; margin-top: 2px; }
.lv-sig.ok .lv-sig-icon { color: var(--lv-ok); }
.lv-sig.warn .lv-sig-icon { color: var(--lv-warn); }
.lv-sig.bad .lv-sig-icon { color: var(--lv-bad); }
.lv-main { padding-block: 48px; }
.lv-h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; }
.lv-tips { display: flex; gap: 40px; margin: 24px 0 0; padding: 0; list-style: none; }
.lv-tips li { display: flex; flex: 1; gap: 14px; }
.lv-num { flex: none; font-family: "Bricolage Grotesque", "Noto Sans SC", var(--font); font-size: 36px; font-weight: 800; line-height: 1; color: var(--outline); }
.lv-tip-title { font-size: 15px; font-weight: 700; }
.lv-tips p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.lv-from { display: flex; align-items: center; gap: 12px; margin-top: 40px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.lv-from-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fill); color: var(--ink); }
.lv-from-text { flex: 1; min-width: 0; }
.lv-from-where { font-size: 12px; color: var(--muted); }
.lv-from-where b { color: var(--ink); }
.lv-from-title { margin-top: 2px; overflow: hidden; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.lv-from-go { display: inline-flex; flex: none; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--fill); color: var(--ink); font-weight: 700; white-space: nowrap; }
.lv-from-go:hover { color: var(--ink); background: var(--line); }
.lv-footer { border-top: 1px solid var(--line); }
.lv-footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; min-height: 64px; font-size: 13px; color: var(--muted); }
.lv-footer-text { flex: 1; min-width: 280px; }
.lv-footer-row a { color: var(--muted); }
.lv-report { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lv-report[aria-disabled="true"] { color: var(--muted); cursor: default; }
@keyframes lv-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 860px) {
  body:has(.lv) .top { min-height: 0; padding-inline: 16px; }
  .lv { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .lv-wrap { padding-inline: 16px; }
  .lv-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "dest" "trust"; grid-template-rows: none; padding-block: 24px; }
  .lv-hero { padding: 0 4px; }
  .lv-hero-icon { width: 48px; height: 48px; }
  .lv-eyebrow { margin-top: 16px; }
  .lv-title { font-size: 28px; }
  .lv-lead { margin-top: 10px; font-size: 15px; }
  .lv-dest { margin-top: 20px; }
  .lv-host { font-size: 18px; }
  .lv-trust { margin-top: 8px; padding: 0 4px; }
  /* 手机：两个按钮固定在屏幕底部，上下排，主次照情况换位置。 */
  .lv-actions { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 26, 28, .06); }
  .lv-actions > a { width: 100%; min-width: 0; height: 48px; }
  .lv-main { padding: 28px 20px 8px; }
  .lv-h2 { font-size: 17px; }
  .lv-tips { flex-direction: column; gap: 16px; margin-top: 16px; }
  .lv-num { font-size: 28px; }
  .lv-from { margin-top: 24px; }
  .lv-from-go { display: none; }
  .lv-foot { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
  body:has(.lv) .toast { bottom: calc(148px + env(safe-area-inset-bottom)); }
}

/* ----- 帖子里站外链接的点击数（设计稿 Post「次点击」）：正文里的链接后面一个灰色小数字，链接卡片的站点那一行右边「↖ N 次点击」。点了跳一下。 ----- */
.lk-n { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 9px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 500; line-height: 18px;
  text-align: center; text-decoration: none; font-variant-numeric: tabular-nums; vertical-align: 1px; transform-origin: center; }
.lk-n.card { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 0 8px; border-radius: 10px; line-height: 20px; white-space: nowrap; vertical-align: baseline; }
.lk-n.bump { animation: lk-bump .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes lk-bump { 0% { scale: 1; } 35% { scale: 1.3; background: var(--primary-bg); color: var(--on-primary); } 100% { scale: 1; } }
.prose a.lk-ext::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 2px; vertical-align: -1px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (prefers-reduced-motion: reduce) { .lk-n.bump, .lv-hero { animation: none; } }
.linkcard-site > .lk-n.card { flex: none; overflow: visible; }
.linkcard-site:has(> .lk-n) > span:nth-last-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- 转发（设计稿「转发的帖子」「转发帖子」，前缀 rpt-；rp- 是红包的） ----- */
.rpt-badge { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 20px; padding: 0 8px 0 6px; border-radius: 10px; background: var(--fill); color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.rpt-badge .i { width: 12px; height: 12px; stroke-width: 2.2; }
/* 嵌着的原帖卡片：信息行、标题，下面是摘要或媒体，再一行「N 赞同 · N 条评论 / 查看原帖」。 */
.rpt-origin { display: flex; flex-direction: column; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rpt-o-head { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 0; color: var(--ink); }
.rpt-o-head:hover { color: var(--ink); }
.rpt-o-meta { display: flex; min-width: 0; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.rpt-o-meta .avatar, .rpt-o-meta .rpt-face { flex: none; }
.rpt-o-meta b { flex: none; color: var(--ink); }
.rpt-o-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rpt-o-time { flex: none; }
.rpt-o-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.rpt-o-text { display: -webkit-box; overflow: hidden; color: var(--soft); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rpt-o-gate { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.rpt-o-gate .i { width: 14px; height: 14px; }
.rpt-o-media { margin: 10px 14px 0; }
.rpt-o-media .card-media { margin: 0; }
.rpt-o-media .cr { max-height: 440px; border-radius: 12px; }
.rpt-o-media :is(.video-embed, .app-embed, .vp) { border-radius: 12px; }
.rpt-o-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px 12px; color: var(--muted); font-size: 12px; }
.rpt-o-foot > span { flex: 1; min-width: 0; }
.rpt-o-foot > b { flex: none; color: var(--ink); }
.rpt-o-foot:hover > b { text-decoration: underline; }
.rpt-o-foot .kind-badge { height: auto; padding: 0; background: none; color: inherit; font: inherit; }
/* 原帖看不到时的虚线占位。 */
.rpt-gone { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--outline); border-radius: 12px; color: var(--muted); }
.rpt-gone-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fill); color: var(--muted); }
.rpt-gone-icon .i { width: 18px; height: 18px; }
.rpt-gone > span:last-child { flex: 1; min-width: 0; }
.rpt-gone b { display: block; color: var(--ink); font-size: 14px; }
.rpt-gone b + span { display: block; font-size: 13px; }
/* 紧凑视图里的「转发自…」一行；卡片视图里不要它。 */
.rpt-from { display: none; min-width: 0; align-items: center; gap: 6px; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.rpt-from .i { flex: none; width: 14px; height: 14px; }
.rpt-from > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rpt-from b { color: var(--ink); }
@media (min-width: 861px) {
  :root[data-feed="compact"] .card-post .rpt-origin, :root[data-feed="compact"] .card-post .rpt-gone { display: none; }
  :root[data-feed="compact"] .card-post .rpt-from { display: flex; grid-column: 2; grid-row: 3; }
}
/* 转发帖的详情页：卡片下面提醒评论归属。 */
.op .rpt-origin, .op .rpt-gone { margin-top: 12px; }
.rpt-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--unread); color: var(--primary-hover); font-size: 13px; }
.rpt-note span { flex: 1 1 220px; min-width: 0; }
.rpt-note a { flex: none; color: var(--primary-hover); font-weight: 700; }
/* 原帖操作栏的「N 次转发」和点开的列表。 */
.pill.rpt-count { height: 36px; gap: 6px; padding: 0 14px; border-radius: 18px; cursor: pointer; }
.pill.rpt-count .i { width: 18px; height: 18px; }
.pill.rpt-count[aria-expanded="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.rpt-where { max-width: 420px; margin-top: 8px; padding: 6px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-pop); }
.rpt-where-head { padding: 6px 10px 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.rpt-where-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.rpt-where-item:hover { background: var(--hover); color: var(--ink); }
.rpt-where-main { flex: 1; min-width: 0; line-height: 1.35; }
.rpt-where-main b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rpt-where-main span { display: block; color: var(--muted); font-size: 12px; }
.rpt-where-n { flex: none; color: var(--muted); font-size: 12px; }
.rpt-face { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 50%; color: #FDFDFD; font-size: 13px; font-weight: 700; object-fit: cover; }
.notif-type.t-repost { background: #334155; color: #FFFFFF; }

/* 转发弹窗：宽屏 560 宽居中，手机上整屏。 */
.rpt-modal { width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(15, 26, 28, .3); font-size: 14px; line-height: 1.5; }
.rpt-modal[open] { display: flex; flex-direction: column; animation: rpt-in .2s cubic-bezier(.2, .8, .2, 1); }
.rpt-modal::backdrop { background: rgba(11, 31, 24, .5); animation: rpt-fade .18s ease; }
.rpt-modal.sheet { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; inset: 0; border-radius: 0; }
.rpt-modal.sheet[open] { animation: rpt-up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes rpt-in { from { opacity: 0; scale: .97; } to { opacity: 1; scale: 1; } }
@keyframes rpt-up { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes rpt-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rpt-modal[open], .rpt-modal::backdrop { animation: none; } }
.rpt-head { display: flex; flex: none; align-items: center; gap: 10px; height: 60px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); }
.rpt-head-icon { display: flex; color: var(--primary); }
.rpt-head-icon .i { width: 22px; height: 22px; }
.rpt-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; }
.rpt-body { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 18px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.rpt-group { display: flex; flex-direction: column; gap: 8px; }
.rpt-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.rpt-hint { color: var(--muted); font-size: 12px; }
.rpt-seg { display: flex; gap: 2px; padding: 3px; border-radius: 24px; background: var(--fill); }
.rpt-seg button { flex: 1; min-width: 0; height: 40px; padding: 0 6px; border: 0; border-radius: 20px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.rpt-seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.rpt-nodes { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.rpt-nodes[hidden] { display: none; }
.rpt-nodes.bad { border-color: var(--danger); }
.rpt-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); cursor: text; }
.rpt-search .i { flex: none; width: 18px; height: 18px; }
.rpt-modal input.rpt-plain, .rpt-modal input.rpt-plain:focus, .rpt-modal input.rpt-plain:focus-visible { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0 !important; outline: none !important; background: transparent; box-shadow: none !important; color: var(--ink); font: inherit; font-size: 15px; }
.rpt-list { max-height: 212px; padding: 4px; overflow-y: auto; }
.rpt-node { display: flex; width: 100%; min-height: 50px; box-sizing: border-box; align-items: center; gap: 12px; padding: 4px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rpt-node:hover { background: var(--hover); }
.rpt-node.on { background: var(--unread); }
.rpt-node.off { opacity: .55; cursor: not-allowed; }
.rpt-node.off:hover { background: transparent; }
.rpt-node .rpt-face { font-size: 14px; }
.rpt-node-main { flex: 1; min-width: 0; line-height: 1.35; }
.rpt-node-name { display: block; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rpt-node-name small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.rpt-node-note { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rpt-node-note.why { color: var(--danger); }
.rpt-radio { display: flex; flex: none; width: 20px; height: 20px; box-sizing: border-box; align-items: center; justify-content: center; border: 2px solid var(--outline); border-radius: 50%; }
.rpt-radio span { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); scale: 0; transition: scale .15s cubic-bezier(.2, .8, .2, 1); }
.rpt-node.on .rpt-radio { border-color: var(--primary); }
.rpt-node.on .rpt-radio span { scale: 1; }
.rpt-empty { padding: 20px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.rpt-me { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; }
.rpt-me[hidden] { display: none; }
.rpt-me.off { color: var(--danger); }
.rpt-me .i { width: 18px; height: 18px; margin-top: 1px; }
.rpt-field { display: flex; height: 48px; box-sizing: border-box; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); }
.rpt-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.rpt-field.bad { border-color: var(--danger); }
.rpt-modal .rpt-field input.rpt-plain { height: 44px; font-weight: 700; }
.rpt-count-n { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rpt-modal textarea { width: 100%; min-height: 0; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
.rpt-modal .rpt-origin { margin-top: 0; }
.rpt-foot { display: flex; flex: none; flex-direction: column; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.rpt-error { color: var(--danger); font-size: 13px; }
.rpt-foot-row { display: flex; align-items: center; gap: 8px; }
.rpt-foot-row .grow { flex: 1; }
.rpt-cancel, .rpt-submit { height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.rpt-submit { min-width: 120px; max-width: 70%; padding: 0 22px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.rpt-submit.ready { background: var(--primary-bg); color: var(--on-primary); }
.rpt-submit[aria-busy="true"] { opacity: .7; }
.rpt-modal.sheet .rpt-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
/* 首页不重复：同一个原帖在这一页里只出现一次，下面注明还转到了哪里。 */
.rpt-also { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.rpt-also .i { flex: none; width: 14px; height: 14px; }
@media (min-width: 861px) { :root[data-feed="compact"] .card-post .rpt-also { display: none; } }
/* 手机上顶栏右边的「回到首页」是一行粗体字，不是胶囊按钮（设计稿 Mobile-Leave）。 */
@media (max-width: 860px) { .lv-home { min-height: 44px; padding: 0; background: transparent; } }
/* 发到「我的主页」：没有标签（compose.js 的 syncProfile）。 */
.compose.compose-to-profile [data-tag-field] { display: none; }
/* 个人主页的「主页」一栏：本人看时顶上一条说明和「写一篇」。 */
.pb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pb-bar .quiet { flex: 1 1 220px; min-width: 0; }
.pb-write { flex: none; gap: 6px; }
.pb-write .i { width: 16px; height: 16px; }

/* 段位小图标（设计稿「段位视觉」，模板函数 tierIcon / tierChip，脚本 NL.tierIcon / NL.tierChip）。
   tier-ico 是单色图标，颜色跟着文字；tier-chip 是段位渐变色圆里放图标，tierc-N 给出第 N 段的渐变和图标色。
   渐变是段位的「东西」，深色模式下不变。 */
.tier-ico { display: inline-block; flex: none; vertical-align: middle; }
.tier-chip { display: inline-flex; flex: none; align-items: center; justify-content: center; box-sizing: border-box; width: var(--tier-chip, 32px); height: var(--tier-chip, 32px); border-radius: 50%; background: linear-gradient(145deg, var(--tier-g1) 0%, var(--tier-g2) 100%); color: var(--tier-fg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75), 0 2px 6px rgba(15, 26, 28, .14); vertical-align: middle; }
.tierc-0 { --tier-g1: #F6E3D2; --tier-g2: #D9A679; --tier-fg: #7A3A10; }
.tierc-1 { --tier-g1: #F4F7F8; --tier-g2: #C5D0D6; --tier-fg: #2A3C42; }
.tierc-2 { --tier-g1: #FFF4CF; --tier-g2: #EBC65A; --tier-fg: #6B4700; }
.tierc-3 { --tier-g1: #E6FAF6; --tier-g2: #9ED9CF; --tier-fg: #0F5D57; }
.tierc-4 { --tier-g1: #EEF5FF; --tier-g2: #A9C8FF; --tier-fg: #1E4E9A; }
.tierc-5 { --tier-g1: #F8ECFF; --tier-g2: #D3A8F5; --tier-fg: #6B21A8; }
.tierc-6 { --tier-g1: #FFEAF2; --tier-g2: #F4A3C4; --tier-fg: #9D174D; }
.tierc-7 { --tier-g1: #FFEDE3; --tier-g2: #FFB38A; --tier-fg: #A33A00; }
.tierc-8 { --tier-g1: #2B4160; --tier-g2: #10202E; --tier-fg: #FBEFC9; }
.tier-chip.tierc-8 { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 6px rgba(15, 26, 28, .14); }

/* 段位小标（模板 tier-badge）：段位小图标加段位名，配段位色，颜色和 internal/platform/tier 里的一致（设计稿成就页的段位色）。
   设计稿没给深色版：深色下用成就页英雄区的深底和渐变的亮色。 */
.tierb { display: inline-flex; flex: none; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 5px; border-radius: 5px; background: var(--tierb-bg); color: var(--tierb-fg); font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; }
.tierb-0 { --tierb-bg: #F1E3D6; --tierb-fg: #92400E; }
.tierb-1 { --tierb-bg: #E5EBEE; --tierb-fg: #2A3C42; }
.tierb-2 { --tierb-bg: #FBEFC9; --tierb-fg: #7A5200; }
.tierb-3 { --tierb-bg: #DDF3F0; --tierb-fg: #0F5D57; }
.tierb-4 { --tierb-bg: #DCEBFF; --tierb-fg: #1E4E9A; }
.tierb-5 { --tierb-bg: #F3E1FF; --tierb-fg: #6B21A8; }
.tierb-6 { --tierb-bg: #FDE2EC; --tierb-fg: #9D174D; }
.tierb-7 { --tierb-bg: #FFE3D6; --tierb-fg: #A33A00; }
.tierb-8 { --tierb-bg: #10202E; --tierb-fg: #FBEFC9; }
:root[data-theme="dark"] .tierb-0 { --tierb-bg: #2B1A12; --tierb-fg: #D9A679; }
:root[data-theme="dark"] .tierb-1 { --tierb-bg: #1E272C; --tierb-fg: #C5D0D6; }
:root[data-theme="dark"] .tierb-2 { --tierb-bg: #2A2108; --tierb-fg: #EBC65A; }
:root[data-theme="dark"] .tierb-3 { --tierb-bg: #0A2926; --tierb-fg: #9ED9CF; }
:root[data-theme="dark"] .tierb-4 { --tierb-bg: #0D1E3B; --tierb-fg: #A9C8FF; }
:root[data-theme="dark"] .tierb-5 { --tierb-bg: #25123B; --tierb-fg: #D3A8F5; }
:root[data-theme="dark"] .tierb-6 { --tierb-bg: #36102A; --tierb-fg: #F4A3C4; }
:root[data-theme="dark"] .tierb-7 { --tierb-bg: #3A170A; --tierb-fg: #FFB38A; }
:root[data-theme="dark"] .tierb-8 { --tierb-bg: #2B4160; --tierb-fg: #FBEFC9; }

/* ===== 最佳答案（设计稿 Post / Mobile-Post）：评论区顶上的卡片、楼主的虚线提示、回复上的标记和「采纳」按钮。 ===== */
:root { --ba-bg: #F2FAF6; --ba-line: #9FD6BE; --ba-on: #DDF1E7; --ba-btn-line: #CFE3D9; }
:root[data-theme="dark"] { --ba-bg: #16261F; --ba-line: #2E5A47; --ba-on: #1E3A2E; --ba-btn-line: #2E5A47; }
.ba-card { margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--ba-line); border-radius: 16px; background: var(--ba-bg); scroll-margin-top: 96px; }
.ba-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ba-pill, .ba-mark { display: inline-flex; flex: none; align-items: center; background: var(--primary-bg); color: var(--on-primary); font-weight: 700; white-space: nowrap; }
.ba-pill { gap: 4px; height: 24px; padding: 0 10px 0 8px; border-radius: 12px; font-size: 12px; }
.ba-pill .i { width: 14px; height: 14px; stroke-width: 3; }
.ba-note { color: var(--soft); font-size: 12px; }
.ba-meta { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 10px; color: var(--muted); font-size: 12px; }
.ba-meta .avatar { width: 28px; height: 28px; font-size: 12px; }
.ba-meta b { min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.ba-text { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: var(--ink); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ba-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ba-jump { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ba-btn-line); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.ba-jump:hover { color: var(--ink); background: var(--hover); }
.ba-jump .i { width: 14px; height: 14px; stroke-width: 2.4; }
.ba-undo { height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ba-undo:hover { background: var(--hover); color: var(--ink); }
.ba-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px dashed var(--outline); border-radius: 14px; color: var(--muted); font-size: 13px; }
.ba-hint > span:last-child { flex: 1; }
.ba-hint-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); color: var(--ink); }
.ba-hint-icon .i { width: 15px; height: 15px; stroke-width: 2.6; }
.ba-mark { gap: 3px; height: 20px; padding: 0 8px 0 6px; border-radius: 10px; font-size: 11px; }
.ba-mark .i { width: 12px; height: 12px; stroke-width: 3; }
.reply.accepted > .reply-body { padding: 0 8px 0 10px; border: 1px solid var(--ba-line); border-radius: 14px; background: var(--ba-bg); }
.ba-accept { display: inline-flex; align-items: center; gap: 5px; height: 32px; margin: 0 4px; padding: 0 12px 0 10px; border: 1px solid var(--ba-line); border-radius: 16px; background: transparent; color: var(--primary); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.ba-accept:hover { background: var(--ba-bg); }
.ba-accept.on { border-color: var(--ba-on); background: var(--ba-on); color: var(--primary-hover); }
.ba-accept .i { width: 14px; height: 14px; stroke-width: 2.8; }
@media (max-width: 860px) {
  .ba-card { margin: 0 0 12px; padding: 14px; }
  .ba-text { font-size: 14px; }
  .ba-hint { margin: 0 0 12px; }
  .reply.accepted > .reply-body { padding: 8px 10px 2px; }
  /* 手机上「采纳」排在操作行最前面，把回复和投票挤到右边。 */
  .topic-main .reply-actions .ba-accept { order: -2; margin: 0 auto 0 0; }
}

/* 新人指引（设计稿 Onboarding / Mobile-Onboarding / OnboardingEntry）：/onboarding 页、首页提示条、顶栏头像进度环、
   头像菜单和手机抽屉的第一项、抽屉头像的环、汉堡按钮上的橙点、点赞后的受限提示、帮助中心入口、社区规范的「我已读完」。前缀 ob-。 */
.ob-ring { transform: rotate(-90deg); }
.ob-ring circle { fill: none; stroke-width: 3; }
.ob-ring-base { stroke: var(--line); }
.ob-ring-fill { stroke: var(--primary); stroke-linecap: round; }
.ob-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; max-width: 100%; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--primary-bg); color: var(--on-primary); font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.ob-btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.ob-btn .i { flex: none; width: 16px; height: 16px; }
.ob-btn.ghost { height: 40px; padding: 0 16px; background: var(--bg); color: var(--ink); font-size: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.ob-btn.ghost:hover { background: var(--hover); }

/* 页面 */
.ob-page { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 24px 32px; max-width: 1112px; margin-inline: auto; padding: 12px 0 64px; }
.ob-main { display: flex; flex: 999 1 480px; flex-direction: column; min-width: 0; max-width: 760px; }
.ob-aside { display: flex; flex: 1 1 260px; flex-direction: column; gap: 16px; min-width: 0; max-width: 320px; }
.ob-head h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.25; }
.ob-head p { margin: 2px 0 0; color: var(--muted); }
.ob-card { margin-top: 16px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ob-card-top { display: flex; align-items: center; gap: 16px; }
.ob-seal { display: flex; flex: none; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.ob-seal-mark { display: grid; place-items: center; box-sizing: border-box; width: 68px; height: 68px; border-radius: 50%; font-size: 28px; font-weight: 800; }
.ob-seal-mark.tierb-0 { border: 2px solid #C99A6E; background: var(--tierb-bg); color: var(--tierb-fg); }
:root[data-theme="dark"] .ob-seal-mark.tierb-0 { border-color: #8A5A34; }
.ob-seal-silver { border: 2px dashed var(--outline); background: var(--bg); color: var(--outline); }
.ob-seal-silver.on { border-style: solid; background: var(--fill); color: var(--soft); }
.ob-card-mid { flex: 1; min-width: 0; padding-bottom: 20px; }
.ob-card-nums { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.ob-card-nums span { color: var(--muted); }
.ob-progress { height: 10px; overflow: hidden; border-radius: 5px; background: var(--line); }
.ob-progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary-bg); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.ob-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.ob-card-foot p { flex: 1 1 240px; margin: 0; color: var(--muted); font-size: 13px; }
.ob-card-foot strong { color: var(--ink); }
.ob-continue { height: 44px; padding: 0 20px; }
.ob-done { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--unread); animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
.ob-done-mark { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-bg); color: var(--on-primary); }
.ob-done-mark .i { width: 20px; height: 20px; stroke-width: 2.8; }
.ob-done.waiting .ob-done-mark .i { stroke-width: 2.2; }
.ob-done-text { display: flex; flex: 1 1 220px; flex-direction: column; min-width: 0; }
.ob-done-text strong { color: var(--primary-hover); font-size: 16px; }
.ob-done-text span { color: var(--soft); font-size: 13px; }
.ob-group { margin: 16px 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.ob-step { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.ob-step.next { border-color: var(--primary); background: var(--surface); }
.ob-num { display: grid; flex: none; place-items: center; box-sizing: border-box; width: 32px; height: 32px; border: 2px solid var(--outline); border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 700; }
.ob-step.next .ob-num { border-color: var(--primary); color: var(--primary); }
.ob-step.done .ob-num { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--on-primary); }
.ob-num .i { width: 16px; height: 16px; stroke-width: 3; }
.ob-step-text { flex: 1; min-width: 0; }
.ob-step-text strong { display: block; font-size: 15px; }
.ob-step.done .ob-step-text strong { color: var(--muted); }
.ob-step-text p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ob-step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.ob-step-meta:empty { display: none; }
.ob-energy { display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 9px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 18px; }
.ob-energy .i { width: 11px; height: 11px; }
.ob-step.done .ob-energy { background: var(--unread); color: var(--primary-hover); }
.ob-count { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ob-count-bar { width: 72px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.ob-count-bar span { display: block; height: 100%; background: var(--primary-bg); }
.ob-step-go { display: inline-flex; flex: none; align-items: center; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.ob-step-go:hover { background: var(--hover); color: var(--ink); }
.ob-step.next .ob-step-go { background: var(--primary-bg); color: var(--on-primary); }
.ob-step.next .ob-step-go:hover { background: var(--primary-hover); }
.ob-step-done { display: inline-flex; flex: none; align-items: center; height: 40px; padding: 0 8px; color: var(--primary); font-size: 13px; font-weight: 700; }
.ob-topics { margin-top: 8px; }
.ob-topics h2 { margin: 16px 0 0; font-size: 16px; }
.ob-topics > p { margin: 2px 0 4px; color: var(--muted); font-size: 13px; }
.ob-topic { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--fill); color: var(--ink); text-decoration: none; }
.ob-topic:hover { background: var(--hover); color: var(--ink); }
.ob-topic > .i { flex: none; width: 18px; height: 18px; color: var(--muted); }
.ob-topic-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ob-topic-node { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.ob-topic-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ob-topic-text strong { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.ob-topic-meta { color: var(--muted); font-size: 12px; }
.ob-side-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--muted); font-size: 13px; }
.ob-side-card h2 { margin: 0; color: var(--ink); font-size: 14px; }
.ob-tiers { padding: 14px 8px 8px; }
.ob-tiers h2 { margin: 0 8px 6px; font-size: 15px; }
.ob-tier { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 10px; }
.ob-tier.on { background: var(--surface); }
/* 等级一览里的段位：段位小图标放在该段位的渐变色圆里（设计稿「段位视觉」）。 */
.ob-tier-mark { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(145deg, var(--tier-g1) 0%, var(--tier-g2) 100%); color: var(--tier-fg); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.ob-tier-mark.tierc-8 { box-shadow: 0 0 0 1px var(--line); }
.ob-tier-text { display: flex; flex-direction: column; min-width: 0; }
.ob-tier-name { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; font-weight: 500; }
.ob-tier.on .ob-tier-name { font-weight: 700; }
.ob-here { padding: 0 7px; border-radius: 8px; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 11px; font-weight: 700; line-height: 16px; }
.ob-tier-need { color: var(--muted); font-size: 12px; }
.ob-tiers-note { margin: 8px 8px 4px; font-size: 12px; }
.ob-help p { margin: 4px 0 10px; }
.ob-help .ob-help-links { margin: 0; }
.ob-help-links a { font-weight: 700; }
.ob-dock { display: none; }

/* 首页提示条：展开 / 收起两种样子都画出来，按 <html data-ob-bar> 切换（theme.js 在渲染前读这台设备记下的）。 */
.ob-bar { margin: 0 0 12px; }
.ob-bar-full { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border: 1px solid var(--primary); border-radius: 16px; background: var(--surface); }
.ob-bar-ring { position: relative; display: grid; flex: none; place-items: center; width: 52px; height: 52px; }
.ob-bar-ring .ob-ring { position: absolute; inset: 0; }
.ob-bar-num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ob-bar-text { display: flex; flex: 1 1 200px; flex-direction: column; min-width: 0; }
.ob-bar-text strong { font-size: 15px; }
.ob-bar-text span { color: var(--muted); font-size: 13px; }
.ob-bar-acts { display: flex; flex: none; align-items: center; gap: 4px; }
.ob-bar-fold { height: 40px; padding: 0 12px; border: 0; border-radius: 20px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.ob-bar-fold:hover { background: var(--hover); color: var(--ink); }
.ob-bar-mini { display: none; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); }
.ob-bar-mini .ob-ring { flex: none; }
.ob-bar-link { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ob-bar-unfold { display: grid; flex: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); }
.ob-bar-unfold .i { width: 16px; height: 16px; }
:root[data-ob-bar="min"] .ob-bar-full { display: none; }
:root[data-ob-bar="min"] .ob-bar-mini { display: flex; }

/* 顶栏头像外的进度环（头像缩到 32）。 */
.iconbtn.ob-ringed { position: relative; }
.iconbtn.ob-ringed .ob-ring { position: absolute; inset: 0; width: 44px; height: 44px; }
.iconbtn.ob-ringed .avatar { width: 32px; height: 32px; }

/* 头像菜单、手机抽屉的第一项。 */
.ob-menu { display: block; height: auto; padding: 10px 12px; border-radius: 12px; background: var(--unread); color: var(--ink); text-decoration: none; }
.ob-menu:hover { background: var(--unread); color: var(--ink); filter: brightness(.97); }
.ob-menu-row { display: flex; align-items: center; gap: 8px; }
.ob-menu-row .i { flex: none; width: 18px; height: 18px; }
.ob-menu-name { flex: 1; font-size: 14px; font-weight: 700; }
.ob-menu-left { color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.ob-menu-bar { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: var(--line); }
.ob-menu-bar span { display: block; height: 100%; background: var(--primary-bg); }
.side-items .ob-side { margin-bottom: 6px; }

/* 手机：抽屉头像外的环（第 29 条）和汉堡按钮上的橙点。 */
.iconbtn.ob-dot { position: relative; }
.iconbtn.ob-dot::after { content: ""; position: absolute; top: 10px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #FF9C38; box-shadow: 0 0 0 2px var(--bg); }
.ob-ringed-head .acct-face { padding: 3px; border-radius: 50%; background: conic-gradient(var(--primary) var(--ob-p, 0%), rgba(255, 255, 255, .35) 0); }

/* 点赞后的受限提示：深底气泡，小三角指着赞同按钮；8 秒、点别处或按 Esc 收起。 */
.ob-hint { position: absolute; z-index: 60; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-fg); font-size: 13px; line-height: 1.5; box-shadow: var(--toast-shadow); animation: pop .24s cubic-bezier(.2, .8, .2, 1); }
.ob-hint::before { content: ""; position: absolute; top: -5px; left: var(--ob-tip, 22px); width: 10px; height: 10px; background: inherit; rotate: 45deg; }
.ob-hint a { margin-left: 6px; color: var(--toast-ok); font-weight: 700; white-space: nowrap; }
.ob-hint.floating { position: fixed; bottom: 88px; left: 50% !important; translate: -50% 0; }
.ob-hint.floating::before { display: none; }

/* 帮助中心里的常驻入口、社区规范末尾的「我已读完」。 */
.ob-faq { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--unread); color: var(--ink); text-decoration: none; }
.ob-faq:hover { color: var(--ink); filter: brightness(.97); }
.ob-faq > .i { flex: none; width: 20px; height: 20px; color: var(--primary); }
.ob-faq-text { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: 13px; color: var(--muted); }
.ob-faq-text strong { color: var(--ink); font-size: 14px; }
.ob-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 32px; padding: 16px; border-radius: 14px; background: var(--unread); }
.ob-rules p { display: flex; flex: 1 1 240px; align-items: center; gap: 6px; margin: 0; }
.ob-rules p .i { flex: none; width: 18px; height: 18px; color: var(--primary); }
.ob-rules a { margin-left: 4px; font-weight: 700; }

/* 不到 1000：右栏排到正文下面，和正文一样宽。 */
@media (max-width: 999px) { .ob-main, .ob-aside { flex-basis: 100%; } .ob-aside { max-width: 760px; } }
@media (max-width: 860px) {
  .ob-page { gap: 14px; padding: 16px 16px 24px; }
  .ob-main, .ob-aside { flex-basis: 100%; max-width: none; }
  .ob-head h1 { font-size: 24px; }
  .ob-card { padding: 18px 16px; }
  .ob-card-top { gap: 10px; }
  .ob-seal-mark { width: 56px; height: 56px; font-size: 23px; }
  .ob-group { margin-top: 14px; }
  .ob-step { padding: 12px; }
  .ob-dock { position: sticky; z-index: 5; bottom: 0; display: block !important; flex-basis: 100%; margin: 0 -16px -24px; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); box-shadow: 0 -6px 20px rgba(15, 26, 28, .06); }
  .ob-dock .ob-btn { width: 100%; height: 48px; border-radius: 24px; font-size: 15px; }
  .ob-bar-full { padding: 14px; gap: 12px; }
  .ob-bar { margin: 0 12px 12px; }
  /* 指引页底部有固定的「继续」条，右下角的发帖按钮会压住它。 */
  body:has(.ob-dock) .fab.only-narrow { display: none !important; }
}

/* ===== 用户组与权限（/permissions，设计稿 Permissions / Mobile-Permissions），见 permissions.html ===== */
/* 绿格子：比左边一列新放开或变宽；选中的一列整列加深一点。深色下用主色往底色里调。 */
:root { --pm-fresh: #EAF6F0; --pm-fresh-on: #D3EEE2; --pm-fresh-fg: #005C3D; --pm-pick: #F2F5F6; --pm-fresh-line: #B7DFCB; }
:root[data-theme="dark"] { --pm-fresh: color-mix(in srgb, var(--primary) 14%, var(--bg)); --pm-fresh-on: color-mix(in srgb, var(--primary) 24%, var(--bg));
  --pm-fresh-fg: #7FD8B2; --pm-pick: var(--fill); --pm-fresh-line: color-mix(in srgb, var(--primary) 45%, var(--bg)); }
.pm-page { grid-template-columns: minmax(0, 1080px); justify-content: center; }
.pm-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-bottom: 48px; container-type: inline-size; }
.pm-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.pm-title { font-family: "Bricolage Grotesque", var(--font); font-size: 28px; font-weight: 800; line-height: 1.25; }
.pm-lead { margin-top: 4px; color: var(--muted); }
.pm-tabs { display: flex; gap: 2px; width: max-content; padding: 3px; border-radius: 22px; background: var(--fill); }
.pm-tabs [role=tab] { height: 38px; padding: 0 18px; border: 0; border-radius: 19px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }
.pm-tabs [role=tab][aria-selected=true] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 26, 28, .14); }
.pm-panel { display: flex; flex-direction: column; gap: 16px; }
.pm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.pm-intro { flex: 1 1 320px; }
.pm-key { display: inline-flex; align-items: center; gap: 6px; }
.pm-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--pm-fresh); box-shadow: inset 0 0 0 1px var(--pm-fresh-line); }
.pm-yes { display: block; flex: none; color: var(--primary); }
.pm-no { display: block; flex: none; color: var(--outline); }

.pm-table { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: clip; }
.pm-hrow, .pm-row { display: grid; grid-template-columns: 208px repeat(var(--pm-cols), minmax(0, 1fr)); }
.pm-hrow { position: sticky; top: 57px; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.pm-corner { display: flex; align-items: flex-end; padding: 12px 16px; font-size: 12px; color: var(--muted); }
.pm-ch { display: flex; padding: 8px 4px; border-left: 1px solid var(--fill); }
.pm-colbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 10px 4px 8px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); }
.pm-colbtn:hover { background: var(--hover); }
.pm-colbtn[aria-pressed=true] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pm-ic { display: flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); }
.pm-colbtn[aria-pressed=true] .pm-ic { background: color-mix(in srgb, var(--chip-on-fg) 16%, transparent); }
.pm-ic svg { flex: none; }
.pm-cn { font-size: 14px; font-weight: 700; white-space: nowrap; }
.pm-cs { font-size: 11px; line-height: 1.3; text-align: center; color: var(--muted); }
.pm-colbtn[aria-pressed=true] .pm-cs { color: color-mix(in srgb, var(--chip-on-fg) 72%, transparent); }
.pm-mine { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 11px; font-weight: 700; white-space: nowrap; }
.pm-colbtn[aria-pressed=true] .pm-mine { background: var(--chip-on-fg); color: var(--chip-on-bg); }
.pm-group { display: flex; align-items: center; height: 40px; padding: 0 16px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--soft); }
.pm-hrow + .pm-group { border-top: 0; }
.pm-row { border-top: 1px solid var(--fill); }
.pm-rh { display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; }
.pm-rl { font-size: 14px; font-weight: 500; }
.pm-rn { margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.pm-cell { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 8px 6px; border-left: 1px solid var(--fill); text-align: center; font-size: 13px; line-height: 1.35; }
.pm-cell.is-fresh { background: var(--pm-fresh); color: var(--pm-fresh-fg); font-weight: 700; }
.pm-row:hover > div { background-color: var(--hover); }
.pm-row:hover > .pm-cell.is-fresh { background-color: var(--pm-fresh); filter: brightness(.98); }
.pm-table[data-pick="0"] [data-c="0"].pm-cell, .pm-table[data-pick="1"] [data-c="1"].pm-cell, .pm-table[data-pick="2"] [data-c="2"].pm-cell,
.pm-table[data-pick="3"] [data-c="3"].pm-cell, .pm-table[data-pick="4"] [data-c="4"].pm-cell, .pm-table[data-pick="5"] [data-c="5"].pm-cell,
.pm-table[data-pick="6"] [data-c="6"].pm-cell { background: var(--pm-pick); }
.pm-table[data-pick="0"] [data-c="0"].is-fresh, .pm-table[data-pick="1"] [data-c="1"].is-fresh, .pm-table[data-pick="2"] [data-c="2"].is-fresh,
.pm-table[data-pick="3"] [data-c="3"].is-fresh, .pm-table[data-pick="4"] [data-c="4"].is-fresh, .pm-table[data-pick="5"] [data-c="5"].is-fresh,
.pm-table[data-pick="6"] [data-c="6"].is-fresh { background: var(--pm-fresh-on); }

/* 窄的时候：选一列、逐项列出，比左边一列多出来的标「新」。 */
.pm-m, .pm-m-intro { display: none; }
.pm-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.pm-chips::-webkit-scrollbar { display: none; }
.pm-chip { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 6px; border: 0; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.pm-chip .pm-ic { width: 28px; height: 28px; background: var(--bg); }
.pm-chip .pm-ic svg { width: 15px; height: 15px; }
.pm-chip[aria-pressed=true] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pm-chip[aria-pressed=true] .pm-ic { background: color-mix(in srgb, var(--chip-on-fg) 16%, transparent); }
.pm-card { display: none; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--chip-on-bg); color: var(--chip-on-fg); animation: pm-in .32s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes pm-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.pm-card-ic { display: flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--chip-on-fg) 14%, transparent); }
.pm-card-ic svg { width: 26px; height: 26px; }
.pm-card-text { flex: 1; min-width: 0; }
.pm-card-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.pm-card-name .pm-mine { height: 20px; padding: 0 8px; background: var(--chip-on-fg); color: var(--chip-on-bg); }
.pm-card-sub { font-size: 12px; color: color-mix(in srgb, var(--chip-on-fg) 72%, transparent); }
.pm-m-intro { font-size: 13px; color: var(--muted); }
.pm-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pm-lgroup { padding: 10px 14px; background: var(--surface); font-size: 13px; font-weight: 700; color: var(--soft); }
.pm-li { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--fill); }
.pm-lgroup + .pm-li { border-top: 0; }
.pm-li-main { flex: 1; min-width: 0; }
.pm-li-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.pm-new { display: none; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--pm-fresh); color: var(--pm-fresh-fg); font-size: 11px; font-weight: 700; }
.pm-lv { display: none; flex: none; align-items: center; max-width: 46%; text-align: right; font-size: 13px; font-weight: 700; }
.pm-lv.is-no { color: var(--muted); }
.pm-m[data-pick="0"] :is(.pm-card, .pm-lv, .pm-new)[data-c="0"], .pm-m[data-pick="1"] :is(.pm-card, .pm-lv, .pm-new)[data-c="1"],
.pm-m[data-pick="2"] :is(.pm-card, .pm-lv, .pm-new)[data-c="2"], .pm-m[data-pick="3"] :is(.pm-card, .pm-lv, .pm-new)[data-c="3"],
.pm-m[data-pick="4"] :is(.pm-card, .pm-lv, .pm-new)[data-c="4"], .pm-m[data-pick="5"] :is(.pm-card, .pm-lv, .pm-new)[data-c="5"],
.pm-m[data-pick="6"] :is(.pm-card, .pm-lv, .pm-new)[data-c="6"] { display: flex; }
.pm-m[data-pick="0"] .pm-li:has(.pm-lv.is-no[data-c="0"]) .pm-li-label, .pm-m[data-pick="1"] .pm-li:has(.pm-lv.is-no[data-c="1"]) .pm-li-label,
.pm-m[data-pick="2"] .pm-li:has(.pm-lv.is-no[data-c="2"]) .pm-li-label, .pm-m[data-pick="3"] .pm-li:has(.pm-lv.is-no[data-c="3"]) .pm-li-label,
.pm-m[data-pick="4"] .pm-li:has(.pm-lv.is-no[data-c="4"]) .pm-li-label, .pm-m[data-pick="5"] .pm-li:has(.pm-lv.is-no[data-c="5"]) .pm-li-label,
.pm-m[data-pick="6"] .pm-li:has(.pm-lv.is-no[data-c="6"]) .pm-li-label { color: var(--muted); }

.pm-links { display: flex; flex-wrap: wrap; gap: 12px; }
.pm-link { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.pm-link:hover { background: var(--hover); color: var(--ink); }
.pm-link-text { flex: 1; min-width: 0; }
.pm-link-title, .pm-link-sub { display: block; }
.pm-link-title { font-size: 14px; font-weight: 700; }
.pm-link-sub { font-size: 12px; color: var(--muted); }
.pm-link-sub[hidden] { display: none; }
.pm-link > svg { flex: none; width: 16px; height: 16px; color: var(--muted); }

/* 表格放不下（手机、窄窗口）时换成单列清单。 */
@container (max-width: 720px) {
  .pm-table, .pm-legend { display: none; }
  .pm-m { display: flex; flex-direction: column; gap: 14px; }
  .pm-m-intro { display: block; }
}
@media (max-width: 860px) {
  .pm-main { gap: 14px; padding: 16px 16px 112px; }
  .pm-title { font-size: 24px; }
  .pm-tabs { align-self: flex-start; }
}
/* 帮助中心里「用户组与权限」的入口：排在新人指引那张绿卡片下面，用浅灰底和它分开。 */
.pm-faq { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.pm-faq:hover { background: var(--hover); color: var(--ink); }
.pm-faq > .i { flex: none; width: 20px; height: 20px; color: var(--primary); }
/* 新人指引第一条回复在等审核（新号发帖先审核）：灰字，不是绿色的「已完成」。 */
.ob-step-pending { color: var(--muted); }

/* ===== 合作伙伴（/merchants，设计稿 Partners）：分类胶囊、搜索、翻面的商家卡片、底部的「成为合作伙伴」 =====
   卡片正面是金色的牌匾：深色模式下也保持金色（像一块实物铭牌），所以颜色写在这里，不跟主题变。 */
:root { --pt-gold: linear-gradient(135deg, #EFD28F 0%, #F6E5BC 48%, #F1D58E 100%); --pt-gold-line: #E2C27A; --pt-back: #16201D; --pt-handle: #2E9A6E; --pt-badge: #5CC79A; }
:root[data-theme="dark"] { --pt-gold-line: #B8955A; --pt-back: #1F2A26; }
.view[data-view="merchants"] > [data-view-title], .view[data-view="pay-apps"] > [data-view-title] { display: none; }
.view[data-view="merchants"] .view-body { gap: 18px; }
.pt-head { padding: 8px 0 4px; text-align: center; }
.pt-title { display: inline-flex; align-items: center; gap: 10px; }
.pt-title-icon { display: inline-flex; }
.pt-title-icon .i { width: 30px; height: 30px; }
.pt-title h1 { margin: 0; font-family: "Bricolage Grotesque", var(--font); font-size: 30px; font-weight: 800; line-height: 1.25; }
.pt-head p { max-width: 520px; margin: 6px auto 0; color: var(--muted); }
.pt-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.pt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pt-chip { display: flex; flex: none; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.pt-chip.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.pt-chip-n { font-weight: 400; opacity: .75; }
.pt-search { display: flex; flex: 0 1 240px; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.pt-search:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.pt-search .i { flex: none; width: 16px; height: 16px; }
.pt-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; }
.pt-search input:focus-visible { box-shadow: none; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.pt-card { position: relative; height: 160px; }
.pt-in { position: absolute; inset: 0; }
.pt-front, .pt-back { position: absolute; inset: 0; overflow: hidden; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .6s cubic-bezier(.45, .05, .35, 1); }
.pt-front { display: flex; width: 100%; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--pt-gold-line); background: var(--pt-gold); cursor: pointer; transform: perspective(900px) rotateY(0deg); }
.pt-back { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--pt-back); color: #FFFFFF; transform: perspective(900px) rotateY(-180deg); }
/* 键盘移进卡片（:focus-visible）也翻过来；点按留下的焦点不算，不然手机上点了就翻不回来。 */
.pt-card[data-flip="true"] .pt-front, .pt-card:has(:focus-visible) .pt-front, .pt-card.can-hover:hover .pt-front { transform: perspective(900px) rotateY(180deg); }
.pt-card[data-flip="true"] .pt-back, .pt-card:has(:focus-visible) .pt-back, .pt-card.can-hover:hover .pt-back { transform: perspective(900px) rotateY(0deg); }
/* 能悬停的设备上正面那个按钮只是给键盘用的：点它没有意义（鼠标移上去已经翻过来了）。 */
.pt-card.can-hover .pt-front { cursor: default; }
.pt-back-hit { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }
.pt-card.can-hover .pt-back-hit { display: none; }
.pt-name, .pt-meta, .pt-desc { position: relative; pointer-events: none; }
.pt-name { display: flex; min-width: 0; align-items: center; gap: 6px; }
.pt-name-text { overflow: hidden; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pt-badge { display: inline-flex; flex: none; color: var(--pt-badge); }
.pt-badge .i { width: 15px; height: 15px; }
.pt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pt-handle { padding: 0 8px; border-radius: 10px; background: var(--pt-handle); font-size: 11px; line-height: 20px; }
.pt-cat { font-size: 11px; opacity: .7; }
.pt-desc { display: -webkit-box; flex: 1; margin: 0; overflow: hidden; font-size: 12px; line-height: 1.5; opacity: .85; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pt-acts { position: relative; display: flex; gap: 6px; }
.pt-act { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 16px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pt-act .i { width: 13px; height: 13px; }
.pt-act.is-site, .pt-act.is-site:hover { background: #FFFFFF; color: #0B1F18; }
.pt-act.is-word, .pt-act.is-word:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.pt-act:hover { filter: brightness(1.12); }
/* 牌子：icon 品牌色方块白图形，white 白方块品牌色图形，word 图形加字标不带底。--pt-brand 是商家的品牌色。 */
.pt-plate { --pt-brand: #0F1A1C; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 88px; height: 88px; border-radius: 14px; box-shadow: 0 2px 8px rgba(120, 84, 10, .14); color: var(--pt-brand); }
.pt-plate .i { flex: none; width: 32px; height: 32px; }
.pt-plate.is-icon { background: var(--pt-brand); color: #FFFFFF; }
.pt-plate.is-white { background: #FFFFFF; }
.pt-plate.is-word { flex-direction: row; width: auto; height: auto; background: transparent; box-shadow: none; }
.pt-plate.is-word .i { width: 26px; height: 26px; }
.pt-en { font-size: 12px; font-weight: 800; white-space: nowrap; }
.pt-plate.is-white .pt-en { color: #0F1A1C; }
.pt-plate.is-word .pt-en { font-size: 18px; letter-spacing: .04em; }
.pt-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.pt-letter { font-size: 30px; font-weight: 800; line-height: 1; }
.pt-empty { margin: 0; padding: 48px 16px; color: var(--muted); text-align: center; }
.pt-hint { margin: -4px 0 0; color: var(--outline-text); font-size: 12px; text-align: center; }
.pt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px; border-radius: 16px; background: var(--night); color: var(--on-night); }
.pt-cta-text { flex: 1 1 280px; }
.pt-cta-t { font-size: 17px; font-weight: 800; }
.pt-cta-d { margin-top: 2px; font-size: 13px; opacity: .8; }
.pt-cta-go, .pt-cta-go:hover { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 22px; background: #FFFFFF; color: #0B1F18; font-size: 15px; font-weight: 700; white-space: nowrap; }
.pt-cta-go .i { width: 16px; height: 16px; }
/* 推广页、我的推广里的预览卡：只看正面和背面，不翻。 */
.pt-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.pt-preview .pt-card { pointer-events: none; }
.pt-preview .pt-card + .pt-card .pt-front { transform: perspective(900px) rotateY(180deg); }
.pt-preview .pt-card + .pt-card .pt-back { transform: perspective(900px) rotateY(0deg); }
@media (prefers-reduced-motion: reduce) { .pt-front, .pt-back { transition: none; } }
@media (max-width: 860px) {
  .pt-title h1 { font-size: 24px; }
  .pt-head p { font-size: 13px; }
  .pt-chips { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-start; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .pt-search { flex: 1 1 100%; }
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pt-card { height: 150px; }
  .pt-back { padding: 12px; }
  .pt-name-text { font-size: 15px; }
  .pt-desc { font-size: 11px; }
  .pt-plate { width: 76px; height: 76px; }
  .pt-plate .i { width: 28px; height: 28px; }
  .pt-plate.is-word .i { width: 22px; height: 22px; }
  .pt-en { font-size: 11px; }
  .pt-plate.is-word .pt-en { font-size: 15px; }
}

/* ===== 开放登录、能量星球（设计稿 OpenLogin、EnergyPay）：应用一行一个的列表、详情里的一格格 ===== */
.view[data-view="oauth-apps"] > [data-view-title] { font-family: "Bricolage Grotesque", var(--font); font-size: 28px; font-weight: 800; line-height: 1.25; }
.view[data-view="oauth-apps"] .view-body, .view[data-view="pay-apps"] .view-body { gap: 18px; }
.ol-tabs { display: flex; gap: 8px; margin: 0; }
.ol-tabs .tab { margin-bottom: -1px; border-bottom-width: 2px; font-size: 15px; }
.ol-body { display: flex; flex-direction: column; gap: 16px; }
.dv-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.dv-head-text { flex: 1 1 420px; min-width: 0; }
.dv-head h1 { margin: 0; font-family: "Bricolage Grotesque", var(--font); font-size: 28px; font-weight: 800; line-height: 1.25; }
.dv-head p { margin: 6px 0 0; color: var(--muted); }
.dv-lead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dv-lead > p { flex: 1 1 320px; margin: 0; color: var(--muted); }
.dv-lead-text { margin: 0; color: var(--muted); }
.dv-list-box { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.dv-row, .ep-order, .ol-grant { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.dv-list-box > :first-child { border-top: 0; }
.dv-who { display: flex; flex: 1 1 200px; min-width: 0; align-items: center; gap: 12px; }
.dv-ini { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--fill); color: var(--ink); font-weight: 800; }
.view[data-view="pay-apps"] .dv-ini { background: var(--level-bg); color: var(--signal-text); }
.dv-name { min-width: 0; }
.dv-title { font-weight: 700; overflow-wrap: anywhere; }
.dv-site { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dv-site code { font-family: var(--mono); }
.dv-id { flex: 2 1 200px; min-width: 0; }
.view[data-view="pay-apps"] .dv-id { flex: 0 1 140px; }
.dv-k { color: var(--muted); font-size: 11px; }
.dv-idv { display: flex; min-width: 0; align-items: center; gap: 4px; }
.dv-idv code { min-width: 0; overflow: hidden; font-family: var(--mono); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn.dv-copy { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); }
.iconbtn.dv-copy .i { width: 16px; height: 16px; }
.iconbtn.dv-copy:hover { background: var(--hover); }
.dv-state { flex: 1 1 140px; min-width: 0; }
.dv-note { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dv-note.is-bad { color: var(--danger); }
.dv-date { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dv-acts { display: flex; flex: 0 0 auto; gap: 6px; margin-left: auto; }
.btn.dv-btn { height: 34px; padding: 0 12px; border-radius: 17px; font-size: 13px; }
.btn.dv-btn.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.dv-empty-line { margin: 0; padding: 40px 16px; color: var(--muted); text-align: center; }
.dv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.dv-empty p { margin: 0; }
.dv-empty-face { display: flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: var(--level-bg); color: var(--signal-text); }
.dv-empty-face .i { width: 26px; height: 26px; }
.dv-empty-t { margin-top: 6px !important; font-size: 16px; font-weight: 700; }
.dv-empty .btn { margin-top: 8px; }
/* 详情弹窗：名字和状态，一句提醒，下面一格一格（左边 96 宽的名字）。 */
.dv-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.dv-callout { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.dv-callout.warn { background: var(--level-bg); color: var(--level-fg); }
.dv-callout.bad { background: var(--danger-bg); color: var(--danger); }
.dv-fact { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dv-fact-k { flex: 0 0 96px; color: var(--muted); font-size: 13px; }
.dv-fact-v { flex: 1 1 200px; min-width: 0; }
.dv-fact-v code { font-family: var(--mono); overflow-wrap: anywhere; }
.dv-list { display: flex; flex-direction: column; gap: 4px; }
.dv-secret-box { display: flex; flex-direction: column; gap: 8px; }
.dv-secret { font-family: var(--mono); overflow-wrap: anywhere; }
.dv-secret-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-secret-acts .btn.small, .dv-native .btn.small { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; }
.dv-native { display: flex; flex-direction: column; gap: 6px; }
/* 开放登录：接口地址那一块、要读取的资料、授权过的网站。 */
.ol-endpoint { padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.ol-endpoint-k { font-weight: 700; }
.ol-endpoint p { margin: 4px 0 10px; color: var(--soft); font-size: 13px; }
.ol-disc { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ol-disc code { flex: 1; min-width: 0; overflow-x: auto; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.ol-disc .iconbtn.dv-copy { width: 36px; height: 36px; }
.ol-more { height: 32px; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; }
.ol-eps { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin-top: 6px; font-size: 13px; }
.ol-eps[hidden] { display: none; }
.ol-eps .dv-k { font-size: 13px; }
.ol-eps code { font-family: var(--mono); overflow-wrap: anywhere; }
.ol-scopes { display: flex; flex-direction: column; gap: 8px; }
.ol-scopes-k { font-size: 14px; font-weight: 700; }
/* 弹窗表单里的 label 默认竖排，这一组要横排：左边勾选框，右边名字和说明。 */
.form .ol-scope, .ol-scope { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer; }
.ol-scope.is-locked { cursor: default; opacity: .7; }
.form .ol-scope > input[type="checkbox"], .ol-scope input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--primary-bg); }
.form .ol-scope { font-size: 14px; font-weight: 400; }
.ol-scope-text { display: flex; flex-direction: column; }
.ol-scope-name { font-weight: 700; }
.ol-scope-sub { color: var(--muted); font-size: 12px; }
.ol-gface { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; color: #FFFFFF; font-weight: 800; }
.ol-grant-main { flex: 1 1 200px; min-width: 0; }
.ol-grant-main .dv-site { white-space: normal; }
.ol-grant-when { flex: 0 1 auto; color: var(--muted); font-size: 12px; }
.ol-grant .btn.dv-btn { margin-left: auto; padding: 0 14px; background: var(--danger-bg); color: var(--danger); }
/* 能量星球：收款概览、最近订单、怎么接入。 */
.ep-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ep-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.ep-stat-k { color: var(--muted); font-size: 12px; }
.ep-stat-v { margin-top: 2px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ep-orders-wrap, .ep-orders { display: flex; flex-direction: column; gap: 10px; }
.ep-orders-wrap:empty { display: none; }
.ep-orders-wrap { gap: 18px; }
.ep-orders-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ep-orders-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.ep-orders-app { color: var(--muted); font-size: 13px; font-weight: 400; }
.ep-pick { height: 34px; padding: 0 10px; border-radius: 17px; }
.ep-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ep-filters .chip { height: 34px; padding: 0 12px; font-size: 13px; }
.ep-order { gap: 6px 16px; padding: 12px 16px; }
.ep-order-main { flex: 2 1 220px; min-width: 0; }
.ep-order-amt { flex: 0 0 auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.ep-order-time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.ep-order .btn.dv-btn { height: 32px; margin-left: auto; border-radius: 16px; font-size: 12px; }
.ep-order-gap { margin-left: auto; }
.ep-guide { padding: 18px; border-radius: 16px; background: var(--surface); }
.ep-guide h2 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.ep-steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ep-steps li { display: flex; gap: 12px; }
.ep-step-n { display: flex; flex: none; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--chip-on-bg); color: var(--chip-on-fg); font-size: 13px; font-weight: 800; }
.ep-step-t { font-weight: 700; }
.ep-step-d { color: var(--soft); font-size: 13px; }
.ep-api { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ep-api .dv-k { font-size: 13px; }
.ep-api code { font-family: var(--mono); overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .dv-head h1, .view[data-view="oauth-apps"] > [data-view-title] { font-size: 24px; }
  .ep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dv-fact-k { flex-basis: 96px; }
  .ep-api, .ol-eps { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .ep-api .dv-k, .ol-eps .dv-k { margin-top: 6px; }
}
/* 商家资料表单里卡片正面那几样（我的推广、后台的商家资料）：图形是一排可选的小方块，牌子样式是分段开关，下面是预览。 */
.ptf-fields { display: flex; flex-direction: column; gap: 14px; }
.ptf-field { display: flex; flex-direction: column; gap: 6px; }
/* 这几项也放进后台「商家」的资料弹窗（不在 .form 里）：标签、提示照表单的样子，不和输入框挤在一行。 */
.ptf-fields > label { display: flex; flex-direction: column; gap: 6px; }
.ptf-fields .label-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 700; }
.ptf-fields .label-line .hint { color: var(--muted); font-weight: 400; }
.ptf-color { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.ptf-glyphs { display: flex; flex-wrap: wrap; gap: 6px; }
.ptf-opt { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ptf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ptf-glyphs .ptf-opt { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.ptf-glyphs .ptf-opt:hover { background: var(--hover); }
.ptf-glyphs .ptf-opt.on { border-color: var(--primary); box-shadow: var(--focus-ring); color: var(--primary); }
.ptf-glyphs .ptf-opt:has(input:focus-visible), .ptf-plates .ptf-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.ptf-glyph { display: inline-flex; }
.ptf-glyph .i { width: 22px; height: 22px; }
.ptf-none { font-size: 12px; color: var(--muted); }
.ptf-plates { align-self: flex-start; }
.ptf-plates .ptf-opt { height: 28px; padding: 0 12px; border-radius: 14px; color: var(--muted); font-size: 12px; }
.ptf-plates .ptf-opt.on { background: var(--seg-on); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .14), 0 2px 6px rgba(15, 26, 28, .08); }
.ptf-preview .pt-preview { max-width: 460px; }
@media (max-width: 860px) { .pt-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 表单排成几列时，卡片那一块占满一整行（预览要横着放两张卡）。 */
.form > .ptf-fields { grid-column: 1 / -1; }
.form > .ptf-fields > label, .form > .ptf-fields > .ptf-field { max-width: 460px; }

/* 「有新内容」的气泡（live.js）：列表上压在列表顶上那条分隔线的正中、往下滚时贴在顶栏下面（高度为 0 的一条，不把列表往下推）；
   主题页上浮在右下角，手机上在底部评论条上面、居中。配色和提示条（toast）一样。插进来的新卡片、新回复短暂高亮一下。 */
.lvu-dock { position: sticky; top: 84px; z-index: 20; display: flex; justify-content: center; height: 0; }
.lvu-bubble { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 36px; margin-top: -18px; padding: 0 16px 0 12px; border: 0; border-radius: 18px; background: var(--toast-bg); color: var(--toast-fg); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--toast-shadow); cursor: pointer; animation: lvu-in .24s cubic-bezier(.2, .8, .2, 1); }
.lvu-bubble[hidden] { display: none; }
.lvu-bubble svg { width: 16px; height: 16px; flex: none; color: var(--toast-ok); }
.lvu-bubble:hover { background: color-mix(in srgb, var(--toast-bg) 88%, var(--toast-fg)); }
.lvu-bubble[aria-busy="true"] { cursor: progress; opacity: .75; }
.lvu-bubble.lvu-float { position: fixed; z-index: 55; right: 24px; bottom: 24px; margin: 0; }
@keyframes lvu-in { from { opacity: 0; transform: translateY(-6px); } }
.lvu-bubble.lvu-float { animation-name: lvu-up; }
@keyframes lvu-up { from { opacity: 0; transform: translateY(6px); } }
.lvu-new { --lvu-hl: color-mix(in srgb, var(--primary) 14%, transparent); animation: lvu-glow 2.6s ease-out; }
.lvu-new.lvu-still { box-shadow: inset 0 0 0 100vmax var(--lvu-hl); }
@keyframes lvu-glow { 0%, 35% { box-shadow: inset 0 0 0 100vmax var(--lvu-hl); } 100% { box-shadow: inset 0 0 0 100vmax transparent; } }
@media (max-width: 860px) {
  .lvu-dock { top: 80px; }
  .lvu-bubble.lvu-float { right: auto; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); translate: -50% 0; }
}

/* ==== 后台「成就」（admin-achievements.js，设计稿「后台 · 成就管理」）==== */
/* 档次（铜、银、金、稀有）和发放方式（自动、可重复、管理员发放、已停止）的颜色：浅底、深色字、档次的圈。 */
:root {
  --aa-t1-bg: #F6E8DD; --aa-t1-fg: #8A4B1F; --aa-t1-ring: #D9A77F;
  --aa-t2-bg: #EEF1F4; --aa-t2-fg: #4A5966; --aa-t2-ring: #B5C0C9;
  --aa-t3-bg: #FBF1D6; --aa-t3-fg: #7A5600; --aa-t3-ring: #E2BC52;
  --aa-t4-bg: #F1E8FD; --aa-t4-fg: #6D28D9; --aa-t4-ring: #B89AF0;
  --aa-auto-bg: #E6F4EE; --aa-auto-fg: #005C3D; --aa-rep-bg: #E6F0F3; --aa-rep-fg: #0E6075;
  --aa-manual-bg: #FDF3D7; --aa-manual-fg: #7A4E00; --aa-stop-bg: #EEF1F4; --aa-stop-fg: #576F76;
  --aa-faint: #8BA2AD; --aa-zero: #B5C4CB; --aa-rowline: #EEF2F4; --aa-bar: #5DB592; --aa-on: #EEF7F2;
}
:root[data-theme="dark"] {
  --aa-t1-bg: #3A271A; --aa-t1-fg: #F0B98E; --aa-t1-ring: #7A4E2E;
  --aa-t2-bg: #2A2F35; --aa-t2-fg: #C9D3DC; --aa-t2-ring: #5A6670;
  --aa-t3-bg: #3A3018; --aa-t3-fg: #F2CF6B; --aa-t3-ring: #7A6326;
  --aa-t4-bg: #2A2142; --aa-t4-fg: #C4B5FD; --aa-t4-ring: #5B4699;
  --aa-auto-bg: #173326; --aa-auto-fg: #6FCFA8; --aa-rep-bg: #13323A; --aa-rep-fg: #7DD3E8;
  --aa-manual-bg: #3A2E12; --aa-manual-fg: #FFCF94; --aa-stop-bg: #272B2F; --aa-stop-fg: #99A3A8;
  --aa-faint: #7D878D; --aa-zero: #4A5056; --aa-rowline: #262A2E; --aa-bar: #3FB98A; --aa-on: #1F2724;
}
.aa-row:has(.is-off) .aa-name b { color: var(--muted); }

/* ===== 付费广告（模板 ads.html，脚本 ads.js；推广细则见 docs/specs/promotion.md「页面上的广告位」） =====
   侧栏广告位（设计稿 Main / Node / Post 的「推广」、Mobile-Post 首帖下面）：浅灰底、圆角 16 的一块。几帧叠在同一格里，
   高度取最高的那一帧，换帧只是淡入，不跳动；不是当前帧的看不见、也点不到（inert）。图片圆角 12；图上不标「广告」、没有菜单，只在左下角标一次。
   宽屏在右栏最下面；手机上首页、节点页不放（Mobile-Home、Mobile-Node 稿上没有），主题页放在首帖下面。阅读模式下不显示。 */
.adr { padding: 12px 12px 8px; border-radius: 16px; background: var(--panel); }
.adr-stage { display: grid; }
.adr-frame { grid-area: 1 / 1; align-self: center; visibility: hidden; opacity: 0; }
.adr-frame.on { visibility: visible; opacity: 1; animation: adr-in .45s ease; }
@keyframes adr-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .adr-frame.on { animation: none; } }
.adr-frame.is-small { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* 横幅一帧两条（James 2026-11-23，照稿）：和大图、小图同在一格时拉高撑满整块，图按比例放大裁掉多余部分；只有横幅时按原比例。 */
.adr-frame.is-medium { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.is-medium .adr-cell { display: flex; flex: 1 1 auto; flex-direction: column; }
.is-medium .adr-cell .adr-tile { flex: 1 1 auto; }
/* 没投满的位置：虚线框里一个「投放广告」，大小和那一种广告一样。 */
.adr-open { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; border: 1.5px dashed var(--outline); border-radius: 12px; background: var(--bg); color: var(--muted); text-align: center; text-decoration: none; }
.adr-open b { color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .02em; line-height: 1.3; }
.adr-open span { font-size: 11px; font-variant-numeric: tabular-nums; }
.adr-open:hover { border-color: var(--primary); }
.adr-open:hover b { color: var(--primary); }
.is-small .adr-open { aspect-ratio: 1 / 1; }
.is-medium .adr-open { flex: 1 1 auto; aspect-ratio: 258 / 121; }
.adr-cell { position: relative; min-width: 0; }
.adr-tile { display: block; overflow: hidden; border-radius: 12px; background: var(--fill); aspect-ratio: 258 / 250; }
.is-small .adr-tile { aspect-ratio: 1 / 1; }
.is-medium .adr-tile { aspect-ratio: 258 / 121; }
.adr-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.adr-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.adr-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.adr-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.adr-dots { display: flex; flex: 1; align-items: center; justify-content: center; }
.adr-dot { display: flex; width: 10px; height: 16px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.adr-dot::before { width: 6px; height: 6px; flex: none; border-radius: 3px; background: var(--thread); content: ""; transition: width .2s ease; }
.adr-dot[aria-pressed="true"] { width: 20px; }
.adr-dot[aria-pressed="true"]::before { width: 16px; background: var(--ink); }
.adr-buy { color: var(--primary); font-size: 12px; font-weight: 700; white-space: nowrap; }
.adr-inline { margin: 0 0 4px; }
@media (max-width: 860px) {
  /* 手机上轮播点加大点的地方（照 Mobile-Post）。 */
  .adr-dot { width: 20px; height: 28px; }
  .adr-dot[aria-pressed="true"] { width: 24px; }
}
@media (max-width: 999px) { .aside > .adr-wrap { max-width: 360px; } }
:root[data-reader] .adr-wrap { display: none !important; }

/* 信息流广告（设计稿 PromoteFeed）：插在首页、节点页的主题列表里，和主题一样的内边距和分隔线。
   卡片视图：「店铺图标 u/广告主 广告 ⋯」、标题、摘要、16:9 的图、「域名 · 了解更多」；⋯ 菜单是「关于这条广告」「不感兴趣」「举报」。
   宽屏的列表视图：左边 56×42 的小图，右边「u/广告主 广告」和一行标题，整行铺满，不进投票、回复那几列。手机上总是卡片。 */
.fad { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fad-thumb { display: none; }
.fad-who { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.fad-face { display: flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, var(--bg)); color: var(--primary); }
.fad-face .i { width: 14px; height: 14px; }
.fad-by { min-width: 0; overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.fad-by:hover { color: var(--primary); }
.fad-tag { flex: none; padding: 0 6px; border-radius: 6px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 18px; }
.fad-menu { width: 32px; height: 32px; margin: -6px -8px -6px 0; color: var(--muted); }
.fad-menu .i { width: 18px; height: 18px; }
.fad-menu:hover, .fad-menu[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
/* 标题和旁边的主题一样大：节点页 18，首页（.slim）宽屏 16，手机 16。 */
.fad-title { display: block; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.feed.slim .fad-title { font-size: 16px; }
@media (max-width: 860px) { .fad-title { font-size: 16px; } }
.fad-title:hover { color: var(--primary); }
.fad-desc { display: -webkit-box; margin: 0; overflow: hidden; color: var(--soft); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fad-media { display: block; margin-top: 4px; overflow: hidden; border-radius: 12px; background: var(--fill); aspect-ratio: 16 / 9; }
.fad-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fad-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.fad-domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fad-more { flex: none; height: 28px; padding: 0 12px; border: 1px solid var(--primary); border-radius: 14px; color: var(--primary); font-weight: 700; line-height: 26px; }
.fad-more:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--primary); }
@media (min-width: 861px) {
  :root[data-feed="compact"] .feed .fad { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; min-height: 44px; padding: 10px 16px; }
  :root[data-feed="compact"] .feed .fad-thumb { display: flex; grid-column: 1; grid-row: 1 / 3; width: 56px; height: 42px; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: var(--fill); color: var(--outline-text); }
  :root[data-feed="compact"] .feed .fad-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  :root[data-feed="compact"] .feed .fad-who { grid-column: 2; grid-row: 1; gap: 6px; }
  :root[data-feed="compact"] .feed .fad-face { display: none; }
  :root[data-feed="compact"] .feed .fad-title { grid-column: 2; grid-row: 2; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  :root[data-feed="compact"] .feed :is(.fad-desc, .fad-media, .fad-foot) { display: none; }
  :root[data-feed="compact"] .feed .fad-menu { opacity: 0; transition: opacity .15s ease; }
  :root[data-feed="compact"] .feed .fad:is(:hover, :focus-within) .fad-menu, :root[data-feed="compact"] .feed .fad-menu[aria-expanded="true"] { opacity: 1; }
}
@media (hover: none) and (min-width: 861px) { :root[data-feed="compact"] .feed .fad-menu { opacity: 1; } }
/* 主题页桌面端首帖下面那一条（James 2026-11-23）：和信息流里的卡片一样，单独放时加一圈边框、圆角 16（和最佳答案卡片一样）；
   不管列表选的是卡片还是列表视图，这里总是卡片。手机上不放（那里是侧栏广告位），阅读模式下不显示。 */
.fad-post > .fad { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
/* 2026-11-24 James：这一条改成小图样式——左边和列表视图一样的 56×42 小图（没图是喇叭），不画 16:9 的大图；
   广告主那一行和底下的域名、「了解更多」占满整行，小图和标题、摘要并排。首页、节点页信息流里的不变。 */
.fad-post > .fad { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: start; }
.fad-post > .fad > :is(.fad-who, .fad-foot) { grid-column: 1 / -1; }
.fad-post > .fad > .fad-thumb { display: flex; grid-column: 1; grid-row: 2 / span 2; width: 56px; height: 42px; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: var(--fill); color: var(--outline-text); }
.fad-post > .fad > .fad-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fad-post > .fad > :is(.fad-title, .fad-desc) { grid-column: 2; }
.fad-post > .fad > .fad-title { font-size: 16px; }
.fad-post > .fad > .fad-media { display: none; }
:root[data-reader] .fad-post { display: none !important; }
/* 「关于这条广告」弹窗（ads.js）：几段说明，下面一排「不感兴趣」「举报」，右边「了解广告投放」。手机上是底部面板（st-sheet）。 */
.ad-about .modal-body { gap: 10px; }
.ad-about .modal-body p { margin: 0; color: var(--soft); line-height: 1.6; }
.ad-about .modal-body p a { color: var(--primary); font-weight: 700; }
.ad-about .modal-body p b { color: var(--ink); }
.ad-about .modal-body h3 { margin: 6px 0 -6px; color: var(--ink); font-size: 14px; }
.ad-about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.ad-about-learn { margin-left: auto; }
.set-bounce-alert { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; line-height: 1.6; }

/* ===== 搜索结果页（设计稿「搜索」2026-11-23，templates/search.html） =====
   卡片视图下结果一栏 760 居中（页面本身仍是全站的 1124）；列表视图下跟着变全宽（data-wide）。 */
.main.solo.srch-main { padding: 24px 0 96px; }
.srch { --srch-mark: #FFE9A8; --srch-rule: color-mix(in srgb, var(--line) 55%, var(--bg));
  display: flex; width: 100%; max-width: 760px; flex-direction: column; gap: 18px; margin: 0 auto; }
:root[data-theme="dark"] .srch { --srch-mark: #5C4A14; }
.srch-field { display: flex; height: 52px; align-items: center; gap: 10px; padding: 0 8px 0 16px; border: 1px solid var(--line); border-radius: 26px; background: var(--bg); color: var(--muted); }
.srch-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.srch-field > .i { flex: none; width: 20px; height: 20px; }
.srch-field input[type="search"] { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 16px; box-shadow: none; }
.srch-field input[type="search"]::-webkit-search-cancel-button { display: none; }
.srch-clear { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--soft); }
.srch-clear[hidden] { display: none; }
.srch-clear .i { width: 16px; height: 16px; stroke-width: 2.4; }
.srch-scope { margin: -6px 0 0; font-size: 13px; }
.srch-results { display: flex; flex-direction: column; gap: 18px; }
.srch-results.loading { opacity: .55; transition: opacity .18s ease; }
.srch-kinds { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.srch-kinds::-webkit-scrollbar { display: none; }
.srch-kind { display: flex; flex: none; height: 40px; align-items: center; gap: 6px; padding: 0 16px; border-radius: 20px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 700; }
.srch-kind:hover { color: var(--ink); filter: brightness(.95); }
.srch-kind.on { background: var(--chip-on-bg); color: var(--chip-on-fg); filter: none; }
.srch-kind-n { font-weight: 400; opacity: .75; }
.srch-sec { display: flex; flex-direction: column; gap: 4px; }
.srch-head { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 8px; }
.srch-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.srch-sort { display: flex; height: 36px; align-items: center; gap: 6px; padding: 0 12px; border-radius: 18px; color: var(--soft); font-size: 13px; font-weight: 700; }
.srch-sort:hover { background: var(--hover); color: var(--ink); }
.srch-sort .i { width: 16px; height: 16px; }
.srch-box { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.srch-post { padding: 14px 16px; }
.srch-box > * + * { border-top: 1px solid var(--srch-rule); }
.srch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.srch-node { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; }
.srch-node:hover { color: var(--ink); text-decoration: underline; }
.srch-node .avatar { width: 20px; height: 20px; font-size: 11px; }
.srch-who { color: var(--muted); }
.srch-who:hover { color: var(--ink); }
.srch-badge { display: inline-flex; height: 20px; align-items: center; padding: 0 7px; border-radius: 10px; background: var(--level-bg); color: var(--level-fg); font-weight: 700; }
.srch-link { display: block; margin-top: 4px; color: var(--ink); }
.srch-link:hover { color: var(--ink); }
.srch-link:hover .srch-title { text-decoration: underline; }
.srch-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.srch-excerpt { display: -webkit-box; margin-top: 2px; overflow: hidden; color: var(--soft); font-size: 14px; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.srch mark { padding: 0 1px; border-radius: 3px; background: var(--srch-mark); color: inherit; }
.srch-stats { display: flex; gap: 16px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.srch-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.srch-stats .i { width: 14px; height: 14px; }
.srch-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.srch-nodecard { display: flex; min-width: 0; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
/* 同一行的卡片等高（2026-11-24 James）：头像、名字那一块固定在顶上（.srch-id 在用户一行里是横着撑满的 flex: 1，竖排的卡片里不能撑高，
   不然内容被挤到中间），简介紧跟着、最多 3 行，「加入」用 margin-top: auto 压到底，一行卡片的头像、按钮都对齐。 */
.srch-nodecard > .srch-id { flex: none; }
.srch-nodecard > .srch-desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.srch-nodecard > .srch-join { margin-top: auto; }
.srch-id { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; color: var(--ink); }
.srch-id:hover { color: var(--ink); }
.srch-id .avatar { flex: none; }
.srch-id-text { display: flex; min-width: 0; flex-direction: column; }
.srch-id-text strong { display: flex; min-width: 0; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.srch-id-text small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.srch-id:hover strong { text-decoration: underline; }
.srch-desc { margin: 0; color: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
.srch-join, .srch-follow { display: inline-flex; flex: none; height: 36px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 18px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.srch-join { align-self: flex-start; background: var(--primary-bg); color: var(--on-primary); }
.srch-join.on, .srch-follow.on { border-color: var(--fill); background: var(--fill); color: var(--ink); }
.srch-follow { border-color: var(--outline); background: var(--bg); color: var(--ink); }
:is(.srch-join, .srch-follow):not([aria-disabled]):hover { filter: brightness(.95); }
:is(.srch-join, .srch-follow):not([aria-disabled]):active { scale: .95; }
:is(.srch-join, .srch-follow)[aria-disabled] { cursor: default; opacity: .6; }
.srch-user { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.srch-user .srch-id { gap: 12px; }
.srch-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-tag { display: inline-flex; height: 40px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 700; }
.srch-tag:hover { background: var(--hover); color: var(--ink); }
.srch-tag span { color: var(--muted); font-size: 12px; font-weight: 400; }
.srch-more { display: inline-flex; align-self: flex-start; align-items: center; gap: 2px; padding: 6px 4px; color: var(--primary); font-size: 13px; font-weight: 700; }
.srch-more .i { width: 16px; height: 16px; }
.srch-empty { padding: 64px 16px; color: var(--muted); text-align: center; }
.srch-empty-title { color: var(--ink); font-size: 17px; font-weight: 700; }
.srch-empty p + p { margin-top: 4px; }
@media (max-width: 860px) {
  .main.solo.srch-main { padding: 12px 16px 112px; }
  .srch { gap: 16px; }
  .srch-results { gap: 16px; }
  .srch-field { height: 48px; }
  .srch-kinds { margin: 0 -16px; padding: 0 16px; }
}

/* ===== 节点管理 · 频道（设计稿「节点管理」的频道页，2026-11-23；node-manage.js 的 channels）=====
   卡片、汇总条、空状态、右侧抽屉（选平台 → 填内容源 → 怎么发帖）。平台色是各家的品牌色，深浅两种主题都不变。 */
.nch-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 13px; }
.nch-summary b { color: var(--ink); }
.nch-summary-err { color: var(--danger); font-weight: 700; }
.nch-summary-next { margin-left: auto; }
.nch-list { display: flex; flex-direction: column; gap: 12px; }
.nch-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.nch-card.is-err { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.nch-card-main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 16px; }
.nch-card-ic { display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; color: #FFFFFF; }
.nch-card-ic .i { width: 22px; height: 22px; }
.nch-card-body { flex: 1 1 260px; min-width: 0; }
.nch-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nch-card-title h3 { margin: 0; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.nch-status { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 22px; white-space: nowrap; }
.nch-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nch-status.ok { background: var(--unread); color: var(--primary-hover); }
.nch-status.paused { background: var(--fill); color: var(--muted); }
.nch-status.err { background: var(--danger-bg); color: var(--danger); }
.nch-card-src { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.nch-card-src code { font-family: var(--mono); font-size: 12px; }
.nch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nch-chip { display: inline-flex; max-width: 100%; align-items: center; overflow: hidden; padding: 0 8px; border-radius: 10px; background: var(--surface); color: var(--soft); font-size: 12px; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.nch-stats { display: flex; flex: none; gap: 20px; text-align: right; }
.nch-stats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nch-stats small { color: var(--muted); font-size: 12px; }
.nch-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 16px 12px; padding: 10px 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 13px; line-height: 1.6; }
.nch-alert > .i { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.nch-alert > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nch-alert.is-soft { background: var(--level-bg); color: var(--level-fg); }
.nch-alert-detail { display: block; margin-top: 2px; opacity: .8; font-family: var(--mono); font-size: 11px; }
.nch-retry { flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: var(--bg); color: var(--danger); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.nch-retry:disabled { opacity: .6; }
.nch-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.nch-last { min-width: 0; color: var(--muted); font-size: 12px; }
.nch-grow { flex: 1; }
.nch-break { display: none; }
.nch-btn { display: inline-flex; height: 32px; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.nch-btn:hover { background: var(--hover); }
.nch-btn[aria-disabled="true"], .nch-btn:disabled { opacity: .5; cursor: default; }
.nch-btn.is-text { border-color: transparent; background: transparent; }
.nch-btn.is-text .i { width: 14px; height: 14px; transition: rotate .15s; }
.nch-btn.is-open .i { rotate: 180deg; }
.nch-del { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--danger); cursor: pointer; }
.nch-del:hover { background: var(--danger-bg); }
.nch-del .i { width: 16px; height: 16px; }
.nch-recent { padding: 4px 16px 12px; border-top: 1px solid var(--line); }
.nch-recent-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.nch-recent-row:last-child { border-bottom: 0; }
a.nch-recent-row:hover .nch-recent-t { color: var(--primary); }
.nch-recent-t { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.nch-recent-row time { flex: none; color: var(--muted); font-size: 12px; }
.nch-badge { flex: none; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.nch-badge.ok { background: var(--unread); color: var(--primary-hover); }
.nch-badge.wait { background: var(--level-bg); color: var(--level-fg); }
.nch-badge.muted { background: var(--fill); color: var(--muted); }
.nch-badge.err { background: var(--danger-bg); color: var(--danger); }
.nch-recent-none { padding: 10px 0; color: var(--muted); font-size: 13px; }
.nch-empty { padding: 28px; border: 1px dashed var(--outline); border-radius: 16px; background: var(--bg); }
.nch-empty > b { display: block; font-size: 16px; font-weight: 800; }
.nch-empty > p { margin: 4px 0 16px; color: var(--muted); }
/* 平台卡片：抽屉里两列，空状态里按宽度铺。 */
.nch-plats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nch-plats.is-wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.nch-plat { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); text-align: left; cursor: pointer; }
.nch-plat:hover { border-color: var(--outline); }
.nch-plat.is-on { padding: 13px; border: 2px solid var(--primary); background: var(--unread); }
.nch-plat[aria-disabled="true"] { cursor: default; }
.nch-plat[aria-disabled="true"]:not(.is-on) { opacity: .5; }
.nch-plat[aria-disabled="true"]:hover { border-color: var(--line); }
.nch-plat-ic { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; color: #FFFFFF; }
.nch-plat-ic .i { width: 18px; height: 18px; }
.nch-plat b { display: block; font-weight: 800; }
.nch-plat small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
/* 抽屉 */
.drawer-panel.nch-drawer { width: min(560px, 100vw); }
.nch-drawer .drawer-panel-body { gap: 22px; padding: 20px 22px; }
.nch-drawer .drawer-panel-foot { align-items: center; padding: 14px 22px; }
.nch-save-hint { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.nch-step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.nch-step-head > span { display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; }
.nch-step-head > b { font-size: 15px; font-weight: 800; }
.nch-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.nch-label small { margin-left: 6px; color: var(--outline-text); font-size: 13px; font-weight: 400; }
.nch-src { display: flex; gap: 8px; }
.nch-drawer input[type="text"] { display: block; width: 100%; height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--outline); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.nch-drawer input[type="text"]:focus { border-color: var(--primary); outline: 0; box-shadow: var(--focus-ring); }
.nch-drawer input[type="text"][aria-invalid="true"] { border-color: var(--danger); }
.nch-drawer input[type="text"]:read-only { background: var(--surface); color: var(--muted); }
.nch-src input[type="text"] { flex: 1; min-width: 0; }
.nch-check { flex: none; height: 42px; border-radius: 21px; background: var(--ink); color: var(--bg); }
.nch-check:hover { color: var(--bg); }
.nch-err { margin: 6px 0 0; color: var(--danger); font-size: 12px; line-height: 1.6; }
.nch-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.nch-found { margin-top: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); border-radius: 12px; background: var(--unread); }
.nch-found-head { display: flex; align-items: center; gap: 10px; }
.nch-found-head > div { flex: 1; min-width: 0; }
.nch-found-head b { display: block; overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.nch-found-head small { color: var(--muted); font-size: 12px; }
.nch-found-ic { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; color: #FFFFFF; font-weight: 800; }
.nch-found-ok { flex: none; color: var(--primary); }
.nch-found-label { margin-top: 8px; color: var(--muted); font-size: 12px; }
.nch-found-row { display: flex; gap: 8px; padding: 5px 0; font-size: 13px; }
.nch-found-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nch-found-row time { flex: none; color: var(--outline-text); }
.nch-found-row.is-quiet { color: var(--muted); line-height: 1.6; }
.nch-step { transition: opacity .15s; }
.nch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nch-field { min-width: 0; }
.nch-field.is-wide, .nch-switches { grid-column: 1 / -1; }
.nch-stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--outline); border-radius: 10px; }
.nch-stepper button { width: 40px; height: 40px; border: 0; background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; }
.nch-step-n { min-width: 48px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.nch-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 19px; background: var(--fill); }
.nch-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: transparent; color: var(--ink); font-size: 13px; cursor: pointer; }
.nch-seg button[aria-pressed="true"] { background: var(--seg-on); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 26, 28, .12); }
.nch-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.nch-switches { display: flex; flex-direction: column; gap: 8px; }
.nch-switch { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); text-align: left; cursor: pointer; }
.nch-switch > span { flex: 1; min-width: 0; }
.nch-switch b { display: block; font-weight: 700; }
.nch-switch small { display: block; color: var(--muted); font-size: 12px; }
.nch-switch > i { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--outline); transition: background .18s; }
.nch-switch > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; transition: left .18s; }
.nch-switch[aria-checked="true"] > i { background: var(--primary-bg); }
.nch-switch[aria-checked="true"] > i::after { left: 19px; }
.nch-pv { display: block; margin-top: 16px; }
.nch-pv-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.nch-preview { margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.nch-pv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.nch-pv-meta b { color: var(--ink); }
.nch-pv-from { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--surface); color: var(--soft); line-height: 18px; }
.nch-pv-title { margin-top: 4px; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.nch-pv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.nch-pv-tags span { padding: 0 8px; border-radius: 10px; background: var(--fill); font-size: 12px; line-height: 20px; }
@media (max-width: 860px) {
  .nch-summary-next { margin-left: 0; }
  .nch-stats { width: 100%; justify-content: flex-start; gap: 24px; padding-left: 58px; text-align: left; }
  .nch-stats > div { display: flex; align-items: baseline; gap: 6px; }
  .nch-stats b { display: inline; font-size: 16px; }
  /* 手机：第一行是状态和「最近发出的」，按钮另起一行。 */
  .nch-card-foot { gap: 6px; }
  .nch-last { flex: 1 1 0; }
  .nch-grow { display: none; }
  .nch-break { display: block; flex-basis: 100%; height: 0; }
  .nch-empty { padding: 20px 16px; }
  .nch-plats.is-wide { grid-template-columns: 1fr 1fr; }
  .nch-drawer .drawer-panel-body { padding: 16px; }
  .nch-drawer .drawer-panel-foot { flex-wrap: wrap; padding: 12px 16px; }
  .nch-save-hint { flex: 1 1 100%; }
  .nch-grid { grid-template-columns: minmax(0, 1fr); }
}
