/* ---- Swiss forum: application components (extends style.css) ---- */
:root {
  --red: #e30613;
  --ok: #0b7a3b;
  --warn: #b26b00;
}

a.wordmark { display: flex; align-items: baseline; gap: 14px; }
a.wordmark:hover h1 { color: var(--red); }

.nav .spacer { flex: 1; }
.nav .badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  margin-left: 6px;
  vertical-align: 1px;
  font-weight: 700;
}

/* flash + panels */
.flash {
  border: var(--rule);
  border-left: 6px solid var(--ink);
  padding: 12px 16px;
  margin: 18px 0 0;
  font-size: 14px;
}
.flash.ok { border-left-color: var(--ok); }
.flash.err { border-left-color: var(--red); }

.panel {
  border: var(--rule);
  padding: 34px 28px;
  margin: 28px 0 60px;
}
.panel h2 { font-size: 44px; letter-spacing: -0.04em; margin-bottom: 12px; }
.panel p { margin-bottom: 10px; }
.panel a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

.empty {
  padding: 26px 0 !important;
  color: var(--grey);
  font-size: 14px;
  list-style: none;
}

/* sidebar note */
.side-note { margin-top: 26px; border-top: var(--hair); padding-top: 16px; }
.side-note h2 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--grey); margin-bottom: 10px;
}
.side-note p { font-size: 13px; color: #333; line-height: 1.5; }

/* ---- forms ---- */
label.f { display: block; margin-bottom: 22px; }
.f-l {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--grey);
  margin-bottom: 7px;
}
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%;
  border: var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
  outline: none;
  border-radius: 0;
  appearance: none;
}
select { background-image: none; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.f-h { display: block; font-size: 12px; color: var(--grey); margin-top: 7px; }
.f-h.ok { color: var(--ok); }
.f-h.err { color: var(--red); }

.cap-row { display: flex; gap: 14px; align-items: stretch; }
.cap-row input { flex: 1; text-transform: uppercase; letter-spacing: .25em; font-weight: 700; }
.cap-row img {
  border: var(--rule);
  cursor: pointer;
  background: #fff;
  display: block;
}

button, .btn {
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--ink);
  color: var(--paper);
  border: var(--rule);
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 0;
}
button:hover, .btn.solid:hover { background: var(--red); border-color: var(--red); }
a.btn { display: inline-block; text-decoration: none; }
button.wide { width: 100%; padding: 15px 24px; }

.compose { margin: 26px 0 70px; max-width: 780px; }
.compose .row { display: flex; align-items: center; gap: 16px; }
.compose .spacer { flex: 1; }

/* ---- auth ---- */
.auth { display: grid; place-items: start center; padding: 40px 0 80px; }
.auth-card {
  width: 100%;
  max-width: 460px;
  border: var(--rule);
  padding: 34px 30px 30px;
}
.auth-card h2 {
  font-size: 40px;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 26px;
  line-height: .95;
}
.auth .alt {
  margin-top: 20px;
  padding-top: 18px;
  border-top: var(--hair);
  font-size: 13px;
  color: var(--grey);
}
.auth .alt a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ---- posts ---- */
.postimg {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--rule);
  margin: 14px 0;
}
.posts .body p.li { padding-left: 4px; }
.thread-head .stats .spacer { flex: 1; }
.thread-head .stats a.btn {
  font-size: 11px;
  padding: 8px 14px;
  letter-spacing: .1em;
}

/* ---- private messages ---- */
.dm-wrap {
  border-top: var(--rule);
  padding: 24px 0 6px;
  max-width: 820px;
}
.dm { margin-bottom: 22px; max-width: 78%; }
.dm-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--grey);
  margin-bottom: 7px;
}
.dm-body {
  border: var(--rule);
  padding: 13px 16px;
  background: var(--paper);
}
.dm.me { margin-left: auto; }
.dm.me .dm-meta { text-align: right; }
.dm.me .dm-body { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dm.me .dm-body p { color: var(--paper); }
.dm.me .dm-body .postimg { border-color: #fff; }

/* ---- upload ---- */
.uploader { border: var(--rule); padding: 14px 16px; margin-top: 14px; }
.uploader .u-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--grey); margin-bottom: 10px;
}
.uploader input[type=file] { border: none; padding: 0; font-size: 13px; }
.u-bar { height: 6px; background: #e6e6e6; margin-top: 12px; }
.u-bar > i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.u-msg { font-size: 12px; margin-top: 9px; color: var(--grey); }
.u-msg.ok { color: var(--ok); }
.u-msg.err { color: var(--red); }

/* ---- focus / accessibility ---- */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 860px) {
  .auth { padding: 22px 0 60px; }
  .auth-card { border-left: none; border-right: none; padding: 26px 0; }
  .cap-row { flex-direction: column; }
  .cap-row img { width: 168px; }
  .dm { max-width: 100%; }
}

/* ==========================================================================
   动效层 —— 统一缓动，丝滑优先
   ========================================================================== */
:root {
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, .84, .44, 1);
  --dur: .28s;
  --dur-slow: .55s;
  --nav-h: 0px;
}

/* ---- 入场：主内容分块上浮 ---- */
@keyframes riseIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown {
  from { opacity: 0; transform: translate3d(0, -12px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.6); }
  60%  { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes sweep {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .45; }
}

.reveal { animation: riseIn var(--dur-slow) var(--ease-out) both; }
main > *:nth-child(2) { animation-delay: .06s; }
main > *:nth-child(3) { animation-delay: .12s; }
main > *:nth-child(4) { animation-delay: .18s; }
main > *:nth-child(5) { animation-delay: .24s; }
.reveal:nth-child(2) { animation-delay: .06s; }
.reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; }

body { animation: fadeIn .3s var(--ease) both; }

/* ---- 导航：下划线滑出 + 触感 ---- */
.nav a { position: relative; transition: color var(--dur) var(--ease); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a:active { transform: translateY(1px); }
.nav .badge { animation: popIn .35s var(--ease-out) both; }
.nav .nav-bell { letter-spacing: .06em; }
.nav .nav-mod { color: var(--red); }

/* ---- 按钮：抬升 + 颜色过渡 ---- */
button, .btn {
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
button:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -2px rgba(0,0,0,.18); }
button:active, .btn:active { transform: translateY(0); box-shadow: none; }
button.wide:hover { transform: translateY(-2px); }
.rec-card a, .notes li a, .mod-card { transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), background-color var(--dur) var(--ease); }

/* ---- 主题行：滑入 + 序号变红 ---- */
.threads a { transition: background-color var(--dur) var(--ease), padding-left var(--dur) var(--ease); }
.threads li { transition: border-color var(--dur) var(--ease); }
.threads a:hover { background: #fafafa; padding-left: 6px; }
.threads .idx { transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.threads a:hover .idx { color: var(--red); transform: translateX(-3px); }
.threads .t-title { transition: color var(--dur) var(--ease); }
.threads li:nth-child(-n+8) { animation: riseIn .5s var(--ease-out) both; }
.threads li:nth-child(1) { animation-delay: .02s; }
.threads li:nth-child(2) { animation-delay: .05s; }
.threads li:nth-child(3) { animation-delay: .08s; }
.threads li:nth-child(4) { animation-delay: .11s; }
.threads li:nth-child(5) { animation-delay: .14s; }
.threads li:nth-child(6) { animation-delay: .17s; }
.threads li:nth-child(7) { animation-delay: .20s; }
.threads li:nth-child(8) { animation-delay: .23s; }

/* ---- 推荐区 ---- */
.recommend { border-top: var(--rule); margin: 34px 0 26px; padding-top: 18px; }
.rec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.rec-head h2 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--grey);
}
.rec-mode { font-size: 12px; color: var(--grey); }
.rec-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: var(--hair);
}
.rec-grid.wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.rec-card { background: var(--paper); }
.rec-card a { display: block; padding: 16px 18px; border-left: 3px solid transparent; height: 100%; }
.rec-card a:hover { border-left-color: var(--red); background: #fafafa; transform: translateY(-2px); }
.rec-tag {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--red); border: 1px solid var(--red); padding: 2px 6px; margin-bottom: 9px;
}
.rec-title { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.rec-sub { display: block; font-size: 12px; color: var(--grey); margin-top: 7px; }
.rec-why { display: block; font-size: 11px; color: #444; margin-top: 9px; border-top: var(--hair); padding-top: 8px; }

/* ---- 状态标记 ---- */
.flag {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  padding: 2px 6px; margin-left: 8px; vertical-align: 1px; border: 1px solid;
  animation: popIn .3s var(--ease-out) both;
}
.flag.pending { color: var(--warn); border-color: var(--warn); }
.flag.rejected { color: var(--red); border-color: var(--red); }
.banner {
  border: var(--rule); border-left: 6px solid var(--ink);
  padding: 13px 16px; margin: 18px 0 0; font-size: 14px;
  animation: slideDown .35s var(--ease-out) both;
}
.banner.pending { border-left-color: var(--warn); background: #fffdf5; }
.banner.rejected { border-left-color: var(--red); background: #fff6f6; }
.banner.warn-plain {
  border-left-color: var(--red); background: #fff6f6;
  margin: 0 0 22px; font-size: 13px; line-height: 1.5;
}
.banner.warn-plain b { color: var(--red); }
.posts li.is-pending .body { background: #fffdf5; }

/* ---- 通知列表 ---- */
.notes { list-style: none; margin: 8px 0 40px; }
.notes li { border-bottom: var(--hair); }
.notes li a, .notes li.note {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px;
  padding: 15px 0; align-items: baseline;
}
.notes li a:hover { background: #fafafa; padding-left: 6px; }
.note-kind {
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--grey);
}
.note-main b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.note-main span { display: block; font-size: 13px; color: #333; margin-top: 4px; }
.note-meta { font-size: 11px; color: var(--grey); text-align: right; line-height: 1.6; }
.notes li.empty { padding: 26px 0; color: var(--grey); font-size: 14px; }

/* ---- 审核台 ---- */
.mod-list { list-style: none; margin: 8px 0 34px; }
.mod-card { border: var(--rule); padding: 18px 20px; margin-bottom: 1px; }
.mod-card:hover { background: #fafafa; }
.mod-head { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -0.02em; }
.mod-head b { font-weight: 700; }
.hits {
  font-size: 11px; padding: 2px 7px; border: 1px solid var(--warn); color: var(--warn);
  letter-spacing: .04em;
}
.hits.clean { border-color: var(--grey); color: var(--grey); }
.mod-meta { font-size: 12px; color: var(--grey); margin: 8px 0 10px; }
.mod-body {
  border-left: 3px solid var(--hair); padding-left: 12px; font-size: 14px;
  color: #222; line-height: 1.55; max-height: 130px; overflow: hidden;
}
.mod-foot { display: flex; align-items: center; gap: 14px; margin-top: 15px; }
.mod-act { display: flex; gap: 8px; flex: 1; align-items: center; }
.mod-act input[type=text] {
  flex: 1; padding: 8px 10px; border: var(--hair); font-size: 13px;
  transition: border-color var(--dur) var(--ease);
}
.mod-act button { padding: 8px 16px; font-size: 11px; }
.mod-act button.ok { background: var(--ok); border-color: var(--ok); }
.mod-act button.no { background: var(--red); border-color: var(--red); }
.mod-act button:hover { transform: translateY(-1px); }

/* ---- 杂项 ---- */
.lead-hint { font-size: 13px; color: #444; line-height: 1.6; margin: 14px 0 10px; max-width: 760px; }
.lead-hint code {
  border: var(--hair); padding: 1px 5px; font-size: 12px; background: #fafafa;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }
.flash { animation: slideDown .35s var(--ease-out) both; }
input, select, textarea {
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cap-row img { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cap-row img:active { opacity: .6; transform: scale(.97); }
.dm { animation: riseIn .4s var(--ease-out) both; }
.posts li { animation: riseIn .45s var(--ease-out) both; }
.posts li:nth-child(2) { animation-delay: .05s; }
.posts li:nth-child(3) { animation-delay: .1s; }
.posts li:nth-child(4) { animation-delay: .15s; }
.masthead .mark { transition: transform var(--dur-slow) var(--ease-out), background-color var(--dur) var(--ease); }
a.wordmark:hover .mark { transform: rotate(45deg) scale(1.08); }
.u-bar > i { transition: width .25s var(--ease); }
.u-msg.err { animation: softPulse 1.2s var(--ease) 2; }

/* ==========================================================================
   版面修整 —— 修正列头/数据错位、长文本溢出、移动端挤压
   ========================================================================== */

/* 工具栏：用独立分组 + 细分隔线，避免 label/count 连读成一句 */
.toolbar { flex-wrap: wrap; row-gap: 12px; }
.toolbar .stat { display: inline-flex; align-items: baseline; gap: 7px; }
.toolbar .sep {
  width: 1px; height: 14px; background: var(--hair); align-self: center; margin: 0 2px;
}
.toolbar .btn.is-on { background: var(--ink); color: var(--paper); }

/* 长标题/长链接不再撑破栅格：栅格中列必须允许收缩 */
.threads .t-main { min-width: 0; }
.threads .t-title { display: inline; overflow-wrap: anywhere; word-break: break-word; }
.threads .t-sub { overflow-wrap: anywhere; }
.rec-title, .rec-why, .rec-mode { overflow-wrap: anywhere; }
.mod-head b, .note-main span, .lead-hint { overflow-wrap: anywhere; }
.posts .body p { overflow-wrap: anywhere; }

/* 列头与数据对齐：右列是「浏览」，与行内数字列同一条基线 */
.col-head { padding-bottom: 10px; }
.col-head h2 { margin-bottom: 0; }
.col-head h2:last-child { text-align: right; }
.col-head { border-bottom: var(--rule); }

/* 序号列更窄，把空间让给标题 */
.threads a { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; }
.threads .t-stat { padding-top: 2px; }

/* 侧栏在长列表下吸顶，避免右侧滚完只剩空白 */
@media (min-width: 861px) {
  .cats { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
  .cats::-webkit-scrollbar { width: 6px; }
  .cats::-webkit-scrollbar-thumb { background: #ddd; }
}

/* 侧栏「版块」标题与站规块之间的节奏 */
.cats h2 { margin-bottom: 12px; }
.side-note { margin-top: 22px; }

/* 推荐区与列表之间加一道硬分隔，避免两个网格糊在一起 */
.recommend { margin-bottom: 30px; }
.recommend + .board { margin-top: 0; }

/* 审核卡片的正文截断加一层渐隐，读起来不像被硬切 */
.mod-body { position: relative; }
.mod-body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--paper));
  pointer-events: none;
}
.mod-card:hover .mod-body::after { background: linear-gradient(to bottom, rgba(250,250,250,0), #fafafa); }

/* 通知条目：标题与正文的行距收紧一点，多行更整齐 */
.note-main b { line-height: 1.3; }
.notes li a { align-items: start; }

/* --------------------------------------------------------------------------
   栅格对齐修正（CDP 实测发现）
   1) 桌面端推荐区左边比主题列表左移 260px → 与侧栏宽度对齐
   2) 移动端侧栏把正文推下 455px → 正文优先，版块后置
   3) 移动端行高在 141/164 间跳动 → 浏览数并到行内，不再独占一行
   4) 登录/注册页的次要链接点击目标仅 15px 高 → 补足到 24px 以上
   -------------------------------------------------------------------------- */
@media (min-width: 861px) {
  .recommend { margin-left: 260px; }
  .recommend .rec-head { padding-left: 0; }
}

@media (max-width: 860px) {
  /* 正文优先：主题列表排到版块之前 */
  .board > section { order: 1; }
  .board > .cats { order: 2; border-bottom: none; border-top: var(--rule); margin-top: 22px; }
  .board { display: flex; flex-direction: column; }

  /* 浏览数并到行内，行高更一致 */
  .threads a { grid-template-columns: 30px minmax(0, 1fr); row-gap: 4px; }
  .threads .t-stat {
    grid-column: 2; text-align: left; display: inline-flex;
    align-items: baseline; gap: 5px; padding-top: 0; margin-top: 2px;
  }
  .threads .t-stat b { display: inline; font-size: 12px; }
  .threads .idx { font-size: 11px; }

  /* 次要链接补足点击目标 */
  .auth .alt a, .lead-hint a { display: inline-block; padding: 5px 0; }
}

.auth .alt a, .note-main a, .panel a { min-height: 24px; display: inline-block; padding: 4px 0; }

/* 面包屑与提示行内的链接同样补足点击目标（CDP 实测 14–17px） */
.thread-head .crumbs a,
.reply .hint a,
.panel p a,
.side-note p a,
.lead-hint a,
footer a { display: inline-block; padding: 4px 0; }

/* 无障碍：尊重系统的"减弱动态效果" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 860px) {
  .notes li a, .notes li.note { grid-template-columns: 1fr; gap: 6px; }
  .note-meta { text-align: left; }
  .mod-head { flex-wrap: wrap; }
  .mod-foot { flex-direction: column; align-items: stretch; }
  .mod-act { flex-wrap: wrap; }
}


/* ==========================================================================
   移动端 App 外壳 & 滑动手感（本轮新增）
   ========================================================================== */

/* 触屏基础：动量滚动、去掉双击缩放的闪烁、按压缩放反馈 */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  text-rendering: optimizeLegibility;
}
a, button, .btn, li { -webkit-tap-highlight-color: transparent; }

/* 底部导航：桌面端隐藏 */
.tabbar { display: none; }

/* 新增信息块：成分表 / 行为记录 / 处置 */
.kv dl {
  display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  margin: 0; border-top: 1px solid var(--line);
}
.kv dt, .kv dd {
  margin: 0; padding: 9px 0; border-bottom: 1px solid #e6e6e6;
  font-size: 14px; line-height: 1.5;
}
.kv dt { color: var(--grey); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.kv dd.wrap code { word-break: break-all; white-space: normal; }

ul.events { list-style: none; margin: 0; padding: 0; }
ul.events li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #e6e6e6; font-size: 14px;
}
ul.events li span:first-child { color: var(--grey); text-transform: uppercase;
  letter-spacing: .06em; font-size: 11px; }

.banbox { border: 1px solid var(--line); padding: 14px; margin-top: 4px; }
.banbox.on { border-left: 6px solid var(--red); background: #fff7f7; }
.banbox form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.banbox input[type=text] { flex: 1 1 240px; }

/* 加载更多 / 到底提示 */
.feed-foot { display: flex; justify-content: center; align-items: center;
  padding: 18px 0 6px; min-height: 56px; }
.feed-foot .btn.more { min-width: 160px; }
.feed-end { color: var(--grey); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.feed-foot.loading .btn.more { opacity: .35; pointer-events: none; }

/* 追加条目的入场：滑动追加时逐行浮现，滚动更有「爽感」 */
@keyframes feedIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.t-item.feed-in { animation: feedIn .34s cubic-bezier(.22,.61,.36,1) both; }

/* 骨架屏：加载下一屏时占位 */
@keyframes shimmer { 0% { background-position: -420px 0; } 100% { background-position: 420px 0; } }
.skel-row {
  height: 54px; margin: 1px 0; border-radius: 0;
  background: linear-gradient(90deg, #f2f2f2 0%, #e6e6e6 40%, #f2f2f2 80%);
  background-size: 420px 100%;
  animation: shimmer 1.1s linear infinite;
}

/* 滚动后顶栏收紧，腾出阅读空间 */
@media (min-width: 861px) {
  .masthead { transition: padding .28s cubic-bezier(.22,.61,.36,1); }
  body.scrolled .masthead { padding-top: 8px; padding-bottom: 8px; }
  body.scrolled .masthead .meta { opacity: 0; transform: translateY(-4px); transition: .2s; }
}

/* --------------------------------------------------------------------------
   手机端（≤860px）：改成 App 布局 —— 底部标签栏 + 通栏内容 + 大点击区
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  /* 隐藏桌面导航，改由底部标签栏承担 */
  .nav { display: none; }
  .skip { left: 12px; }

  /* 为底部标签栏留出空间（含 iPhone 底部安全区） */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  footer { margin-bottom: 8px; }

  .tabbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tabbar-in {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
    max-width: 720px; margin: 0 auto;
  }
  .tabbar a {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    min-height: 60px; padding: 6px 2px; text-decoration: none;
    color: var(--grey); font-size: 11px; letter-spacing: .02em;
    background: none; border: none;
    transition: color .18s ease, transform .12s ease;
  }
  .tabbar a .ti { font-size: 19px; line-height: 1; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on .ti { color: var(--red); }
  .tabbar a:active { transform: scale(.94); }
  .tabbar a.on::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 2px; background: var(--red);
    animation: tabIn .22s cubic-bezier(.22,.61,.36,1) both;
  }
  @keyframes tabIn { from { width: 0; } to { width: 26px; } }
  .tabbar .badge { position: absolute; top: 6px; right: 50%; margin-right: -22px; }
  .tabbar .tab-cta .ti {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-top: -12px;
    background: var(--red); color: #fff; font-size: 17px;
    box-shadow: 0 2px 10px rgba(227,6,19,.28);
  }
  .tabbar .tab-cta { color: var(--ink); }

  /* 通栏：内容不再被侧栏挤窄 */
  .wrap { padding-left: 16px; padding-right: 16px; }

  /* 输入框 16px 起，避免 iOS 聚焦时自动放大页面 */
  input, textarea, select, .f input, .f textarea, .f select { font-size: 16px; }
  button, .btn { font-size: 15px; }

  /* 所有可点元素补足 ≥44px */
  .btn, button, .row .btn { min-height: 44px; display: inline-flex;
    align-items: center; justify-content: center; }
  .nav-bell, .nav-me { min-height: 44px; }
  .threads .t-item > a { padding-top: 12px; padding-bottom: 12px; }
  .tabbar a { min-height: 60px; }

  /* 主题行：手机上把统计压到次要位置，标题拿到整行 */
  .threads .t-item > a { grid-template-columns: 30px minmax(0, 1fr); }
  .threads .t-title { font-size: 17px; }

  /* 工具栏在手机上横向可滚，避免换行成堆 */
  .toolbar { overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: 0 0 auto; }

  /* 面板内边距收紧，正文更宽 */
  section.panel, .compose, .auth-card { padding-left: 14px; padding-right: 14px; }
  .kv dl { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 0; border-bottom: none; }
  .kv dd { padding-top: 2px; }
}

/* 更窄的机型：底部标签字号再收一点 */
@media (max-width: 380px) {
  .tabbar a { font-size: 10px; }
  .tabbar a .ti { font-size: 18px; }
}


/* 回到顶部：长列表里滑很久后出现 */
#toTop {
  position: fixed; right: 16px; z-index: 55;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  box-shadow: 0 3px 14px rgba(0,0,0,.14);
}
#toTop.show { opacity: 1; visibility: visible; transform: none; }
#toTop:active { transform: scale(.92); }
@media (min-width: 861px) {
  #toTop { bottom: 24px; right: 24px; }
}
.netwarn { color: var(--red); font-size: 12px; }

/* ==========================================================================
   无缝换页 + 悬停动效增补（本轮：TOV）
   ========================================================================== */
#navbar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--red);
  z-index: 9999;
  opacity: 0;
  transition: width .32s cubic-bezier(.22,.78,.28,1), opacity .2s linear;
}
#navbar.on { width: 82%; opacity: 1; }
#navbar.done { width: 100%; opacity: 1; }

#main { will-change: opacity, transform; }
#main.leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .13s ease-in, transform .13s ease-in;
}
#main.entering { animation: mainIn .28s cubic-bezier(.22,.78,.28,1) both; }
@keyframes mainIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* 大标题：红块拉长 + 红色下划线扫入 */
.wordmark .mark { transition: width .44s cubic-bezier(.22,.78,.28,1); }
.wordmark h1 { position: relative; }
.wordmark h1::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.06em;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .44s cubic-bezier(.22,.78,.28,1);
}
.wordmark:hover .mark { width: 62px; }
.wordmark:hover h1::after { transform: scaleX(1); }

/* 列表行：左侧红线长出 + 标题右移 */
.threads li { position: relative; }
.threads li::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--red);
  transition: width .26s cubic-bezier(.22,.78,.28,1);
}
.threads li:hover::before { width: 5px; }
.threads .t-title { transition: transform .26s cubic-bezier(.22,.78,.28,1); }
.threads li:hover .t-title { transform: translateX(7px); }

/* 按钮：红色自下而上填充 */
.btn { position: relative; overflow: hidden; z-index: 0; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateY(101%);
  transition: transform .26s cubic-bezier(.22,.78,.28,1);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: #fff; border-color: var(--red); }

/* 页脚链接：下划线扫入 */
footer a { position: relative; }
footer a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .26s cubic-bezier(.22,.78,.28,1);
}
footer a:hover::after { transform: scaleX(1); }

/* 推荐卡片轻微抬升 */
.rec-card { transition: transform .26s cubic-bezier(.22,.78,.28,1), box-shadow .26s cubic-bezier(.22,.78,.28,1); }
.rec-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.10); }

/* 触屏点击反馈 */
@media (hover: none) {
  .threads li:active, .btn:active, .notes li a:active,
  .tabbar a:active, .rec-card:active { transform: scale(.985); }
}

/* App 内：隐藏网页自带页眉 / 导航 / 底栏，交给原生外壳 */
html.in-app .masthead,
html.in-app .tabbar,
html.in-app #toTop { display: none !important; }
html.in-app body.authed .nav { display: none !important; }
html.in-app body { padding-bottom: 0; }


/* ==========================================================================
   实名认证（私信专用，纯自愿）
   ========================================================================== */
.rn-gate .rn-points { margin: 14px 0 18px; padding-left: 18px; }
.rn-gate .rn-points li { margin: 7px 0; line-height: 1.55; }
.rn-gate .rn-points b { color: var(--red); }

.rn-list { list-style: none; margin: 0; padding: 0; }
.rn-list .rn-item {
  display: grid; grid-template-columns: 1fr 240px; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.rn-list .rn-item:first-child { border-top: none; }
.rn-info > b { font-size: 17px; letter-spacing: -0.01em; }
.rn-info > .hint { display: block; margin: 5px 0 10px; }
.rn-dl {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px;
  margin: 0; font-size: 13px;
}
.rn-dl dt { color: var(--grey); }
.rn-dl dd { margin: 0; }
.rn-act { display: flex; flex-direction: column; gap: 9px; align-items: stretch; }
.rn-act form { display: flex; gap: 8px; align-items: center; }
.rn-act input[type="text"] { min-width: 0; flex: 1; }
.events.hist3 li { grid-template-columns: 1.2fr 1fr .8fr 1.6fr; }

@media (max-width: 860px) {
  .rn-list .rn-item { grid-template-columns: 1fr; gap: 12px; }
  .rn-act { flex-direction: row; gap: 8px; }
  .rn-act form { flex: 1; }
  .events.hist3 li { grid-template-columns: 1fr 1fr; row-gap: 4px; }
}
