/* ShareFlix 自定义样式：组件层（配色 / 层级 / 无边框规律统一见 theme.css）
   强调色一律用 theme.css 的品牌色 var(--c-brand)，不再单独定义 accent */
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; }
img { background: var(--c-block); }
/* 表情类图片自带透明通道，不受上方全局 img 占位底色影响（否则透明表情会带灰底） */
.cmt-emj, .cmt-ed-emj, .cmt-emj-panel img, .dm-bub .cmt-emj { background: transparent; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
input, select, textarea, button { font: inherit; }
/* 页面画布底色（= body 底色）：给吸顶元素当「垫层」用 —— 吸顶条本身常是圆角条，
   两侧会露出滚过的内容，垫一层同色才能遮住，视觉上仍是「浮在页面上」 */
.bg-canvas { background: var(--c-bg); }
/* 图标字体（remixicon）只有 400 一个字重：放进 font-semibold / bold 的容器时，浏览器会做「合成加粗」，
   线条被撑粗、边缘发糊（实心图标看不出，线条图标很明显）。这里统一钉死字重，图标不随正文一起变粗。 */
[class^="ri-"], [class*=" ri-"] { font-weight: 400; }

/* ── Plus Jakarta Sans 本地化（SIL OFL-1.1，许可证见 /fonts/OFL.txt；与 adminmart modern 同款）。
     latin 子集 400/500/600/700，中文等缺失字形自动回退到下方系统中文字体栈；
     供全站英文/数字使用，避免任何外网字体请求 ── */
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:400; font-display:swap; src:url("/fonts/pjs-latin-400.woff2") format("woff2"); }
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:500; font-display:swap; src:url("/fonts/pjs-latin-500.woff2") format("woff2"); }
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:600; font-display:swap; src:url("/fonts/pjs-latin-600.woff2") format("woff2"); }
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:700; font-display:swap; src:url("/fonts/pjs-latin-700.woff2") format("woff2"); }

/* ── 微交互：薄滚动条 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-txt-3); }

/* ── 微交互：全局平滑过渡基底 ──
   ★ 全站 hover 的过渡都靠这一条兜底（各组件如需额外属性再单独声明）。
   transform 时长更短（.12s）：用于按钮 :active 的按压缩放，反馈要跟手；
   opacity 也要带上：不少 hover 是「整体变淡/变亮」（如资源卡右上角的小图标钮），
   漏掉它就会出现「颜色平滑过渡、透明度瞬间跳变」的不协调观感。 */
a, button, input, select, textarea {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease,
              opacity .2s ease, transform .12s ease;
}

/* ── 微交互：按钮激活缩放 ── */
button:active:not(.ld-cover):not(.ld-nav):not(.tab-pill):not(.modal-card > button):not([disabled]) { transform: scale(0.97); }

/* ── 微交互：卡片悬停上浮 ── */
.res-card-wrap {
  transition: transform 0.2s ease, background-color 0.2s ease !important;
}
.res-card-wrap:hover {
  transform: translateY(-1px);
}
.modal-card,
#comment-list > [data-cid] {
  transition: background-color 0.2s ease !important;
}

/* ── 自定义单/多选（.rd-opt 选项组，如资源上报的原因选择、分享资源的画质/字幕/特性）──
   原生 input 仍是表单与无障碍载体（.sr-only 只做视觉隐藏，键盘方向键、读屏、提交均正常）；
   外观由本组件绘制：默认 = 卡片级底色 + 中性描边，选中 = 品牌淡底 + 品牌色描边 + 实心标记。
   底色三态与站内层级一致：默认 #1a1a1a（卡片级）→ hover 提亮一档 → 选中品牌淡底。
   配色全部取 theme.css 的变量，深浅主题自动跟随（换色仍只改 :root 一处）。
   ★ 标记两态：.rd-mark 圆形（+ 品牌实心点）= 单选；.rd-mark.sq 方形（+ 白勾）= 多选，语义不混。
   ★ 选中态用 :has() 向上选中整块，因此模板里无需堆 peer-checked 类；
   ★ .rd-opt:has(:checked) 的特异性高于 .rd-opt:hover，选中项悬停时不会被 hover 底色盖掉。 */
.rd-opt { background: var(--c-card); transition: background-color .2s ease, color .2s ease; }
.rd-opt:hover { background: var(--c-hover); }
.rd-opt:has(input:checked) { background: var(--c-brand-bg); color: var(--c-brand-txt); }
.rd-mark {
  flex: none; width: 1.125rem; height: 1.125rem; border-radius: 50%;
  border: 2px solid var(--c-txt-3);
  display: grid; place-items: center;
  transition: border-color .2s ease, background-color .2s ease;
}
.rd-mark::after {
  content: ''; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--c-brand);
  transform: scale(0); transition: transform .18s ease;
}
input:checked + .rd-mark { border-color: var(--c-brand); }
input:checked + .rd-mark::after { transform: scale(1); }
/* 多选变体：方形改圆角小方，选中整体填品牌色、勾用白色（复用 ::after 会与圆点冲突，故改用子元素 <i>） */
.rd-mark.sq { border-radius: var(--r-ctl); }
.rd-mark.sq::after { display: none; }
.rd-mark.sq i { font-size: .8rem; line-height: 1; color: #fff; opacity: 0; transition: opacity .15s ease; }
input:checked + .rd-mark.sq { background: var(--c-brand); border-color: var(--c-brand); }
input:checked + .rd-mark.sq i { opacity: 1; }
/* 原生 input 已视觉隐藏，焦点环要画在标记上（与 theme.css 的焦点规范同款：2px 主色 + offset 2px） */
input:focus-visible + .rd-mark { outline: 2px solid var(--c-brand); outline-offset: 2px; }

/* ── 次要按钮（.btn-plain）：用于「订阅」「取消」等非主操作，与主按钮（bg-blue-600）拉开层次 ──
   深色层里浅色描边被统一置透明（theme.css 无边框规律），只靠文字的按钮会与面板融成一片。
   底色取 --c-field（色阶顶端的中性灰）：卡片级底色 #1a1a1a 在面板（#121212 / #141414）上只差几级灰阶，
   按钮形状看不出来（实测反馈「融在背景里」）；hover 靠文字转主色给反馈（色阶内再没有更亮的中性档）。 */
.btn-plain { background: var(--c-field); color: var(--c-txt-2); transition: background-color .2s ease, color .2s ease; }
.btn-plain:hover { color: var(--c-txt); }

/* ── 一体式双格操作组（.act-pair）：编辑 / 删除这类成对的小操作 ──
   形态：等高两格拼成一个整体（深灰底），中间一条 1px 分隔线，两格各自独立 hover 配色（左蓝右红）。
   视觉与个人中心资源卡的编辑·删除组同源（那一处定义在 profile.ejs 的内联样式里，随卡片一起定位）。 */
.act-pair {
  display:grid; grid-template-columns:1fr 1fr; align-items:stretch; justify-items:stretch;
  box-sizing:border-box; width:5.5rem; height:1.75rem;
  padding:0; gap:0; overflow:hidden;
  background:#141414; border-radius:.25rem;
}
.act-pair a, .act-pair button {
  display:grid; place-items:center; background:transparent; border:0; padding:0; margin:0;
  cursor:pointer; color:#9aa4b2; font-size:.875rem;
  transition:background-color .15s, color .15s;
}
.act-pair button { border-left:1px solid var(--c-divider); }   /* 中缝：与全站卡内分隔线同一色 */
.act-pair a:hover { background:#1f2a44; color:#9db8ff; }       /* 左格（编辑/补链）：复用页面蓝调 */
.act-pair button:hover { background:#3a222b; color:#ff7b93; }  /* 右格（删除）：复用页面危险色 */

/* ── 可折叠区块（.fold，基于原生 <details>）──
   标题行整条可点、右侧箭头随开合旋转。用原生 details/summary 而非自实现：
   零 JS 依赖、键盘可达、读屏能识别展开状态，比再写一套折叠逻辑更「可持续」。 */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .375rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: ''; flex: none; width: .5rem; height: .5rem; margin-left: auto;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.fold[open] > summary::after { transform: rotate(-135deg) translate(-1px, -1px); }
/* 居中变体：文案与箭头整体居中（用于「查看更多」这类纯展开入口，而非带标题的内容块） */
.fold--center > summary { justify-content: center; }
.fold--center > summary::after { margin-left: 0; }

/* ── 微交互：入场动画（交错上浮淡入） ──
   ★ 只作用于「运行时动态追加」的条目：由 JS 在插入后打上 .enter（见各页 markEnter）。
     首屏内容一律不加 —— 首屏是服务端直出的既有内容，若逐条淡入，每次刷新都会从上往下
     一格格闪出来（看起来像页面在闪）；入场动画的语义是「新内容刚插入」，不是「页面刚打开」。
   --i 为批次内序号（JS 写入，最多计到 10），控制交错节奏，避免长列表末尾延迟过大。 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.enter {
  animation: fadeInUp 0.3s ease both;
  animation-delay: calc(var(--i, 0) * 0.02s);
}

/* 无障碍：尊重用户减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════
   毛玻璃效果（glassmorphism）
   ═══════════════════════════════════════════════════════ */

/* ── 弹框遮罩层：磨砂半透明 ── */
.modal-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── 弹框卡片：微半透明 + 背景模糊 ── */
.modal-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── 用户下拉菜单：毛玻璃 ── */
#userMenuDrop > div {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── 无障碍：不支持 backdrop-filter 的浏览器回退到纯色背景 ── */
@supports not (backdrop-filter: blur(1px)) {
  .modal-backdrop { background: rgb(15 23 42 / 0.25); }
  .modal-card { background: var(--c-surface); }
}

/* ═══════════════════════════════════════════════════════
   骨架屏加载态（Shimmer 占位符）
   ═══════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: var(--c-line);
  border-radius: 0.4875rem;
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  background-size: 400px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* 形状变体 */
.skeleton-line  { height: 0.875rem; width: 100%; }
.skeleton-line.w-3\/4 { width: 75%; }
.skeleton-line.w-1\/2 { width: 50%; }
.skeleton-line.w-1\/4 { width: 25%; }
.skeleton-circle { width: 2.75rem; height: 2.75rem; border-radius: 9999px; }
.skeleton-card   { height: 5rem; width: 100%; }

/* ── 版本特性「加分项」徽章（原创自译 / 未删减版）：静态渐变底 + 扫光 shimmer ──
   连贯性：扫光条在两端都完全移�?chip 外（不可见），循环重置发生在离场状态，无跳帧观感；
   box-shadow 已被全站清零，呼吸改�?filter 明度 */
.ft-bonus {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(100deg, #e11d48 0%, #f97316 100%);
  color: #fff;
  animation: ftBreathe 2.5s ease-in-out infinite;
}
.ft-bonus::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 55%;
  transform: translateX(-130%);
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
  animation: ftSweep 2.6s ease-in-out infinite;
}
.ft-bonus i {
  display: inline-block;
  margin-right: 1px;
  animation: ftTwinkle 1.8s ease-in-out infinite;
}
@keyframes ftSweep { 0% { transform: translateX(-130%); } 100% { transform: translateX(360%); } }
@keyframes ftBreathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes ftTwinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

/* ── 消息未读小红点：低频心跳脉冲（短促两跳后长时间静默，像心跳而不刺眼�?──
   节奏：~2.9s 一循环；大�?�?回落 �?小跳 �?回落，其余时间静�?*/
.notif-dot {
  animation: notifBeat 2.9s ease-in-out infinite;
  transform-origin: center;
}
@keyframes notifBeat {
  0%, 14% { transform: scale(1); }
  4% { transform: scale(1.5); }     /* 第一跳（大） */
  9% { transform: scale(1); }
  19% { transform: scale(1.25); }   /* 第二跳（小，间隔略短更像心跳�?*/
  25% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ── 元数据横向滚动容器（.meta-scroll）：白→透明两侧渐隐遮挡 + 隐藏滚动�?──
   左右遮挡层为普通兄弟节点（.ms-fade），�?.meta-scroll-wrap 相对定位固定于可视两侧；
   显隐�?meta-scroll.js �?scrollLeft 状态驱动（滚到中间两侧都显示，贴边消失对应侧） */
.meta-scroll-wrap { position: relative; }
.meta-scroll {
  overflow: auto hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.meta-scroll::-webkit-scrollbar { display: none; }
.ms-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .25s ease;
}
.ms-fade-l { left: 0; background: linear-gradient(to right, var(--c-surface), transparent); }
.ms-fade-r { right: 0; background: linear-gradient(to left, var(--c-surface), transparent); }

/* ── 资源卡「谁赞了」头像堆�?──
   头像输出�?data-role="thanks-avs" 容器内（资源�?_resource-card.ejs / 资源二级�?/ 点赞�?JS 重绘共用）；
   PC/移动端均展示 �? 位；层叠用「相邻选择器负 margin」，头像无需逐项打类；白描边在叠放时制造可读层�?*/
.thanks-avs { align-items: center; gap: 0; }
.thanks-avs:empty { display: none; }   /* 无点赞者时不占位（�?gap 无关的干净布局�?*/
.thanks-avs .thanks-av { display: inline-flex; }
.thanks-avs .thanks-av img {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  object-fit: cover;
  background: var(--c-block);
  border: 2px solid var(--c-bg);
  box-sizing: content-box;
}
.thanks-avs .thanks-av + .thanks-av,
.thanks-avs .thanks-av + .thanks-more { margin-left: -0.5rem; }
.thanks-avs .thanks-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.25rem;
  min-width: 1.25rem;
  padding: 0 .3rem;
  border-radius: 9999px;
  font-size: 10px;
  line-height: 1;
  color: var(--c-txt-2);
  background: var(--c-line);
  border: 2px solid var(--c-bg);
  box-sizing: content-box;
  cursor: pointer;
  font-family: inherit;
}
.thanks-avs .thanks-more:hover { background: var(--c-line); color: var(--c-txt-2); }
.thanks-avs .thanks-more:active { transform: scale(.95); }

/* ══�?提示浮层阴影（全站唯一例外：全局 * 禁阴影，仅提示层带投影浮起感�?══�?*/
.pts-chip {
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .55), 0 2px 6px -1px rgba(0, 0, 0, .55) !important;
}
/* 页内 flash 长条（超长错误等）：仅在确有超长消息时由 _flash.ejs 渲染可见条；
   短消息不渲染 DOM、只�?points-toast.js 走统一浮层，故此处不再需要隐藏规�?*/
.flash-success, .flash-error, .flash-info {
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .55), 0 1px 3px -1px rgba(0, 0, 0, .55) !important;
}

/* ══�?提示规范 V1（全站唯一提示语言）═════════════════════════════════�?   骨架   ：单�?= [语义图标] + 文本（成�?错误/信息共用同一骨架�?   形�?  ：浅彩底 + 同族描边(1px) + 深色字；浮层=全圆角胶囊，页内长条=常规圆角
   语义�?：success �?/ error �?/ info 蓝（仅三档，全站唯一�?   图标   ：Remix Icon 固定映射（见 JS），不混用其他图形符�?   浮层   ：固定顶部居�?flex 排版（避免半像素模糊），时长固定
   积分到账：按事件性质归入 success/info，文案含「积�?+N」原样展示，不设第二视觉
   ────────────────────────────────────────────────────────────────── */
.pts-toast {
  position: fixed;
  inset: 16% 0 auto 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.pts-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface);
  border: 0;           /* 基座中性兜底，语义色一律由 is-* 指定 */
  border-radius: 9999px;               /* 提示浮层：全圆角胶囊 */
  padding: 10px 20px;
  animation: ptsRise 1.9s ease forwards;
  max-width: 82vw;
}
.pts-chip .pts-ico { font-size: 18px; line-height: 1; flex-shrink: 0; }
/* 语义三态：底色与图标色都用 theme.css 的变量（原先写死的 #f0fdf4/#fef2f2/#eff6ff 是浅色主题时代的白底方案，
   而 .pts-text 的文字色已改成 var(--c-txt)（近白），浅底配白字 = 提示根本看不见） */
.pts-chip.is-ok { background: var(--c-ok-bg); }
.pts-chip.is-ok .pts-ico { color: var(--c-ok); }
.pts-chip.is-err { background: var(--c-danger-bg); }
.pts-chip.is-err .pts-ico { color: var(--c-danger); }
.pts-chip.is-info { background: var(--c-brand-bg); }
.pts-chip.is-info .pts-ico { color: var(--c-brand-txt); }
.pts-text { font-size: 15px; color: var(--c-txt); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes ptsRise {
  0% { opacity: 0; transform: translateY(10px) scale(.92); }
  14% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(1); }
}

/* ══�?实时消息横幅�?rtn-*，见 /js/realtime.js）═════════════════════════
   形态：水平居中于顶导航下方（留 0.75rem 间隙），从导航下层向下滑出（�?iOS 通知横幅）；
        滑入顶部被导航遮�?�?产生"从导航底下露�?的效�?   视觉：白底圆角描�?+ 柔和投影（提示层例外规则�?toast）；整体扁平克制
   动画：rtnIn 由上�?-100% 下滑到位 / rtnOut 反向收起（JS animationend 移除�?   层级：z 20 < 顶导�?z-30（导航盖住横幅顶部，实现下层滑出）；高于页面正文�?*/
.rtn-wrap {
  position: fixed;
  inset: calc(3.5rem + 0.75rem) 0 auto 0;   /* 顶导航高 h-14=3.5rem，下方留 0.75rem 再显示横�?*/
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;            /* 左右居中 */
  gap: 8px;
  pointer-events: none;
}
.rtn-card {
  pointer-events: auto;
  position: relative;
  overflow: hidden;           /* 倒计时进度条贴底并随圆角裁切 */
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(24rem, calc(100vw - 1.5rem));
  background: var(--c-surface);
  border: 0;
  border-radius: 0.4875rem;
  padding: 10px 10px 10px 12px;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .55), 0 2px 5px -1px rgba(0, 0, 0, .55) !important;
  animation: rtnIn .3s ease;
}
.rtn-ico {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.4875rem;
  display: grid;
  place-items: center;
}
.rtn-ico i { font-size: 1.05rem; line-height: 1; }
.rtn-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rtn-text {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--c-txt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rtn-ref {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .75rem;
  color: #2563eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rtn-x {
  flex-shrink: 0;
  margin: -2px -2px 0 0;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 0.4875rem;
  color: var(--c-txt-3);
}
.rtn-x:hover { background: var(--c-block); color: var(--c-txt-2); }
.rtn-card.rtn-out { animation: rtnOut .24s ease forwards; }

/* 自动收起倒计时：卡片底部细进度条，自左向右逐渐消失�?   时长�?JS 注入 --rtn-dur（与 realtime.js DURATION 对齐），悬停�?animation-play-state 暂停 */
.rtn-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: #60a5fa;                 /* 浅蓝细条，提示剩余展示时�?*/
  transform-origin: left center;
  animation: rtnCountdown var(--rtn-dur, 6000ms) linear forwards;
  pointer-events: none;
}
@keyframes rtnCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes rtnIn {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rtnOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-100%); }
}

/* ══�?说明弹框�?help-q 触发，见 /js/help.js）═════════════════════════�?   问号图标：浅灰圆底小图标，hover 变浅蓝底 + 蓝字（低调、不抢主操作）；
   弹框卡片：与全站其余弹框同款骨架�?modal-card，见下方「弹框卡片骨架」） */
.help-q {
  color: var(--c-txt-3);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s;
}
.help-q:hover { color: var(--c-txt-2); }

/* ══�?弹框出入场动画（.modal-anim 统一规范，打卡弹框先行接入）══════�?   只驱�?transform / opacity（合成器属性，零重排重绘），保证丝滑不卡顿�?   进入：自顶部上方 32px 下滑至屏幕正�?+ 渐显（ease-out 减速落位）�?   退出：自正中向下滑�?32px + 渐隐（ease-in 加速离场，出场更快）�?   生命周期�?JS 管理：open = �?hidden �?回流 �?�?.open�?   close = �?.closing �?transform 过渡结束（或兜底定时器）�?�?hidden�?*/
.modal-anim .modal-backdrop {
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-anim .modal-card {
  opacity: 0;
  transform: translateY(-32px);
  transition:
    transform .3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity .24s ease-out;
  will-change: transform, opacity;
}
.modal-anim.open .modal-backdrop { opacity: 1; }
.modal-anim.open .modal-card {
  opacity: 1;
  transform: translateY(0);
}
.modal-anim.closing .modal-backdrop {
  opacity: 0;
  transition: opacity .22s ease-in;
}
.modal-anim.closing .modal-card {
  opacity: 0;
  transform: translateY(32px);
  transition:
    transform .26s cubic-bezier(0.55, 0.06, 0.68, 0.19),
    opacity .2s ease-in;
}
@media (prefers-reduced-motion: reduce) {
  .modal-anim .modal-card, .modal-anim .modal-backdrop { transition: none; }
}

/* ══�?弹框卡片骨架（全�?modal-anim 弹框统一；以资源卡「点赞用户」弹框为基准）═══
   卡片：白�?+ 1px 细描�?+ 站内统一圆角�?.3rem），不设重投影——描边即分层�?   与全站「无多余阴影」规范一致（�?help/confirm 各自投影一并收敛）�?   头部：标题居�?+ 圆形关闭钮居右，与内容区�?1px 浅线分隔�?   内容滚动区由各弹框自行用 max-h + overflow 控制，避免卡片无限增高�?*/
.modal-card {
  position: relative;
  width: 100%;
  background: var(--c-surface);
  border: 0;
  border-radius: 0.4875rem;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 0;
}
.modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-txt);
  line-height: 1.5;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: -0.25rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--c-txt-3);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover { background: var(--c-block); color: var(--c-txt-2); }
.modal-close i { font-size: 1.125rem; line-height: 1; }
.modal-body { padding: 0 1.25rem 1.25rem; }   /* 标题下方不留上边距：这段间距只由 .modal-head 自身下内距控制，全站弹窗一致 */

/* ══�?开关（打卡弹框「登录自动打卡」等）═══════════════════════════════
   扁平滑钮：灰�?/ 开启绿�?+ 白色滑块右移，无阴影（延续全站规范） */
.ck-toggle {
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  border: 0;
  padding: 0;
  border-radius: 9999px;
  background: var(--c-line);
  cursor: pointer;
  transition: background .18s ease;
  flex-shrink: 0;
}
.ck-toggle span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: var(--c-surface);
  transition: transform .18s ease;
}
.ck-toggle.on { background: #15ac70; }
.ck-toggle.on span { transform: translateX(1.125rem); }

/* 打卡「满 7 天 +N」奖励标记：弹框是浅色浮层（.pop-light），而主题层里 text-amber-700 是深色取值、
   bg-amber-100 更是 #33280c 的深底（浅色浮层未重映射它）—— 直接用语义类会变成浅框里一块深褐。
   这里用实底金 + 深褐字，10px 小字也够清晰（对比度约 5.7:1）。
   ★ 服务端模板与「打卡成功后前端插入」共用这一份（_footer.ejs / public/js/checkin.js），改样式只改这里 */
.ck-bonus {
  display: inline-flex; align-items: center; flex: none; margin-left: auto;
  height: 1rem; padding: 0 .3125rem; border-radius: .25rem;
  background: #fde68a; color: #92400e;
  font-size: .625rem; font-weight: 600; line-height: 1; white-space: nowrap;
}

/* 关注按钮配色（单一来源）：未关注=品牌紫底白字；已关注=深灰底灰字（.on）。
   ★ 个人中心资料头（views/profile.ejs 的 .pf-btn）与用户悬浮卡（views/_footer.ejs 的 #uc-follow）共用这一份，
     两处只各自定义尺寸/内边距，改色只改这里
   ★ 深色卡片内的列表关注按钮不复用 .on：卡片底色就是 #1a1a1a，会与卡片同色「消失」，
     改走卡内中性语义 .pf-act-neutral（见 views/profile.ejs） */
.follow-tone { background: #6430ff; color: #fff; }
.follow-tone.on { background: #1a1a1a; color: #bbb; }
/* 深灰中性按钮（单一来源）：账户设置等次要操作 —— 资料头与悬浮卡共用，改色只改这里。
   限定 a/button：页面内联样式里的 .pf-btn 与本规则同权重但更靠后，不限定会被它盖掉 */
a.tone-ghost, button.tone-ghost { background: #1a1a1a; color: #bbb; }

/* ══�?评论编辑器（.cmt-*，主评论 + 内联回复共用，见 /views/movie.ejs）═══�?   形态：文本区默认一行与左侧头像同高（w-9=36px）；聚焦/输入后底部浮�?        「操作行」（发送按�?/ 回复含取�?发送并列），仅文本换行增高 �? 行�?   占位：使用覆盖层（非原生 placeholder）——输入真实文字才消失�?        仅按回车产生的空行不触发消失（B站习惯）�?   边框：聚焦态整框描蓝（:focus-within）；扁平无阴影，统一 0.3rem 圆角 */
.cmt-editor {
  /* 高度单一来源：--cmt-h（单行高）→ --cmt-pad-y（单行垂直居中内边距）；
     --cmt-lh 必须与 .cmt-ta 的 font-size × line-height 保持一致 */
  --cmt-h: 2.25rem;
  --cmt-lh: 1.421875rem;                              /* 0.875rem × 1.625 */
  --cmt-pad-y: calc((var(--cmt-h) - var(--cmt-lh)) / 2);
  border: 0;
  border-radius: 0.4875rem;
  background: var(--c-surface);
  box-shadow: 0 0 0 0 transparent;                   /* 聚焦环起始态：与 :focus-within 同结构，才能平滑过渡 */
  transition: box-shadow .18s ease;
  box-sizing: border-box;
}
.cmt-editor.is-lg { --cmt-h: 3.25rem; }               /* 顶部主编辑器：与左侧头像 3.25rem(52px) 同高 */
.cmt-editor:focus-within { box-shadow: 0 0 0 2px var(--c-brand); }
.cmt-ta {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: var(--cmt-h);           /* 单行高度与左侧头像一致（顶部编辑器由 .is-lg 提到 3.25rem） */
  max-height: calc(var(--cmt-lh) * 6 + var(--cmt-pad-y) * 2);  /* 上限 6 行后内部滚动 */
  padding: var(--cmt-pad-y) .75rem;   /* 单行文字垂直居中 */
  border: 0;
  outline: 0;
  overflow: hidden auto;              /* x 隐藏 / y 滚动（简写顺序是 x y） */
  background: transparent;
  font-size: .875rem;
  line-height: 1.625;                  /* 0.875×1.625 = 22.75px，与站点正文一�?*/
  color: var(--c-txt);
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: text;
  -webkit-user-modify: read-write-plaintext-only;   /* 粘贴只进纯文本，避免富文本污�?*/
}
.cmt-ta:focus { outline: none; }
/* contenteditable 内表情图：与文字同排、基线对�?*/
.cmt-ed-emj {
  display: inline-block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: -0.2em;
  margin: 0 .05rem;
  pointer-events: none;
}
.cmt-ta .cmt-ph, .cmt-ta + .cmt-ph { pointer-events: none; }
.cmt-ph {
  position: absolute;
  inset: 0 .75rem auto .75rem;                            /* 对齐 textarea 内第一行文�?*/
  z-index: 0;
  padding-top: var(--cmt-pad-y);
  line-height: 1.625;
  font-size: .875rem;
  color: var(--c-txt-3);
  pointer-events: none;
  white-space: pre-wrap;
  overflow: hidden;
}
.cmt-editor { position: relative; }   /* �?.cmt-ph 绝对定位 */
/* 操作行：文本区之下（编辑器内底部）；回复含「取消�?「发送」并列，主评论仅「发送�?   高度与上半单行文本区一致（�?4px），按钮垂直居中，避免下重上�?*/
.cmt-ops {
  /* 默认收起：用 height + opacity 折叠（而非 display:none），评论框整体高度才能平滑过渡；
     高度用定值而不用 min-height —— min 会压过 max-height，收起态就压不回 0 了 */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  height: 0;
  padding: 0 .5rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;                                   /* 收起时不进 Tab 焦点序列 */
  border-top: 1px solid transparent;                    /* 展开时淡入为 --c-divider 的功能分隔线 */
  transition: height .22s ease, opacity .16s ease, border-top-color .22s ease, visibility 0s .22s;
  box-sizing: border-box;
}
.cmt-ops.on {                                           /* 展开态：由 showOps() 切换 */
  height: 2.25rem;                                      /* 操作行固定高度 36px（按钮居中） */
  opacity: 1;
  visibility: visible;
  border-top-color: var(--c-divider);
  transition-delay: 0s;                                 /* 展开立即可见；收起才按上面的延迟隐藏 */
}
.cmt-cancel,
.cmt-send {
  padding: .15rem .7rem;
  border: 0;
  border-radius: 0.4875rem;
  font-size: .875rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s ease;
}
.cmt-cancel {
  background: transparent;
  color: var(--c-txt-3);
}
.cmt-cancel:hover { color: var(--c-txt-2); }
.cmt-send {
  background: var(--c-brand);
  color: #fff;
}
.cmt-send:hover { background: var(--c-brand-hover); }

/* 表情入口按钮（操作行最左，margin-right:auto 把取�?发送顶到右侧） */
.cmt-emoji {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.4875rem;
  background: transparent;
  color: var(--c-txt-3);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.cmt-emoji:hover { color: #f59e0b; background: var(--c-surface-2); }
/* 表情选择面板：插�?.cmt-editor 内部 absolute 定位（随评论框滚�?左对齐），网格平�?
   统一限高 + 内部滚动（评论内联回复与私信同一规范）；z-index 提至顶层防被评论内容遮挡 */
.cmt-emj-panel {
  position: absolute;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .25rem;
  width: max-content;
  max-width: min(15rem, calc(100vw - 1.5rem));
  max-height: 200px;
  overflow-y: auto;
  padding: .5rem;
  background: var(--c-lt-bg);
  border: 0;
  border-radius: 0.4875rem;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .55) !important;
}
.cmt-emj-panel button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.4875rem;
  background: transparent;
  cursor: pointer;
}
.cmt-emj-panel button:hover { background: var(--c-lt-block); }
.cmt-emj-panel img { width: 24px; height: 24px; object-fit: contain; }
.cmt-emj-panel .cmt-emj-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: .75rem;
  color: var(--c-lt-txt-3);
  padding: .25rem 0;
}
/* 正文中渲染的表情图片：与文字基线对齐、不换行挤压 */
.cmt-emj { display: inline-block; width: 24px; height: 24px; object-fit: contain; vertical-align: -0.2em; margin: 0 .05rem; }

/* ══�?统一动态加载态（列表懒加�?/ 查看更多 / 分页等共用）：转�?icon + 文案 ══�?   用法：容器占�? <div class="ld ld-block"><i class="ri-loader-4-line ld-spin"></i>加载中�?/div>
        按钮�?     <i class="ri-loader-4-line ld-spin"></i> */
.ld { display: inline-flex; align-items: center; gap: .4rem; color: var(--c-txt-3); }
/* 整块加载态。grid-column 兜住「列表容器是网格」的情况（如 .pf-card2-grid / .res-card-list）：
   否则它只占一个轨道宽度，在 2 列/3 列列表里会贴在左侧一列，看起来没居中 */
.ld-block { display: flex; justify-content: center; padding: 1.25rem 0; grid-column: 1 / -1; }
.ld-spin { animation: ld-rotate .8s linear infinite; }
@keyframes ld-rotate { to { transform: rotate(360deg); } }
/* 区域内加载遮罩（如资源组重排�?评论首载时）：半透明白底 + 转圈 icon + 文案 */
.ld-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: rgba(0, 0, 0, .55);   /* 区域内加载遮罩：深色主题下用半透明黑（原为半透明白） */
  color: var(--c-txt-3);
  font-size: .8rem;
  z-index: 5;
}
.res-group { position: relative; }
#comment-list { position: relative; display: grid; gap: .625rem; }
.res-loading { min-height: 4rem; } /* 配合内部 .ld-cover 覆盖层，空容器也能居中显�?loading /* 内联回复编辑器：更紧凑（无独立头像，缩进对齐） */
.cmt-replybox {
  margin-top: .5rem;
  padding-left: 0;
}

/* 顶层评论内的回复区：与主评论同一底色（不再是更亮的块），靠 1px 分隔线区分
   卡内分隔属功能性例外（同 .pf-card2-act.act2 的中缝），线色统一取 --c-divider */
.cmt-replies {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--c-divider);
}
.cmt-replies:empty { margin-top: 0; padding-top: 0; border-top: 0; }   /* 空容器不显示分隔线 */

/* 资源列表容器：无边框卡片列表 —— 与个人中心数据区列表卡片一致
   规律：层级靠底色深浅（页面 #000 → 卡片 #1a1a1a），元素之间用 .625rem 间距分隔，不用边框/分割线 */
.res-card-list {
  border: 0;
  border-radius: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* 用 minmax(0,1fr) 而非 1fr：窄屏下轨道不会被卡片内容撑破 */
  gap: .625rem;
}
.res-card-list > .res-card-wrap,
.res-card-list > div:not(.ld-cover) {
  background: var(--c-card);
  border: 0;
  border-radius: var(--r-card);
  margin-bottom: 0;
}
.res-card-list > .res-card-wrap + .res-card-wrap,
.res-card-list > div:not(.ld-cover) + div:not(.ld-cover) {
  border-top: 0;
}
.res-card-list > .res-card-wrap:hover,
.res-card-list > div:not(.ld-cover):hover {
  background-color: var(--c-hover-soft);   /* 卡片是大块元素，用更柔和的一档，避免整块跳亮 */
}
/* 「查看更多」按钮：与其他卡片同一圆角 */
.res-more-btn {
  border-radius: var(--r-card);
}

/* ══ 站内私信弹框（.dm-*，见 _footer.ejs + /js/dm.js）：720×580，上 2/3 会话 + 下 1/3 输入 ══ */
.dm-card { display: flex; flex-direction: column; overflow: hidden; }
/* 会话区：flex:2 与输入区 flex:1 = 2:1（约上 2/3 / 下 1/3），浅灰底 + 相对定位（供新消息提示球） */
.dm-chat {
  flex: 2 1 0;
  min-height: 0;
  overflow: hidden auto;              /* x 隐藏 / y 滚动 */
  position: relative;
  overscroll-behavior: contain;
}
/* 输入区：flex:1，顶部 1px 分隔线；白底内嵌可增长编辑区 + 底部操作行 */
.dm-zone {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--c-lt-bg);
  border-top: 0;
}
/* 可增长 contenteditable：占满操作行以上空间，随输入自然增高、超出内部滚动 */
.dm-ta {
  flex: 1 1 auto;
  min-height: 3rem;
  max-height: none;
  overflow: hidden auto;              /* x 隐藏 / y 滚动 */
  padding: .5rem .8rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--c-lt-txt);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: text;
  box-sizing: border-box;
  -webkit-user-modify: read-write-plaintext-only;   /* 粘贴只进纯文本，避免富文本污�?*/
}
/* 输入区顶部工具行：表情按钮放这里（输入框上方），表情面板向上展开时不会遮住输入内容 */
.dm-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  padding: .2rem .5rem 0;
}
.dm-toolbar .cmt-emoji {
  width: 1.75rem;
  height: 1.75rem;
}
.dm-ph {
  position: absolute;
  inset: .5rem .8rem auto .8rem;
  pointer-events: none;
  font-size: .9rem;
  color: #9ca3af;
  white-space: pre-wrap;
  overflow: hidden;
}
.dm-ops {
  display: flex;
  align-items: center;
  justify-content: flex-end;   /* 无表情按钮，计数 + 发送整体靠右 */
  gap: .35rem;
  flex: none;
  padding: .25rem .6rem .5rem;
}
.dm-count {
  font-size: 11px;
  color: var(--c-lt-txt-3);
  font-variant-numeric: tabular-nums;
}
.dm-count.over { color: #ef4444; }
/* 会话气泡：头像 40px；正文中的表情图适当放大一号 */
.dm-av { pointer-events: none; }
.dm-bub .cmt-emj { width: 24px; height: 24px; margin: 0 .06rem; }
/* 气泡：最小高 40px 与头像等高，单行内容垂直居中；带“指向自己头像”的三角箭头。
   统一内边距（.5rem 上下 .875rem 左右）：单/多行时文字距气泡边缘的间距一致，不因行数变窄 */
.dm-bub {
  min-height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: .5rem .875rem;
  box-sizing: border-box;
  /* 长串（网址等）必须换行：气泡是 flex 容器、文本成为匿名 flex 项，其 min-content 会把不可断的长词
     撑破 max-width；overflow-wrap:anywhere 参与 min-content 计算（break-word 不会），从根上避免冲出气泡 */
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* 三角箭头：用旋转 45° 的小方块贴合气泡边缘，尖端指向各自头像（无需依赖 border 朝向，永不错向） */
.dm-bub::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  box-sizing: border-box;
}
/* 对方（左侧白泡）：白底尾巴 + 两条外边描边（左、下棱经旋转后即箭头外侧），延续气泡描边 */
.dm-row.is-peer .dm-bub::before {
  left: -5px;
  top: 15px;                 /* 与 40px 头像垂直中心对齐 */
  background: var(--c-lt-bg);
  border-left: 0;
  border-bottom: 0;
  transform: rotate(45deg);
}
/* 我方（右侧蓝泡）：蓝色实心尾巴，与气泡同色（气泡无描边，无需补边） */
.dm-row.is-mine .dm-bub::before {
  right: -5px;
  top: 15px;
  background: var(--c-brand);
  transform: rotate(45deg);
}
.dm-row { animation: dmIn .16s ease-out; }
@keyframes dmIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* 日期胶囊 / 时间点 */
.dm-chip { display: flex; justify-content: center; margin: .5rem 0 .25rem; }
.dm-chip span {
  font-size: 11px;
  color: var(--c-lt-txt-2);
  background: rgba(148, 163, 184, .18);
  padding: .1rem .6rem;
  border-radius: 999px;
}
.dm-time { display: flex; justify-content: center; margin: .4rem 0 -.05rem; }
.dm-time span { font-size: 10px; color: var(--c-lt-txt-3); }
/* 「加载更早」按钮（会话顶部） */
.dm-older {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: .5rem auto .25rem;
  padding: .15rem .8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, .14);
  color: var(--c-lt-txt-2);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dm-older:hover { background: rgba(148, 163, 184, .26); color: var(--c-lt-txt); }
/* 「N 条新消息」提示球：贴会话区底部居中，滚动离开底部时出现 */
.dm-fresh {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 5;
  display: none;
  align-items: center;
  gap: .25rem;
  padding: .3rem .85rem;
  border: 0;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55);
}
.dm-fresh.show { display: inline-flex; }

/* ══ 白色浮层（.pop-light）内组件补丁 ═══════════════════════════════════════
   主题层的 .panel-inset / 页内共用类在浮层内仍是深色取值，这里按浅色覆盖；
   仅作用于带 .pop-light 的浮层，不影响页内深色组件（评论区 / 设置弹框等）。 */
.pop-light .panel-inset { background: var(--c-lt-surface) !important; }   /* 私信会话区 / 点赞列表 / 打卡弹框内嵌块 */
.pop-light .dm-zone { background: var(--c-lt-bg) !important; }            /* 私信输入区：白底（覆盖 .panel-inset） */
.pop-light .dm-row.is-mine .dm-bub { background: var(--c-brand) !important; color: #fff; }  /* 我方气泡：保持品牌色 */
.pop-light .modal-title { color: var(--c-lt-txt); }
.pop-light .modal-close { color: var(--c-lt-txt-3); }
.pop-light .modal-close:hover { background: var(--c-lt-block); color: var(--c-lt-txt-2); }
.pop-light .ck-toggle:not(.on) { background: var(--c-lt-line); }          /* 打卡弹框开关：浅色轨 */
.pop-light .ck-toggle span { background: var(--c-lt-bg); }                /* 开关滑块：白 */
.pop-light .cmt-emoji:hover { background: var(--c-lt-block); }            /* 私信工具行表情按钮 hover */

/* 移动端缩放控制（配合 viewport meta + _footer.ejs 的多点触控拦截，实现「点输入不放大 / 不手动缩放」）：
   · iOS Safari 在聚焦字号 <16px 的输入类控件时会整页放大 → 触屏设备字号提到 16px（自动放大阈值）；
   · touch-action: manipulation 禁「双击放大」，单指滚动不受影响；
   · 双指捏合由 viewport user-scalable=no + JS 拦截（新版 iOS 会忽略 meta，需 JS 兜底）。 */
@media (pointer: coarse) {
  input,
  select,
  textarea,
  [contenteditable='true'] {
    font-size: 16px;
  }
  /* 触屏上禁「双击放大」 */
  html,
  body {
    touch-action: manipulation;
  }
}

/* ══ 分享资源 / 编辑资源表单（#shareForm，见 add-resource.ejs）：控件恢复描边 ══
   全站表单默认无边框（靠底色区分层级）；本页需要明确的输入边界：
   默认深灰描边，聚焦与选中（radio / checkbox 卡片）用品牌色 */
#shareForm input:not([type="radio"]):not([type="checkbox"]),
#shareForm textarea,
#shareForm select {
  border: 1px solid var(--c-l5) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#shareForm input:not([type="radio"]):not([type="checkbox"]):focus,
#shareForm textarea:focus,
#shareForm select:focus {
  border-color: var(--c-brand) !important;
  box-shadow: 0 0 0 2px rgba(100, 48, 255, .25);   /* 品牌色 25% 的柔光环 */
  outline: none;
}
/* radio / checkbox 卡片（peer 结构，样式作用于其后的 span）：
   未选中 = 淡描边；选中 = 主题色实底 + 白字（单选 / 多选同款，不各靠各自的 Tailwind 色） */
#shareForm .peer ~ span { border-color: var(--c-divider) !important; }   /* 未选中：淡描边（与卡内分隔线同色） */
#shareForm .peer:checked ~ span {
  background: var(--c-brand) !important;
  border-color: var(--c-brand) !important;
  color: #fff !important;
}



