/* 外贸学社 · 闹中取静
   浅薄荷底 + 墨绿字 + 一个强调色（黛青）；框只留给交互，其余用发丝线和留白。
   2026-10-06 由纸色改为与工作台「找灵感」页同一套绿：像在树荫下读书，眼睛舒服。
   2026-10-15 侧栏森林绿 → 黛青渐变（用户嫌平涂绿不够高级）；青色跟小贸的薄荷卫衣同一色系。 */

:root {
  --bg: #f1f7f5;           /* 浅薄荷，微偏青，衬黛青侧栏 */
  --surface: #fbfdfb;
  --ink: #1d2e26;          /* 墨绿黑，在 --bg 上 13:1 */
  --ink-2: #42524a;
  --ink-3: #5a6b62;        /* 在 --bg 上 ≈5.3:1，达 AA */
  --line: #d9e8de;
  --accent: #176560;       /* 黛青，在 --bg 上 ≈6.5:1 */
  --accent-soft: #dff0ee;
  --warn: #8a5a14;
  --tint: rgba(30, 80, 55, .06);
  --paper: #fbfbf7;          /* 乳白纸：很浅，微微偏冷，衬绿色花饰 */
  --paper-edge: #e1e8e2;
  --orn: #7aa592;            /* 书页花饰：青瓷绿（线条） */
  --orn-ink: #4a7c67;        /* 书页上的绿色文字（首字、版块名）：深一档，小字也够对比度 */
  --warn-soft: #f7efe0;
  --danger: #9b2c2c;
  --card: #ffffff;           /* 卡片：比底色更白一档，靠很淡的阴影浮起来，不画框 */
  --shadow: 0 1px 2px rgba(22, 64, 44, .05), 0 6px 20px rgba(22, 64, 44, .05);
  --side-bg: #134a4b;        /* 左侧栏：黛青（页面底色 / 渐变中段） */
  --side-bg-top: #1b5e5b;
  --side-bg-2: #0d3538;
  --side-glow: rgba(120, 200, 190, .22);   /* 左上角一点青光，让渐变有层次 */
  --side-ink: #e3f2f0;
  --side-ink-2: #9cc7c2;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  /* Windows 没有宋体类好字体时回退到雅黑，不用 SimSun */
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", serif;
  --read: 42rem;
  --wide: 76rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a16; --surface: #18231d; --ink: #e3ebe5; --ink-2: #b9c8be; --ink-3: #8fa398;
    --line: #2a3a31; --accent: #8fd1b0; --accent-soft: #1d3127; --warn: #d9a557; --warn-soft: #2b2419;
    --danger: #e08a8a; --tint: rgba(231, 228, 222, .08);
    --paper: #e1e3dc; --paper-edge: #8a978e; --orn: #5f8d79; --orn-ink: #3f6e5a; color-scheme: dark; --card: #18231d; --shadow: 0 1px 2px rgba(0,0,0,.3); --side-bg: #0d1513; --side-bg-top: #10201e; --side-bg-2: #0a1110; --side-glow: rgba(120, 200, 190, .06); --side-ink: #dce8e0; --side-ink-2: #8fa398;   /* 夜里的乳白纸：压暗但仍是纸色 */
  }
}
:root[data-theme="dark"] {
  --bg: #121a16; --surface: #18231d; --ink: #e3ebe5; --ink-2: #b9c8be; --ink-3: #8fa398;
  --line: #2a3a31; --accent: #8fd1b0; --accent-soft: #1d3127; --warn: #d9a557; --warn-soft: #2b2419;
  --danger: #e08a8a; --tint: rgba(231, 228, 222, .08);
    --paper: #e1e3dc; --paper-edge: #8a978e; --orn: #5f8d79; --orn-ink: #3f6e5a; color-scheme: dark; --card: #18231d; --shadow: 0 1px 2px rgba(0,0,0,.3); --side-bg: #0d1513; --side-bg-top: #10201e; --side-bg-2: #0a1110; --side-glow: rgba(120, 200, 190, .06); --side-ink: #dce8e0; --side-ink-2: #8fa398;   /* 夜里的乳白纸：压暗但仍是纸色 */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.prose a, .page-sub a, .empty a, .hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; }
button { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.inline { display: inline; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
/* ---------- 外壳：左侧深绿栏 + 右侧大圆角内容面板（2026-10-13 改版） ----------
   当前栏目是一块浅色页签，「挖进」右边面板 —— 上下两个反向圆角用径向渐变画出来。
   ≤1080px 侧栏收成抽屉，面板铺满。 */
/* 页面底色与侧栏用同一条渐变、都按视口铺：侧栏是满屏高的 sticky，两者逐行同色，
   面板四周露出来的窄边才不会和侧栏有色差（2026-10-15 用户截图：侧栏顶部比右上角浅一截） */
body { background: linear-gradient(180deg, var(--side-bg-top) 0%, var(--side-bg) 45%, var(--side-bg-2) 100%) fixed var(--side-bg); }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.panel {
  min-width: 0; background: var(--bg); margin: 14px 14px 14px 0; border-radius: 28px;
  display: flex; flex-direction: column; min-height: calc(100vh - 28px);
}
.panel > main { flex: 1; width: 100%; }
/* 墙面 / 水彩纸底纹（2026-10-13，参考用户给的「白日梦画师」水彩画底）：
   static/wall.png 是灰度浮雕颗粒（tools/gen_wall_texture.py 生成），multiply 叠在 --bg 上 ——
   底色仍由主题变量决定，纹理只压暗、不改色。当前页签与面板同一张图 + fixed 对齐，接缝处看不出断层。
   白卡片（--card）不带纹理，像贴在墙上的纸。吸顶栏也铺同一张，否则顶上是一条平涂色带。 */
.panel, .top, .side-link.on, .side-link.on:hover {
  background-image: url("/static/wall.png");
  background-size: 320px 320px;
  background-attachment: fixed;
  background-blend-mode: multiply;
}

.side {
  position: sticky; top: 0; height: 100vh; overflow: hidden;   /* 侧栏本身不滚，只有 .side-scroll 滚（品牌块固定） */
  background:
    radial-gradient(120% 60% at 0% 0%, var(--side-glow), transparent 60%),
    linear-gradient(180deg, var(--side-bg-top) 0%, var(--side-bg) 45%, var(--side-bg-2) 100%);
  color: var(--side-ink); padding: 22px 0 28px 18px; display: flex; flex-direction: column;
}
/* 中间可滚动段：上下各淡出 14px 提示还能滚；滚动条隐藏 —— 占宽度的滚动条会夹在当前页签和面板之间造成断口 */
.side-scroll {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  /* 只在底部淡出；顶部淡出等真滚下去了才加（.scrolled，app.js）——
     否则「首页」的页签和它上方的反向圆角一进来就是虚的（2026-10-13 用户截图） */
  -webkit-mask-image: linear-gradient(#000 0, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(#000 0, #000 calc(100% - 14px), transparent 100%);
  /* 当前页签的反向圆角伸到页签上方 22px —— 滚动段顶部至少要留这么多，否则圆角被裁掉 */
  padding-top: 22px;
}
.side-scroll.scrolled {
  -webkit-mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.side-scroll::-webkit-scrollbar { display: none; }
.side a:hover { color: #fff; }
.side-brand { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px 16px 6px; margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.side-brand .brand-logo { background: #f3f8f4; padding: 3px 6px; border-radius: 8px; height: 34px; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.side-brand-text b { font: 600 18px/1.3 var(--serif); letter-spacing: .08em; color: #fff; }
.side-brand-text small { font-size: 11px; white-space: nowrap; color: var(--side-ink-2); letter-spacing: .04em; }

.side-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 18px 0 16px; margin: 2px 0; border-radius: 999px 0 0 999px;
  font-size: 15px; color: var(--side-ink);
}
.side-link .icon { width: 20px; height: 20px; flex-shrink: 0; }
.side-link:hover { background: rgba(255,255,255,.07); }
.side-link.on, .side-link.on:hover { background-color: var(--bg); color: var(--accent); font-weight: 600; }
.side-link.on::before, .side-link.on::after {
  content: ""; position: absolute; right: 0; width: 22px; height: 22px; pointer-events: none;
}
.side-link.on::before { top: -22px; background: radial-gradient(circle at 0 0, transparent 21.5px, var(--bg) 22px); }
.side-link.on::after { bottom: -22px; background: radial-gradient(circle at 0 100%, transparent 21.5px, var(--bg) 22px); }

.side-label { margin: 22px 0 6px 16px; font-size: 12px; letter-spacing: .14em; color: var(--side-ink-2); }
.side-cat { margin-right: 18px; }
.side-cat summary {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 0 0 16px; border-radius: 10px;
  list-style: none; cursor: pointer; font-size: 14.5px; color: var(--side-ink);
}
.side-cat summary::-webkit-details-marker { display: none; }
.side-cat summary:hover { background: rgba(255,255,255,.07); }
.side-cat summary .icon { width: 18px; height: 18px; opacity: .85; }
.side-cat summary span { flex: 1; }
.side-caret { width: 7px; height: 7px; margin-right: 14px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .6; transition: transform .2s; }
.side-cat[open] .side-caret { transform: rotate(45deg); }
.side-cat ul { list-style: none; margin: 2px 0 8px; padding: 0; margin-right: -18px; }
.side-sub { height: 36px; padding-left: 46px; font-size: 14px; color: var(--side-ink-2); }
.side-sub span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sub em { font-style: normal; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.side-sub.on em { opacity: 1; }
/* 侧栏底部小卡：固定在侧栏底，不进滚动段；半透明白，跟深色底融在一起，不抢导航的戏 */
.side-motto {
  flex-shrink: 0; margin: 14px 18px 0 0; padding: 13px 14px 12px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
}
.side-motto-title { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; font: 600 14px/1.3 var(--serif); letter-spacing: .12em; color: #fff; }
.side-motto-title .icon { width: 16px; height: 16px; margin: 0; color: #9fdccf; }
.side-motto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.side-motto-list li { position: relative; padding-left: 9px; font-size: 11.5px; line-height: 1.8; color: var(--side-ink-2); white-space: nowrap; }
.side-motto-list li::before { content: ""; position: absolute; left: 0; top: .78em; width: 3px; height: 3px; border-radius: 50%; background: #9fdccf; opacity: .8; }
.side-scrim { display: none; }

.top {
  position: sticky; top: 0; z-index: 10; border-radius: 28px 28px 0 0;
  background-color: var(--bg);   /* 老内核（360/QQ 浏览器）不认 color-mix，先给实色兜底 */
  background-color: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-in { max-width: var(--wide); margin: 0 auto; padding: 0 32px; height: 76px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.top-menu, .top-brand { display: none; }
.top-menu { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--card); color: var(--ink); place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.top-menu .icon { width: 20px; height: 20px; }
.brand-logo { display: block; height: 32px; width: auto; border-radius: 6px; }
/* 大老虎是黑色，深色模式下垫一块乳白底，否则隐形 */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #f6f1e7; padding: 2px 5px; } }
:root[data-theme="dark"] .brand-logo { background: #f6f1e7; padding: 2px 5px; }
.foot-motto b { color: var(--ink-2); font-weight: 600; letter-spacing: .08em; }
.top-search { position: relative; flex: 1; max-width: 560px; }
.top-search .icon { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-3); pointer-events: none; }
.top-search input {
  width: 100%; height: 46px; padding: 0 18px 0 46px; border: 1px solid transparent; border-radius: 999px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 15px; box-shadow: var(--shadow);
}
.top-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.top-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.top-admin { color: var(--warn); }
.btn-pill { height: 40px; padding: 0 18px; border-radius: 999px; gap: 6px; }
.btn-pill .icon { width: 16px; height: 16px; }
.me-link { font-weight: 500; color: var(--ink); }
.me-link .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }

.page { max-width: calc(var(--read) + 10rem); margin: 0 auto; padding: 32px 32px 64px; }   /* 外壳改版后列表是卡片，比纯文字行宽一些；文章页走 .page-book */
.page-wide { max-width: var(--wide); }
.page-narrow { max-width: 26rem; }
.page-title { font: 600 28px/1.35 var(--serif); margin: 0 0 8px; letter-spacing: .02em; }
.page-sub { color: var(--ink-3); margin: 0 0 28px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.crumb a:hover { color: var(--accent); }

/* ---------- 首页 ---------- */
/* 首页标题用工作台同款卡通字「站酷快乐体」（SIL OFL，可商用）。
   标题是固定文案，只切了这 9 个字（约几 KB）；以后改标题文案要重新切：
   pyftsubset <工作台字库.woff2> --text="新文案" --flavor=woff2 --output-file=static/fonts/kuaile-hero.woff2
   缺字会自动回退到下面的宋体栈，不会显示方框。 */
@font-face {
  font-family: "KuaiLe Hero"; src: url("/static/fonts/kuaile-hero.woff2") format("woff2");
  font-display: swap;
}

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 32px; align-items: start; }
.home-main, .home-side { min-width: 0; }   /* 否则横滑的剧场条按内容撑宽整列，手机上左右溢出 */
.block { margin-bottom: 40px; }
.block-title {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3);
  margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}

.feature { padding: 22px 24px 20px; margin-bottom: 14px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.feature-author { display: inline-flex; align-items: center; gap: 6px; }
.feature-board { font-size: 13px; color: var(--accent); margin: 0 0 6px; }
.feature-title { font: 600 22px/1.45 var(--serif); margin: 0 0 8px; }
.feature-excerpt { color: var(--ink-2); margin: 0 0 8px; line-height: 1.85; }

.row { padding: 18px 22px 14px; margin-bottom: 14px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.row-who { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; line-height: 1.35; }
.row-who a { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.row-who span { font-size: 12.5px; color: var(--ink-3); }
.row-board { flex-shrink: 0; font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.row-board:hover { filter: brightness(.97); }
/* 帖子数据：图标 + 数字一排，等宽数字；回复数可点（跳到回复区） */
.stats { display: inline-flex; align-items: center; gap: 16px; font-variant-numeric: tabular-nums; }
.stats > * { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); }
.stats .icon { width: 15px; height: 15px; }
.stats a:hover { color: var(--accent); }
.row-last { margin-left: 16px; }
/* 精华卡：作者在左，数据靠右 */
.feature-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; }
.feature-meta .stats { margin-left: auto; }
.row > .row-meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.row-title { font-size: 17.5px; font-weight: 600; line-height: 1.5; margin: 0 0 4px; }
.row-excerpt {
  color: var(--ink-2); margin: 0 0 6px; font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-meta { font-size: 13px; color: var(--ink-3); margin: 0; }
.row-meta a:hover { color: var(--accent); }
.meta-board { color: var(--accent); }
.dot { margin: 0 6px; opacity: .6; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 500; line-height: 1; padding: 3px 6px; border-radius: 4px;
  color: var(--ink-3); background: var(--tint); vertical-align: 2px; margin-right: 4px;
}
.tag-digest { color: var(--accent); background: var(--accent-soft); }
.tag-pin { color: var(--warn); background: var(--warn-soft); }

.hot { list-style: none; margin: 0; padding: 0; counter-reset: hot; }
.hot li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; font-size: 15px; line-height: 1.5; counter-increment: hot; }
.hot li::before { content: counter(hot); font: 600 13px/1 var(--serif); color: var(--ink-3); min-width: 1em; }
.hot li a { flex: 1; }
.hot-n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.cat { margin: 16px 0 6px; }
.cat-name { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.boards { list-style: none; margin: 0; padding: 0; }
.boards li { display: flex; justify-content: space-between; padding: 4px 0; font-size: 15px; }
.board-link { color: var(--ink-2); }
.board-accent { color: var(--accent); font-weight: 600; }
.board-n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stats { font-size: 12px; color: var(--ink-3); }

/* ---------- 版块页 ---------- */
.board-head { margin-bottom: 24px; }
.board-head h1 { font: 600 30px/1.3 var(--serif); margin: 0 0 8px; }
.board-desc { color: var(--ink-2); margin: 0 0 4px; }
.board-count { font-size: 13px; color: var(--ink-3); margin: 0; }
.toolbar + section { margin-top: 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 22px; font-size: 14px; }
.tabs a { padding: 10px 0; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.siblings { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-3); }
.siblings a.on { color: var(--ink); font-weight: 600; }

/* ---------- 帖子页 ---------- */
.thread-head { margin-bottom: 28px; }
.thread-title { font: 600 clamp(24px, 3.6vw, 32px)/1.4 var(--serif); margin: 0 0 12px; letter-spacing: .01em; }
.post { padding: 22px 0; border-bottom: 1px solid var(--line); }
.post-op { padding-top: 0; border-bottom: none; }
.post-op .prose { font-size: 17.5px; }
.post-dim { opacity: .72; }
.post-head { display: flex; align-items: baseline; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.post-author { font-weight: 600; }
.post-time { color: var(--ink-3); font-size: 13px; }
.post-floor { margin-left: auto; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.post-foot { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.replies-title {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3);
  margin: 36px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.act {
  border: none; background: none; color: var(--ink-3); font-size: 13px; padding: 4px 8px; margin-left: -8px;
  border-radius: 6px; cursor: pointer;
}
.act + .act { margin-left: 0; }
.act:hover:not(:disabled) { background: var(--tint); color: var(--ink); }
.act:disabled { cursor: default; opacity: .6; }
/* 有帮助 = 点赞：和列表卡片上的 👍 同一个图标；点过后整颗填色 + 浅底，一眼看出「我点过」 */
.act-helpful, .act-share { display: inline-flex; align-items: center; gap: 5px; }
.act-helpful .icon, .act-share .icon { width: 16px; height: 16px; margin: 0; color: currentColor; transition: transform .2s; }
.act-helpful:hover:not(:disabled) .icon { transform: translateY(-1px) rotate(-8deg); }
.act-helpful.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.act-helpful.on .icon { fill: var(--accent); fill-opacity: .22; }
.act-helpful.on.pop .icon { animation: thumb-pop .35s ease-out; }
@keyframes thumb-pop { 0% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .act-helpful .icon { transition: none; } .act-helpful.on.pop .icon { animation: none; } }
.act-admin { color: var(--warn); }
a.act { display: inline-block; text-decoration: none; }
.act-delete:hover:not(:disabled) { color: var(--danger); }
.delete-form { margin-top: 10px; }
.delete-form .flag { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }

.prose { font-size: 16.5px; line-height: 1.9; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--serif); line-height: 1.45; margin: 1.6em 0 .6em; }
.prose h1 { font-size: 1.4em; } .prose h2 { font-size: 1.25em; } .prose h3 { font-size: 1.1em; }
.prose blockquote { margin: 1em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.prose code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--tint); padding: 1px 5px; border-radius: 4px; }
/* 代码块自动换行：文章里的代码块多是提示词 / 模板，手机上左右滑着读体验很差 */
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; }
/* 正文图片点开看原图（app.js「正文图片」段）：配图在手机上缩得很小 */
.prose img { cursor: zoom-in; }
.prose a img { cursor: pointer; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: 6px; margin: .4em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: .92em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 6px 12px; text-align: left; }
/* 手机上窄表格会被挤成一列一个字（$63,202.26 被拆成 5 行）：短单元格（content._cell_nowrap 标 nw）不折行，长句照常折行；表格超宽就左右滑 */
.prose .nw { white-space: nowrap; }
.prose table { max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) { .prose th, .prose td { padding: 6px 9px; } }
.prose-small { font-size: 15px; }

.notice { font-size: 13px; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 6px; margin: 0 0 12px; }
.reply-box { margin-top: 36px; }

/* ---------- 表单 ---------- */
.editor-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.field em { font-style: normal; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
textarea { line-height: 1.8; resize: vertical; min-height: 7em; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: -8px; }
.img-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2);
  font-size: 14px; cursor: pointer; overflow: hidden;
}
.img-btn:hover, .img-btn:focus-within { border-color: var(--accent); color: var(--accent); }
.img-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* 真实 input 透明铺满按钮 —— 点哪儿都是在点它 */
.img-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.img-hint { font-size: 12px; color: var(--ink-3); }
.video-btn { font: inherit; font-size: 14px; }
.video-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.video-row input { flex: 1; min-width: 220px; height: 36px; padding: 0 10px; font-size: 14px; }
.video-row .btn, .video-row .btn-quiet { height: 36px; }
.video-tip { width: 100%; margin: 0; }
.video-tip:empty { display: none; }

/* 内嵌视频：16:9，默认不自动播放 */
.prose figure.video { margin: 0 0 var(--lh, 1em); }
.video-box { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 8px; overflow: hidden; background: #111; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose figure.video figcaption { font-size: 12px; line-height: 2; color: var(--ink-3); }
.prose figure.video figcaption a { color: var(--ink-3); }
.editor-thumbs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.editor-thumbs:empty { display: none; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.loading img { opacity: .45; }
.thumb-state { position: absolute; inset: auto 0 0 0; padding: 2px 0; font-size: 11px; text-align: center; color: var(--ink); background: rgba(255,255,255,.75); }
.thumb-x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(20, 20, 20, .6); color: #fff; font-size: 15px; line-height: 22px; padding: 0; cursor: pointer;
}
.thumb-x:hover { background: var(--danger); }
textarea.dragging { border-color: var(--accent); border-style: dashed; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.editor-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hint { font-size: 13px; color: var(--ink-3); }
.btn, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn { background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
.btn:hover { color: var(--bg); filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); height: 34px; padding: 0 14px; }
.btn-quiet:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-quiet:disabled { color: var(--ink-3); cursor: default; }
.btn-block { width: 100%; height: 44px; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.ok { color: var(--accent); font-size: 14px; }
.linklike { border: none; background: none; color: inherit; padding: 0; cursor: pointer; font-size: inherit; }
.linklike:hover { color: var(--accent); }

.staff-login { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 14px; }
.staff-login summary { font-size: 13px; color: var(--ink-3); cursor: pointer; list-style: none; }
.staff-login summary::-webkit-details-marker { display: none; }
.staff-login[open] summary { margin-bottom: 16px; }
.search-big { display: flex; gap: 8px; margin-bottom: 20px; }
.search-big input { flex: 1; }
.empty { color: var(--ink-3); padding: 28px 0; }
.empty-page { text-align: center; padding: 60px 0; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; font-size: 14px; flex-wrap: wrap; }
.pager a { color: var(--accent); }
.pager .off { color: var(--ink-3); opacity: .45; }
.pg-nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pg-num { min-width: 32px; height: 32px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 6px;
  font-variant-numeric: tabular-nums; }
.pager a.pg-num { color: var(--ink-2); }
.pager a.pg-num:hover { background: var(--tint); color: var(--ink); }
.pg-num.on { background: var(--accent); color: var(--bg); font-weight: 600; }
.pg-gap { color: var(--ink-3); padding: 0 2px; }
.pager-total { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.pager-pos { color: var(--ink-3); font-size: 13px; }

.queue-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.queue-line { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.act-ban { color: var(--danger); }
.flag { font-size: 13px; color: var(--warn); margin: 4px 0 8px; }
.quote { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }

/* ---------- 页脚 ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 20px calc(36px + env(safe-area-inset-bottom, 0px)); }
.foot-in { max-width: var(--wide); margin: 0 auto; font-size: 13px; color: var(--ink-3); }
.foot p { margin: 0 0 6px; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 6px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 9800;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  .top-search { max-width: none; }
  .page { padding: 20px 16px 48px; }
  .toolbar { flex-wrap: wrap; }
  .editor-bar { flex-direction: column-reverse; align-items: stretch; }
  .editor-bar .btn { width: 100%; }
}

/* ---------- 插画 / 图标 ----------
   只有一种动效：慢。船 70 秒漂一个来回，波浪 18/26 秒一周期，热气 6 秒。
   系统开了「减少动态效果」就全部静止。 */
.art { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art-sun { stroke: var(--accent); fill: var(--accent-soft); }
.art-hull { fill: var(--surface); stroke: var(--ink-2); }
.art-boxes rect { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.2; }
.art-boxes .art-box-accent { fill: var(--accent-soft); stroke: var(--accent); }
.art-line { stroke: var(--ink-2); }
.art-thin { stroke-width: 1.1; }
.art-faint { opacity: .5; }
.art-horizon { stroke: var(--line); stroke-width: 1.5; }
.art-waves path { stroke: var(--accent); opacity: .45; }
.art-waves-b path { opacity: .28; }
.art-birds path { stroke-width: 1.2; }
.art-ship { animation: art-drift 70s ease-in-out infinite alternate; }
.art-bob { animation: art-bob 7s ease-in-out infinite; }
.art-waves-a { animation: art-wave 18s linear infinite; }
.art-waves-b { animation: art-wave 26s linear infinite reverse; }
.art-steam path { animation: art-steam 6s ease-in-out infinite; opacity: .6; }
.art-steam path + path { animation-delay: 3s; }
@keyframes art-drift { from { transform: translateX(-26px); } to { transform: translateX(34px); } }
@keyframes art-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@keyframes art-wave { from { transform: translateX(0); } to { transform: translateX(30px); } }
@keyframes art-steam { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: .6; } 100% { transform: translateY(-6px); opacity: 0; } }

/* ── 帖子里的视频（2026-10-15 去掉木壳电视外框）──
   正文 HTML 是发帖时渲染好存库的，老帖里还带着 .tv-ant / .tv-panel / .tv-legs 这些木壳零件，
   所以这里只用样式把它们藏掉、把外框压平，不需要重渲染老帖。 */
.tv.tv-video { position: relative; width: 100%; max-width: 760px; margin: 1.6em auto 0; }
.tv-video .tv-ant, .tv-video .tv-panel, .tv-video .tv-legs { display: none; }
.tv-video .tv-body, .tv-video .tv-bezel { display: block; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.tv-video .video-box { border-radius: 14px; background: #0e1512; box-shadow: var(--shadow); }
.prose figure.video figcaption { text-align: center; }

/* 帖子列表里的视频缩略图 */
.row-video .row-body { display: flex; gap: 20px; align-items: flex-start; }
.row-main { flex: 1; min-width: 0; }
.vthumb {
  position: relative; flex: 0 0 168px; display: block; aspect-ratio: 16 / 10; margin-top: 4px; overflow: hidden;
  border-radius: 12px; background: linear-gradient(160deg, var(--side-bg-top), var(--side-bg-2));
}
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.vthumb:hover img { transform: scale(1.05); }
.vthumb-play { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .2s; }
.vthumb-play::before { content: ""; position: absolute; left: 13px; top: 10px; border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--side-bg); }
.vthumb:hover .vthumb-play { transform: scale(1.08); }
.vthumb-ch { position: absolute; right: 7px; bottom: 7px; padding: 1px 6px; border-radius: 4px;
  font: 600 10px/1.6 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: #fff; background: rgba(0,0,0,.5); }
@media (max-width: 560px) {
  .row-video .row-body { gap: 12px; }
  .vthumb { flex-basis: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  .art-ship, .art-bob, .art-waves-a, .art-waves-b, .art-steam path { animation: none; }
  .player-frame { transition: none; }
  .player-frame.on img, .player-bar.on i { animation: none; }
  .vthumb img { transition: none; }
  .art-steam path { opacity: .5; }
}

.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -3px; margin-right: 6px; color: var(--accent); }
.board-cat { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; }
.empty-box { text-align: center; padding: 20px 0 8px; }
.empty-box .empty { padding-top: 8px; }
.art-empty { width: 160px; margin: 0 auto; color: var(--ink-3); }




/* ---------- 文章页 ----------
   2026-10-15 去掉书页装饰（回纹带 / 双线 / 横虚线信纸 / 首字下沉 / 花饰，用户嫌土）。
   现在是一张干净的白卡片：标题左对齐、一行作者信息、一道发丝线，正文只靠字号、行距和留白。
   类名 .book / .book-head / .book-prose 保留（测试和模板在用），只是不再是「书」。 */
.page-book { max-width: var(--wide); }
.book {
  position: relative; margin: 8px 0 18px; padding: 52px 64px 36px;
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
}
/* 标题、正文、底栏共用一条居中的阅读栏，卡片右边不留一大片空 */
.book > * { max-width: 42rem; margin-left: auto; margin-right: auto; }
.book-head { margin-bottom: 36px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.book-board { margin: 0 0 16px; }
.book-board a {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; letter-spacing: .06em;
  background: var(--accent-soft); color: var(--accent);
}
.book-board a:hover { color: var(--accent); filter: brightness(.97); }
.book .thread-title { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere;   /* 优先在标点处折行，放不下才断字 */
  margin: 0 0 18px; font: 600 clamp(24px, 3vw, 34px)/1.4 var(--serif); letter-spacing: .02em; color: var(--ink); }
.book-head .row-meta { margin: 0; }
.book-prose { font-size: 17.5px; line-height: 1.95; color: var(--ink); }
.book-prose p { margin: 0 0 1.15em; }
.book-prose h1, .book-prose h2, .book-prose h3, .book-prose h4 { margin: 2em 0 .7em; color: var(--ink); }
.book-prose h2 { font-size: 1.3em; padding-left: 14px; border-left: 3px solid var(--accent); line-height: 1.4; }
.book-prose h3 { font-size: 1.12em; }
.book-prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.book-prose blockquote p:last-child { margin-bottom: 0; }
.book-prose pre { background: var(--bg); border: 0; border-radius: 12px; }
.book-prose img { display: block; margin: 1.4em auto; border-radius: 12px; }
.book-prose table { margin: 1.4em 0; }
.book-prose th { font-weight: 600; color: var(--ink-2); border-bottom: 1.5px solid var(--ink-3); }
.book-prose strong { color: var(--ink); }
.book-prose hr { margin: 2.4em 0; }
.book-foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .book { padding: 30px 20px 22px; border-radius: 18px; margin-right: 0; }
  .book-head { margin-bottom: 26px; padding-bottom: 20px; }
  .book-prose { font-size: 16.5px; line-height: 1.9; }
}


/* ---------- 帖子页两栏：书页 + 本版目录 ---------- */
.thread-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 40px; align-items: start; }
.thread-main { min-width: 0; }
.toc {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px);
  max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 2px 12px 18px; border-left: 1px solid var(--line);
}
.toc-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .24em; color: var(--ink-3); }
.toc-board { margin: 0; font: 600 18px/1.4 var(--serif); }
.toc-board a:hover { color: var(--accent); }
.toc-count { margin: 2px 0 10px; font-size: 12px; color: var(--ink-3); }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { position: relative; padding: 9px 0 9px; border-bottom: 1px solid var(--line); }
.toc-list li:last-child { border-bottom: 0; }
.toc-list a { display: block; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.toc-list a:hover { color: var(--accent); }
.toc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toc-list .tag { font-size: 11px; padding: 2px 5px; margin: 0 4px 3px 0; }
.toc-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 当前在读：左侧一道强调色竖线 + 加粗 */
.toc-list li.on::before { content: ""; position: absolute; left: -19px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.toc-list li.on a { color: var(--ink); font-weight: 600; }
.toc-empty { font-size: 13px; color: var(--ink-3); }
.more { margin: 16px 0 0; font-size: 14px; }
.more a { color: var(--accent); }
.pager-compact { margin-top: 12px; font-size: 13px; }

@media (max-width: 1080px) {
  .thread-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; overflow: visible; border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .toc-list li.on::before { left: -12px; }
}


/* ---------- 头像 ---------- */
.avatar { display: inline-block; flex-shrink: 0; border-radius: 50%; object-fit: cover; vertical-align: middle; background: var(--tint); }
.avatar-letter {
  display: inline-grid; place-items: center; font-weight: 600; line-height: 1; color: #fff;
  background: hsl(var(--h, 158) 32% 46%);
}
.me-link, .author-link, .post-author { display: inline-flex; align-items: center; gap: 7px; }
.post-author .avatar { margin-right: 1px; }

/* 个人主页 */
.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin-bottom: 28px; }
.profile-avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.profile-info h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 600 26px/1.3 var(--serif); }
.profile-info h1 .tag { font-family: var(--sans); }
.profile-bio { margin: 0 0 4px; color: var(--ink-2); }
.profile-actions { margin-top: 10px; display: flex; gap: 10px; }
.profile-stats { display: flex; gap: 28px; margin: 0; }
.profile-stats div { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.profile-stats dt { font-size: 12px; color: var(--ink-3); }
.profile-stats dd { margin: 0; font: 600 24px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.profile-tabs { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .profile-head { grid-template-columns: auto 1fr; }
  .profile-stats { grid-column: 1 / -1; justify-content: space-around; }
}

/* 设置页 */
.page-settings { max-width: 40rem; }
.avatar-setting { margin-bottom: 36px; }
.avatar-current { display: flex; align-items: center; gap: 20px; margin: 12px 0 18px; }
.avatar-big { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.avatar-ops { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.avatar-ops .hint { margin: 0; }
.avatar-reset { font-size: 13px; color: var(--accent); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin-top: 8px; }
.avatar-pick { padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.avatar-pick img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-pick:hover { border-color: var(--line); }
.avatar-pick.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }


/* ---------- 悬浮私信（照工作台复刻）----------
   层级：右下按钮 9000 < 聊天窗 9100+（点谁谁在上）< 全屏大表情 9500 < 举报框 9700 < toast 9800 */
.chat-dock { position: fixed; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 9000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-toggle {
  position: relative; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: var(--surface); color: var(--accent); box-shadow: 0 6px 18px -6px rgba(20, 50, 40, .35);
  display: grid; place-items: center; transition: transform .15s;
}
.chat-toggle:hover { transform: translateY(-1px); }
.chat-toggle.open { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chat-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.chat-badge, .chat-cbadge, .cw-minbadge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d64545; color: #fff;
  font: 600 11px/18px var(--sans); text-align: center; font-variant-numeric: tabular-nums;
}
.chat-badge { position: absolute; top: -4px; right: -4px; }
.chat-strip {
  width: 76px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding: 10px 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 38px; box-shadow: 0 10px 30px -12px rgba(20, 50, 40, .3);
}
.chat-strip-empty { width: 220px; margin: 0; padding: 12px 14px; font-size: 13px; color: var(--ink-3); background: var(--surface); }
.chat-strip:has(.chat-strip-empty) { width: auto; border-radius: 12px; padding: 0; }
.chat-contact { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px;
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink-2); }
.chat-contact:hover .avatar { box-shadow: 0 0 0 2px var(--accent); }
.chat-cname { max-width: 60px; font-size: 11px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-online { position: absolute; top: 30px; left: 40px; width: 10px; height: 10px; border-radius: 50%; background: #3cb371; border: 2px solid var(--surface); }
.chat-cbadge { position: absolute; top: -4px; right: 2px; }
.chat-more { border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; }

.chat-win {
  position: fixed; width: 320px; height: 440px; min-width: 280px; min-height: 280px; max-width: 90vw; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden; resize: both;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px -16px rgba(20, 50, 40, .38);
}
.chat-win.min { height: 48px !important; min-height: 48px; resize: none; }
.chat-win.min > :not(.cw-head) { display: none !important; }
.cw-head { display: flex; align-items: center; gap: 6px; height: 48px; flex-shrink: 0; padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--line); cursor: move; user-select: none; touch-action: none; }
.cw-who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; color: var(--ink); }
.cw-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cw-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-status { font-size: 11px; color: var(--ink-3); }
.cw-status.on { color: #2e8b57; }
.cw-tools { display: flex; }
.cw-btn { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--ink-3); font-size: 17px; cursor: pointer; }
.cw-btn:hover { background: var(--tint); color: var(--ink); }
.cw-menu { position: absolute; top: 46px; right: 8px; z-index: 2; display: flex; flex-direction: column; min-width: 110px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px -8px rgba(0,0,0,.25); overflow: hidden; }
.cw-menu button { border: 0; background: none; text-align: left; padding: 9px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.cw-menu button:hover { background: var(--tint); }

.cw-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.cw-older { align-self: center; border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 4px; }
.cm-time { align-self: center; font-size: 11px; color: var(--ink-3); margin: 6px 0 2px; }
.cm-sys { align-self: center; max-width: 90%; font-size: 12px; color: var(--ink-3); text-align: center; line-height: 1.5; }
.cm { position: relative; display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.cm.mine { align-self: flex-end; align-items: flex-end; }
.cm-bubble { padding: 7px 11px; border-radius: 12px 12px 12px 4px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.cm.mine .cm-bubble { border-radius: 12px 12px 4px 12px; background: var(--accent-soft); border-color: transparent; }
.cm-text { white-space: pre-wrap; }
.cm-image { padding: 3px; }
.cm-image img { display: block; max-width: 200px; max-height: 220px; border-radius: 9px; }
.cm-sticker { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none !important; border: 0 !important; cursor: pointer; }
.cm-sticker img { width: 56px; height: 56px; }
.cm-sticker span { font-size: 11px; color: var(--ink-3); }
.cm-reply { display: block; width: 100%; margin: 0 0 5px; padding: 3px 7px; border: 0; border-left: 2px solid var(--accent);
  background: var(--tint); color: var(--ink-3); font-size: 12px; text-align: left; border-radius: 3px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-acts { display: none; gap: 8px; margin-top: 2px; }
.cm:hover .cm-acts, .cm:focus-within .cm-acts { display: flex; }
.cm-acts button, .cm-state button { border: 0; background: none; padding: 0; font-size: 11px; color: var(--ink-3); cursor: pointer; }
.cm-acts button:hover { color: var(--accent); }
.cm.pending .cm-bubble { opacity: .6; }
.cm-state { font-size: 11px; color: var(--ink-3); display: flex; gap: 8px; }
.cm-state.fail { color: var(--danger); }
.cm.flash .cm-bubble { box-shadow: 0 0 0 2px var(--accent); transition: box-shadow .3s; }
.cw-newpill { position: absolute; bottom: 98px; left: 50%; transform: translateX(-50%); border: 0; border-radius: 14px;
  padding: 4px 12px; background: var(--accent); color: var(--bg); font-size: 12px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.2); }

.cw-quote { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-top: 1px solid var(--line); background: var(--tint);
  font-size: 12px; color: var(--ink-3); }
.cw-quote span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-quote button { border: 0; background: none; font-size: 15px; color: var(--ink-3); cursor: pointer; }
.cw-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; max-height: 170px; overflow-y: auto;
  padding: 8px; border-top: 1px solid var(--line); background: var(--surface); }
.cw-stk { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; border-radius: 8px; padding: 4px 2px; cursor: pointer; }
.cw-stk:hover { background: var(--tint); }
.cw-stk img { width: 30px; height: 30px; }
.cw-stk span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.cw-compose { flex-shrink: 0; border-top: 1px solid var(--line); padding: 8px 10px 8px; background: var(--surface); }
.cw-compose textarea { width: 100%; min-height: 36px; max-height: 96px; padding: 7px 9px; font-size: 14px; line-height: 1.5; border-radius: 8px; resize: none; }
.cw-bar { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cw-spacer { flex: 1; }
.cw-ico { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 6px; height: 28px; padding: 0 9px; font-size: 12px; line-height: 26px; cursor: pointer; }
.cw-ico:hover { border-color: var(--accent); color: var(--accent); }
.cw-imgbtn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.cw-send { height: 28px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 600; cursor: pointer; }
.cw-minbadge { margin-left: auto; }

.chat-bigsticker { position: fixed; inset: 0; z-index: 9500; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; pointer-events: none; animation: stk-in .35s cubic-bezier(.3, 1.5, .5, 1) both; }
.chat-bigsticker img { width: min(40vw, 200px); height: auto; filter: drop-shadow(0 12px 24px rgba(0,0,0,.25)); }
.chat-bigsticker span { font: 700 28px/1 var(--sans); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.chat-bigsticker.out { animation: stk-out .45s ease forwards; }
@keyframes stk-in { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes stk-out { to { transform: scale(1.15); opacity: 0; } }

.chat-report { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 9700; width: min(340px, 90vw);
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 10px; }
.chat-report p { margin: 0; font-weight: 600; }
.chat-report div { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 600px) {
  .chat-dock { right: 10px; }
  .chat-toggle { width: 42px; height: 42px; }
  .chat-strip { width: 64px; max-height: 60vh; }
  /* 手机：聊天窗变底部抽屉，不拖不缩 */
  .chat-win { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto !important; height: 62vh !important; max-width: none; resize: none; }
}
@media (prefers-reduced-motion: reduce) { .chat-bigsticker { animation: none; } }


/* ---------- 回复区（2026-10-15 由淡彩便签改来，与文章白卡片统一）----------
   所有回复装在一张白卡片里，楼层之间发丝线分隔；内容走和正文同一条居中 42rem 阅读栏。
   正文缩进到头像右边，一眼分得清谁说的。 */
.replies, .reply-box {
  margin: 18px 0 0; padding: 30px 64px 14px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
}
.replies > *, .reply-box > * { max-width: 42rem; margin-left: auto; margin-right: auto; }
.replies .replies-title {
  display: flex; align-items: baseline; gap: 8px; margin-top: 0; margin-bottom: 0; padding-bottom: 14px;
  font: 600 18px/1.4 var(--serif); letter-spacing: .04em; color: var(--ink);
}
.replies-title span { font: 500 13px/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.note { padding: 20px 0 14px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .post-head { align-items: center; margin-bottom: 6px; }
.note .post-author { color: var(--ink); }
.ip-region { font-size: 12px; color: var(--ink-3); }
.note-prose, .note .post-foot, .note .notice { margin-left: 40px; }
.note-prose { font-size: 16px; line-height: 1.85; color: var(--ink); }
.note-prose p { margin: 0 0 .8em; }
.note-prose blockquote { margin: .8em 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.note-prose img { display: block; max-height: 520px; margin: .6em 0; border-radius: 10px; }
.note-prose pre { background: var(--bg); border: 0; border-radius: 10px; }
.note .post-foot { margin-top: 4px; }
.note.post-dim { opacity: .75; }
.reply-box { padding: 24px 64px; }
.reply-box .empty { margin: 0; padding: 0; text-align: left; color: var(--ink-2); }
@media (max-width: 640px) {
  .replies, .reply-box { padding: 20px 18px 8px; border-radius: 18px; }
  .reply-box { padding: 18px; }
  .note-prose, .note .post-foot, .note .notice { margin-left: 0; }
  .note-prose { font-size: 15.5px; }
}

/* ---------- 分享 ---------- */
.share-layer {
  position: fixed; inset: 0; z-index: 60; background: rgba(20, 28, 25, .45);
  display: grid; place-items: center; padding: 16px;
}
.share-box {
  position: relative; width: min(340px, 100%); background: var(--bg); color: var(--ink);
  border-radius: 14px; padding: 22px 22px 20px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.share-h { margin: 0 0 12px; font-weight: 600; font-size: 16px; }
.share-x {
  position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--ink-3); cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.share-x:hover { background: var(--tint); color: var(--ink); }
.share-qr { display: block; margin: 0 auto; width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.share-hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.share-title {
  margin: 14px 0 8px; font-size: 13.5px; color: var(--ink-2); text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.share-row { display: flex; gap: 8px; }
.share-url {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink-2); font-size: 13px;
}
/* 微信内置浏览器：箭头指向右上角菜单 */
.share-wx { place-items: start end; padding: 8px 14px; background: rgba(10, 14, 12, .82); }
.share-wx-tip { color: #fff; text-align: right; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.share-wx-tip b { font-size: 18px; }
.share-wx-arrow { font-size: 44px; line-height: 1; }


/* ---------- 首页：剧场卡片条 / 发帖入口 / 右栏卡片（2026-10-13 改版） ---------- */
.side .icon, .top .icon, .composer .icon, .row-meta .icon { margin-right: 0; vertical-align: 0; color: currentColor; }
.btn.btn-pill { display: inline-flex; align-items: center; }

.reel-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.reel-card {
  position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden;
  background: var(--accent-soft); box-shadow: var(--shadow); color: #fff;
}
.reel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.reel-card:hover img { transform: scale(1.05); }
.reel-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(10,30,20,.78)); }
.reel-card:hover { color: #fff; }
.reel-badge {
  position: absolute; left: 10px; top: 10px; z-index: 1; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--side-bg);
}
.reel-title { position: absolute; left: 12px; right: 10px; bottom: 12px; z-index: 1; font-size: 14px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.reel-hello {
  display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 14px 16px;
  background: radial-gradient(160px 140px at 0% 0%, #2f8a84 0%, transparent 70%), linear-gradient(160deg, var(--side-bg), var(--side-bg-2));
}
.reel-hello::after { display: none; }
/* 标签放回文档流、顶到卡片上沿：原来绝对定位 + 正文贴底，卡片窄（1400 宽时约 130px）标题折成 3 行就顶到标签底下被压住。
   标题字号跟卡片宽度走（cqi），老浏览器不认就用前面的固定 19px */
.reel-hello { container-type: inline-size; padding-top: 10px; }
.reel-hello .reel-badge { position: static; align-self: flex-start; margin: 0 0 auto -4px; }
.reel-hello-title { margin: 10px 0 8px; font: 400 19px/1.35 "KuaiLe Hero", var(--serif); font-size: clamp(16px, 16cqi, 26px); letter-spacing: .04em; color: #fff; }
.reel-hello p { margin: 0; font-size: 12.5px; line-height: 1.7; color: #cfe8da; }

.composer { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 20px 6px; margin-bottom: 30px; }
.composer-top { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.composer-anon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.composer-anon .icon { width: 20px; height: 20px; }
.composer-input {
  flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; padding: 0 22px; border-radius: 999px;
  background: var(--bg); color: var(--ink-3); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-input:hover { color: var(--ink-2); background: var(--accent-soft); }
.composer-acts { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 4px; padding: 6px 0; }
.composer-acts a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); }
.composer-acts a:hover { background: var(--tint); color: var(--accent); }
.composer-acts .icon { width: 20px; height: 20px; color: var(--accent); }

.block-title { border-bottom: 0; padding-bottom: 4px; margin-bottom: 12px; }

.home-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; }
.side-card-title { margin: 0 0 8px; font: 600 16px/1.4 var(--serif); letter-spacing: .04em; color: var(--ink); }
.side-card-empty { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.8; }
.side-card-empty a { color: var(--accent); }
.side-card .hot li { font-size: 14px; padding: 7px 0; }
/* 小贸剧场播放卡（2026-10-15 替换木壳电视：拟物木纹放在扁平白卡里太突兀）
   顶部故事进度条 + 画面慢推 + 字幕放在画面下方（不压在图上）+ 上一集 / 下一集。
   JS 在 app.js「小贸剧场播放卡」段；不开 JS 时停在第 1 集第 1 格。 */
.player { padding: 16px 16px 14px; }
.player-head { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; }
.player-head .side-card-title { margin: 0; }
.player-live { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent); }
.player-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.player-all { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.player-screen { position: relative; display: block; aspect-ratio: 640 / 444; overflow: hidden; border-radius: 14px; background: var(--accent-soft); isolation: isolate; }
.player-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.player-frame.on { opacity: 1; }
.player-frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; }
.player-frame:nth-child(even) img { transform-origin: 60% 55%; }
.player-frame.on img { animation: player-push 3.6s ease-out both; }
@keyframes player-push { from { transform: scale(1.01); } to { transform: scale(1.08); } }
/* 顶上一层很淡的暗渐变：漫画天空多是浅色，白色进度条直接压上去看不见 */
.player-screen::after { content: ""; position: absolute; inset: 0 0 auto; height: 44px; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.28), transparent); }
.player-bars { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; display: flex; gap: 4px; }
.player-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.45); overflow: hidden; }
.player-bar i { display: block; height: 100%; width: 0; background: #fff; }
.player-bar.done i { width: 100%; }
.player-bar.on i { animation: player-bar 3.6s linear both; }
@keyframes player-bar { from { width: 0; } to { width: 100%; } }
.player-cap { margin: 12px 4px 2px; min-height: 2.9em; font: 500 15px/1.45 var(--serif); color: var(--ink); }
.player-foot { display: flex; align-items: center; gap: 6px; margin: 8px 0 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.player-ep { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-ep b { color: var(--accent); font-weight: 600; margin-right: 6px; }
.player-btn { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--bg); color: var(--ink-2); }
.player-btn:hover { background: var(--accent-soft); color: var(--accent); }
.player-btn .icon { width: 14px; height: 14px; margin: 0; color: currentColor; }
.board-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--bg); color: var(--ink-2); font-size: 13.5px;
}
.chip em { font-style: normal; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chip-accent { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-card-stats dl { display: flex; justify-content: space-around; margin: 0; }
.side-card-stats dl div { display: flex; flex-direction: column-reverse; align-items: center; }
.side-card-stats dt { font-size: 12px; color: var(--ink-3); }
.side-card-stats dd { margin: 0; font: 600 22px/1.3 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }

/* 中屏：右栏落到下面 */
@media (max-width: 1280px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .player { grid-row: span 2; }
}

/* 窄屏：侧栏收成抽屉，面板铺满 */
@media (max-width: 1080px) {
  body { background: var(--bg); }
  .shell { display: block; }
  .panel { margin: 0; border-radius: 0; min-height: 100vh; }
  .top { border-radius: 0; }
  .top-in { padding: 0 20px; height: 64px; }
  .top-menu { display: inline-grid; flex-shrink: 0; }
  .top-brand { display: block; flex-shrink: 0; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 280px; height: auto;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 8px 0 30px rgba(0,0,0,.18);
    padding-top: calc(22px + env(safe-area-inset-top, 0px));
  }
  .side.open, .side:target { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 55; border: 0; background: rgba(10, 25, 18, .38); }
  .side-scrim:not([hidden]) { display: block; }
  /* 抽屉里没有右边面板可「挖进」，当前项改成整条高亮 */
  .side-link.on::before, .side-link.on::after { display: none; }
  .side-link { margin-right: 18px; border-radius: 999px; }
  .side-cat ul { margin-right: 0; }
}
@media (max-width: 760px) {
  .reel-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px 16px; padding: 2px 16px 6px; }
  .reel-strip::-webkit-scrollbar { display: none; }
  .reel-card { flex: 0 0 128px; scroll-snap-align: start; }
  .home-side { grid-template-columns: 1fr; }
  .composer-acts a { padding: 8px 6px; font-size: 13.5px; }
}
@media (max-width: 560px) {
  .top-in { gap: 10px; padding: 0 14px; }
  .top-search input { height: 40px; font-size: 14px; }
  .top-write span, .me-name, .top-login-more, .top-admin { display: none; }
  .top-write { width: 40px; padding: 0; justify-content: center; }
  .row { padding: 16px 16px 12px; border-radius: 16px; }
  .feature { padding: 18px 16px; }
  .stats { gap: 12px; }
  .feature-meta .stats { margin-left: 0; width: 100%; }
  .row-last { display: none; }
  .composer { padding: 12px 14px 4px; }
  .composer-acts a:nth-child(4) { display: none; }
}
@media (max-width: 400px) {
  .top-brand { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .side, .reel-card img { transition: none; }
}
