/* ============================================================
   desktop.css —— 布局 / 侧边栏 / 模块视图 / 切换过渡
   ============================================================ */

/* 像素字体：DotGothic16（Google Fonts 开源点阵字体，支持中文）
   只服务于蓝屏终端，其余页面仍用系统字体 */
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');

/* ---------- 窗口之外的桌面背景 ---------- */
/* 浅色网点矩阵：24px 一格，中心对齐。点很淡，只在窗口外那一圈露面，
   所以既要有质感，又不能把注意力从主视窗上拉走。 */
body {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(148, 163, 184, 0.3) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: center center;
  overflow: hidden;
  /* 搜索态切黑时桌面要「瞬间沉下去」，回来也一样，所以过渡写在基态上 */
  transition: background-color 0.4s ease;
}

/* ---------- 正文加粗（富文本 *文字* / **文字** 解析出的 strong） ----------
   浅色正文里用近黑；深色底容器改成 inherit，
   跟随容器自己的浅色文字，避免黑字糊在黑底上看不清。 */
strong {
  font-weight: bold;
  color: #1a1a1a;
}

.dn-page strong,
.theme-dark strong {
  color: inherit;
}

/* ============================================================
   组件内滚动条（统一极细条 · 6px）
   ------------------------------------------------------------
   只作用于应用窗口内部的滚动容器，html / body 的原生滚动条不受影响。
   common.css 里那套全局规则（8px / #3a3a3a）是给深色终端外壳用的，
   网页正文、资料库、写稿器这些浅色区域必须用类选择器覆盖，
   否则右侧会出现一条突兀的黑色长条。
   注：这里只用 ::-webkit-scrollbar 系列，不写 scrollbar-width /
       scrollbar-color —— Chromium 121+ 一旦收到这两个属性，
       会改回原生滚动条并忽略下面的 6px 与配色。
   ============================================================ */

:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* 轨道：透明，让容器自身的底色透出来 */
:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-track {
  background: transparent;
}

/* 滑块：浅灰圆角，悬停加深一档 */
:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-thumb:active {
  background: #64748b;
}

/* 去掉 Windows 传统滚动条两端的箭头与方格，只留一条干净的细线 */
:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

:is(.browser-content, .chat-log, .contact-list,
    .mail-form, .mail-list, .mail-reader, .mail-attach-body,
    .write-canvas, .library-body, .ld-scroll,
    .wbm-view, .wbm-snapshot-body)::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------- 右侧阅读区专用滚动条 ----------
   比通用那套再淡一档：极浅的灰、半透明，滚动时几乎不打断阅读。
   只覆盖 .browser-content，其余模块仍用上面的实心浅灰。 */
.browser-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.browser-content::-webkit-scrollbar-track {
  background: transparent;
}
.browser-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.browser-content::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.62);
}
.browser-content::-webkit-scrollbar-thumb:active {
  background: rgba(148, 163, 184, 0.78);
}
.browser-content::-webkit-scrollbar-button,
.browser-content::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* ---------- 整体布局：居中悬浮的应用窗口 ---------- */
/* 包含：左侧窄栏 + 联系人列表 + 主聊天区，看起来像一个独立软件窗口 */
#layout {
  position: absolute;
  z-index: 10;                   /* 必须高过 #bg-glow(1)，光晕才不会糊到窗口上 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 48px);
  max-width: 1100px;
  height: calc(100vh - 48px);
  max-height: 85vh;
  margin: 0 auto;
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.13),
    0 4px 12px rgba(15, 23, 42, 0.07),
    0 1px 3px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.4s ease;
}

/* ---------- 桌面光晕：跟着鼠标走的一盏很淡的灯 ----------
   只有一层 fixed 元素，没有 canvas、没有粒子节点：
     1) 紫色径向光晕（主体氛围）
     2) 同一张 24px 点阵的加深版，用 mask 只在光标周围显形
   —— 两层都居中在 --mouse-x / --mouse-y 上，mask 收边，
   所以看上去是「光标附近的网点被灯照出来」，而不是贴了一块紫色玻璃。
   pointer-events: none 保证它永远吃不到点击。 */
#bg-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;                    /* 鼠标没动过就不亮，避免正中一团常驻光斑 */
  transition: opacity 0.3s ease;
  background-image:
    radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(94, 63, 190, 0.15) 0%,
      rgba(94, 63, 190, 0.06) 55%,
      rgba(94, 63, 190, 0) 100%),
    radial-gradient(rgba(94, 63, 190, 0.42) 1.5px, transparent 1.5px);
  background-size: auto, 24px 24px;
  background-position: center center, center center;
  -webkit-mask-image: radial-gradient(circle 320px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: radial-gradient(circle 320px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
}
#bg-glow.is-on { opacity: 1; }

/* 搜索态整块桌面沉成纯黑，这盏紫灯留在上面会很跳，直接收掉 */
body.theme-search-dark #bg-glow { opacity: 0; }

/* ---------- 最左侧图标导航条（深紫，70px） ---------- */
#rail {
  width: 70px;
  flex: none;
  position: relative;
  background: #5e3fbe;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 图标组在竖直方向绝对居中 */
.rail-center {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* 底部安装状态徽标（与居中图标组分离） */
.rail-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
}
.rail-badge {
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.rail-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.18s ease, color 0.18s ease;
}
.rail-btn svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.rail-btn.active { background: rgba(255, 255, 255, 0.20); color: #fff; }
/* 选中态左侧白色小短条 */
.rail-btn.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: #fff;
}

/* 未读总红点：任意一通会话有没看到的消息就挂在聊天图标右上角。
   不自动切页之后，这是玩家在主界面看到「有人找我」的第一眼。 */
.rail-btn.has-unread::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0362c;
  box-shadow: 0 0 0 2px #5e3fbe;
}

/* ---------- 右侧主内容区 ---------- */
#main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* ---------- 悬浮窗口的小屏降级 ---------- */
@media (max-width: 980px) {
  #layout {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: 94vh;
  }
  #rail { width: 58px; }
  .rail-btn { width: 40px; height: 40px; border-radius: 11px; }
  .chat-contacts { width: 232px; }
  .chat-log { padding: 18px 16px; }
  .msg { max-width: 76%; }
  .mail-side { width: 200px; padding: 16px 10px; }
  .mail-list { width: 240px; }
  .mail-form { padding: 8px 20px 16px; }
  .mail-pane-head { padding: 18px 20px 12px; }
  .mail-reader { padding: 20px 22px 28px; }
  .mail-attach-body { padding: 20px 20px 28px; }
}
@media (max-height: 620px) {
  #layout { height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
}

/* 视图切换：淡入 + 轻微上移
   注意：非激活视图必须 visibility:hidden —— 只靠 pointer-events:none 不够，
   子元素（如 .wbm-view.active）会把指针事件重新打开，导致隐形图层拦截点击。 */
.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.view.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* 非激活视图里的任何节点都不许吃鼠标事件。
   ------------------------------------------------------------
   子元素可以自己写 visibility:visible + pointer-events:auto（时光机的
   .wbm-view.active 正是这么写的），父级那两条声明挡不住它们：整块隐形
   页面会盖在聊天页下半屏上，明明看得见「发送：…」按钮却点不动。
   这条兜底一次性封死所有视图，别再靠每个模块自己自觉。 */
.view:not(.active),
.view:not(.active) * {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---------- 默认桌面 ---------- */
.home-bg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(59,130,246,0.08), transparent 60%),
    var(--bg);
}
.home-hint { text-align: center; }
.home-icon svg {
  width: 44px; height: 44px;
  stroke: var(--text-faint);
  fill: none; stroke-width: 1.5;
  stroke-linecap: round;
  margin-bottom: 16px;
}
.home-hint h2 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.home-hint p { font-size: 13px; color: var(--text-faint); }

/* ---------- 占位模块 ---------- */
.ph-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  text-align: center;
}
.ph-icon svg {
  width: 40px; height: 40px;
  stroke: var(--text-faint);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  margin-bottom: 6px;
}
.ph-wrap h2 { font-size: 17px; font-weight: 600; color: var(--text); }
.ph-wrap p { font-size: 13px; color: var(--text-faint); }

/* ---------- 模块通用 ---------- */
.module {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---------- 实时通讯（浅色三栏：导航条 + 联系人 + 聊天区） ---------- */
/* 窗口的圆角与阴影由 #layout 统一承担，这里只需铺满内部 */
#view-chat {
  padding: 0;
  background: #ffffff;
}
.chat-shell {
  height: 100%;
  display: flex;
  background: #ffffff;
  overflow: hidden;
}

/* —— 联系人列表区 —— */
.chat-contacts {
  width: 300px;
  flex: none;
  position: relative;
  z-index: 2;
  background: #fafafc;
  border-right: 1px solid #ececf3;
  display: flex;
  flex-direction: column;
}
.contacts-head { flex: none; padding: 20px 18px 12px; }
.contacts-head h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #171a21;
  margin-bottom: 12px;
}
.contacts-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f2f7;
  border-radius: 10px;
  padding: 0 12px;
}
.contacts-search svg {
  width: 15px; height: 15px;
  stroke: #9aa0ad;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex: none;
}
.contacts-search input {
  flex: 1;
  background: none;
  border: none;
  border-radius: 0;
  padding: 9px 0;
  font-size: 13px;
  color: #23262e;
}
.contacts-search input:focus { background: none; border: none; }

.contact-list { flex: 1; overflow-y: auto; padding: 6px 8px 12px; position: relative; z-index: 1; }
.contact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.16s ease;
}
/* 行内子元素不吃点击：命中永远落在 .contact 上，点击事件绝不会被吞 */
.contact > * { pointer-events: none; }
.contact:hover { background: #f2edff; }
.contact.active { background: #ece4ff; }
.contact[hidden] { display: none; }
.contact:focus-visible {
  outline: 2px solid #b9a8ea;
  outline-offset: -2px;
}

.avatar {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  background: #e6ddff;
  color: #4b2fa8;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 600;
}
.contact[data-contact="colleague"] .avatar { background: #dcecff; color: #1f5fa8; }

/* 头像里的真人照片：铺满圆框，靠 object-fit 裁成正方形再被圆角切圆。
   尺寸不写死 —— 联系人行是 40px、聊天头是 34px、窄屏还会缩到 30px，
   全交给父级 .avatar 定，图只负责填满它。
   display:block 是为了去掉 inline 图片自带的那点基线空隙，
   否则圆框底部会露出一条一像素的底色。 */
.avatar img,
#chatHeadAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

/* 「？？？」：通关普通结局之后才会出现的第三个人。
   他要的不是照片，是一块擦不掉的黑 —— 连首字母也一起隐形。
   底色强制纯黑（盖掉上面 .avatar 的紫、也盖掉本类原本的 #1b1a20），
   color:transparent 让兜底的那个「？」看不见，但仍在 DOM 里：
   万一哪天 CSS 没加载，玩家看到的还是一个问号头像，不会变成空框。
   1px 暗边是为了不让它在深色背景上整块糊掉；用 border-box 抵掉边框的
   2px，圆的外径仍然是 40 / 34，跟其它头像一模一样大。 */
.contact[data-contact="shadow"] .avatar,
#chatHeadAvatar[data-contact="shadow"] {
  background: #000000 !important;
  color: transparent !important;
  border: 1px solid #333333;
  box-sizing: border-box;
}

.c-info { flex: 1; min-width: 0; }
.c-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.c-top b { font-size: 13.5px; font-weight: 600; color: #171a21; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-top time { flex: none; font-size: 12px; color: #9aa0ad; }

/* 未读小红点：有新的老板 / 小李发言时挂在联系人行右侧 */
.c-top .c-unread {
  flex: none;
  width: 7px;
  height: 7px;
  align-self: center;
  border-radius: 50%;
  background: #e0362c;
}
.c-info small {
  display: block;
  min-height: 16px;          /* 还没聊过的人没有摘要，行高也要一致 */
  margin-top: 2px;
  font-size: 12px;
  color: #8b909c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact.active .c-info small { color: #6b5aa8; }
/* 未读会话：预览文字提一档，配合小圆点，一眼能扫出是谁在找 */
.contact.unread .c-info small { color: #565e6f; }

/* —— 主聊天区 —— */
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.chat-head {
  flex: none;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #f0f1f5;
}
.chat-head .avatar { width: 34px; height: 34px; font-size: 13px; }
.chat-head-info b { display: block; font-size: 14px; font-weight: 600; color: #171a21; }
.chat-head-info small { font-size: 12.5px; color: #9aa0ad; }
.chat-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  margin-right: 4px;
  vertical-align: 1px;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
}
/* 切换联系人时的淡入 */
.chat-log.swap-in { animation: logIn 0.18s ease both; }
@keyframes logIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.msg {
  max-width: 60%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
}
.msg.them {
  align-self: flex-start;
  background: #f1f2f6;
  color: #2b2f38;
  border-radius: 14px 14px 14px 4px;
}
.msg.me {
  align-self: flex-end;
  background: #e9e2ff;
  color: #2a1f4d;
  border-radius: 14px 14px 4px 14px;
}
.msg.system {
  align-self: center;
  max-width: 84%;
  padding: 6px 12px;
  background: #f6f6fa;
  color: #8b909c;
  font-size: 12.5px;
  text-align: center;
  border-radius: 8px;
}

.chat-input {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #f0f1f5;
  background: #fff;
}
.chat-input input {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  background: #fafafc;
  font-size: 13.5px;
  color: #23262e;
}
.chat-input input::placeholder { color: #a6acb8; }
.chat-input input:focus { border-color: #c7b6f2; background: #fff; }
.chat-input button {
  padding: 0 20px;
  border-radius: 12px;
  background: #5e3fbe;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease;
}
.chat-input button:hover { background: #6d4dd4; }

/* ============================================================
   发送闸门
   —— 轮到玩家时，输入框整行被这条大按钮替换，按钮上就是要发的话
   ============================================================ */
.chat-gate {
  flex: none;
  padding: 12px 20px 14px;
  border-top: 1px solid #f0f1f5;
  background: #fff;
}
.chat-gate[hidden] { display: none; }

.chat-gate-btn {
  position: relative;
  z-index: 1;                 /* 永远压在聊天区之上，不会被同层节点盖住 */
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid #cbb8ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f4ff 0%, #efe7ff 100%);
  color: #3a2470;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;            /* 明确的可点击光标 */
  box-shadow: 0 1px 0 rgba(94, 63, 190, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease,
              box-shadow 0.16s ease, transform 0.12s ease;
}
.chat-gate-btn:hover {
  background: linear-gradient(180deg, #efe4ff 0%, #dccdff 100%);
  border-color: #9a79f0;
  box-shadow: 0 4px 16px rgba(94, 63, 190, 0.22);
}
.chat-gate-btn:active {
  background: linear-gradient(180deg, #e6d8ff 0%, #d2bfff 100%);
  transform: translateY(1px);
}
.chat-gate-btn:focus-visible { outline: 2px solid #8b6ae0; outline-offset: 2px; }

/* 输入框行：玩家不能自由打字，常年禁用；轮到发言时被上面那条按钮顶掉 */
.chat-input[hidden] { display: none; }
.chat-input input:disabled,
.chat-input button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chat-input button:disabled { background: #bdb3d6; }

/* 每条新气泡轻微上浮，配合 1s 的逐条节奏 */
.msg { animation: msgIn 0.22s ease both; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* 浅色界面的可点击链接 */
#view-chat .chat-link { color: #5e3fbe; }
#view-chat .chat-link:hover { color: #7348d9; }

/* 小李发来的插件安装链接：蓝色 + 下划线，一眼看出可点 */
#view-chat .chat-link.install-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
#view-chat .chat-link.install-link:hover { color: #1d4ed8; }
#view-chat .chat-link.installed.install-link { color: #14a06a; text-decoration: none; }

/* 聊天里不再有可点击的线索词：正文一律普通文本 */

/* ============================================================
   收件箱模块（独立邮件客户端：导航条 + 邮件目录 + 阅读区）
   —— 全部限定在 #view-mail 内，与聊天模块互不影响
   ============================================================ */

#view-mail { padding: 0; background: #fff; }
.mail-shell {
  height: 100%;
  display: flex;
  overflow: hidden;
  background: #fff;
}

/* ---------- 中间栏：发邮件 / 收件箱 / 查看附件 ---------- */
.mail-side {
  width: 232px;
  flex: none;
  background: #fafafc;
  border-right: 1px solid #ececf3;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
.mail-side-head { padding: 0 6px 16px; }
.mail-side-head h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #171a21;
}
.mail-side-head p { margin-top: 5px; font-size: 12.5px; color: #9aa0ad; }

.mail-nav { display: flex; flex-direction: column; gap: 4px; }
.mail-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  color: #3a3f4a;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.mail-nav-item:hover { background: #f2edff; color: #4b2fa8; }
.mail-nav-item.active {
  background: #5e3fbe;
  color: #fff;
  box-shadow: 0 6px 16px rgba(94, 63, 190, 0.26);
}
.mn-ico {
  width: 17px; height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}
.mn-label { flex: 1; }

/* 未读红点 */
.mail-dot {
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 2px #fafafc;
}
.mail-nav-item.active .mail-dot { box-shadow: 0 0 0 2px #5e3fbe; }

/* 附件数量角标 */
.mail-count {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #efe9ff;
  color: #5e3fbe;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.mail-nav-item.active .mail-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- 右侧主区域 ---------- */
.mail-main {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.mail-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.mail-pane.active { display: flex; }

.mail-pane-head {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 32px 14px;
  border-bottom: 1px solid #f0f1f5;
}
.mail-pane-head h3 { font-size: 18px; font-weight: 700; color: #171a21; }
.mail-from { font-size: 13px; color: #9aa0ad; }

/* ---------- ① 写邮件 ---------- */
.mail-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 32px 20px;
  overflow-y: auto;
}

.mail-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid #f2f3f7;
}
.mail-field > span {
  width: 54px;
  flex: none;
  font-size: 14px;
  color: #8b909c;
}
.mail-field input,
.mail-field textarea {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid #e2e5ee;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: #23262e;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.mail-field input::placeholder,
.mail-field textarea::placeholder { color: #aeb4c0; }
.mail-field input:hover,
.mail-field textarea:hover { border-color: #d3d8e4; }
.mail-field input:focus,
.mail-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.mail-field-body {
  flex: 1;
  align-items: stretch;
  border-bottom: none;
  padding-top: 16px;
}
.mail-field-body > span { padding-top: 11px; }
.mail-field-body textarea {
  flex: 1;
  min-height: 180px;
  resize: none;
  line-height: 1.85;
}

.mail-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid #f0f1f5;
}
.mail-hint { flex: 1; font-size: 12.5px; color: #d14343; }
.mail-send {
  padding: 13px 30px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.mail-send:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.mail-send:active { transform: translateY(1px); }

/* ---------- ② 收件箱：列表 + 阅读区 ---------- */
.mail-inbox { flex: 1; min-height: 0; display: flex; }

.mail-list {
  width: 300px;
  flex: none;
  padding: 10px;
  overflow-y: auto;
  background: #fcfcfe;
  border-right: 1px solid #f0f1f5;
}
.mail-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.mail-item:hover { border-color: #ddd3f7; box-shadow: 0 6px 16px rgba(94, 63, 190, 0.1); }
.mail-item.unread { background: #faf7ff; border-color: #ece4ff; }
.mi-ava {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: #e6ddff;
  color: #4b2fa8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.mi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mi-text b { font-size: 12.5px; font-weight: 600; color: #171a21; }
.mi-subject {
  font-size: 13px;
  font-weight: 500;
  color: #23262e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mi-text small {
  font-size: 12.5px;
  color: #9aa0ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mi-time { flex: none; font-size: 12px; color: #b0b5c0; }
.mail-item.unread .mi-subject { font-weight: 700; }

.mail-reader {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 26px 36px 36px;
}
.letter { max-width: 660px; }
.letter-subject {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #14161c;
}
.letter-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 16px 0 22px;
  padding: 14px 16px;
  background: #fafafc;
  border: 1px solid #f0f1f5;
  border-radius: 10px;
}
.lm-row { display: flex; gap: 12px; font-size: 12.5px; }
.lm-row span { width: 48px; flex: none; color: #9aa0ad; }
.lm-row b { font-weight: 500; color: #3a3f4a; word-break: break-all; }
.letter-body { font-size: 14px; line-height: 1.95; color: #2b2f38; }
.letter-body p { margin-bottom: 14px; }
.letter-body p:last-child { margin-bottom: 0; }
.letter-attach-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px dashed #d9cdf7;
  border-radius: 10px;
  background: #f6f3ff;
  font-size: 12.5px;
  color: #5a4b93;
}
.letter-attach-tip svg {
  width: 15px; height: 15px;
  flex: none;
  fill: none;
  stroke: #7a63c9;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 正文右下角：下载附件 ---------- */
.letter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.attach-download {
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid #5e3fbe;
  border-radius: 10px;
  background: #5e3fbe;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}
.attach-download:hover {
  background: #4b2fa8;
  border-color: #4b2fa8;
  box-shadow: 0 8px 20px rgba(94, 63, 190, 0.24);
}
.attach-download:active { transform: translateY(1px); }
.attach-download:focus-visible { outline: 2px solid #b9a8ea; outline-offset: 2px; }
/* 已下载：置灰、不可点（写在 hover 之后，保证覆盖） */
.attach-download:disabled,
.attach-download.is-done {
  background: #f2f3f7;
  border-color: #e6e8ef;
  color: #a3a9b5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* ---------- 空状态 ---------- */
.mail-empty,
.mail-reader-empty {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  text-align: center;
}
.mail-empty svg,
.mail-reader-empty svg {
  width: 34px; height: 34px;
  fill: none;
  stroke: #c8ccd6;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mail-empty b,
.mail-reader-empty b { font-size: 13.5px; font-weight: 600; color: #5a606d; }
.mail-empty span,
.mail-reader-empty span {
  max-width: 280px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #a3a9b5;
}

/* ---------- ③ 查看附件 ----------
   列表不再自己滚：整页只有 .mail-attach-scroll 一条纵向滚动条。
   预览块（.attach-drawer）是插在卡片之间的子元素，和列表同处一个滚动流。 */
.mail-attach-body {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 32px 10px;
  overflow: visible;
}
.attach-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.attach-card:hover {
  border-color: #b9a8ea;
  box-shadow: 0 10px 24px rgba(94, 63, 190, 0.14);
  transform: translateY(-1px);
}
.attach-card:focus-visible { outline: 2px solid #b9a8ea; outline-offset: 2px; }
.attach-thumb {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 10px;
  background: #efe9ff;
  color: #5e3fbe;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attach-thumb svg { width: 18px; height: 18px; fill: currentColor; }
/* 图片附件的缩略图标用暖色，与两段录像区分开；线性图标改成描边 */
.attach-thumb.is-image { background: #fdeef4; color: #c2185b; }
.attach-thumb.is-image svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.attach-info { flex: 1; min-width: 0; }
.attach-info b { display: block; font-size: 13.5px; font-weight: 600; color: #171a21; }
.attach-info small { font-size: 12.5px; color: #9aa0ad; }
.attach-open { flex: none; font-size: 12.5px; font-weight: 600; color: #5e3fbe; }
.attach-note { margin-top: 14px; font-size: 12px; color: #9aa0ad; }

/* ---------- ④ 附件预览：内嵌 dilidili 视频页 ----------
   视频页本身是给浏览器用的（依赖 #browser-content-area 的 16px 内边距补偿），
   这里单独补一套：铺满阅读区、不留负边距、导航右侧不再给星标让位。 */
.mail-video-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #fff;
}
.mail-video-body > .bili-page {
  min-height: 100%;
  background: #ffffff;
  color: #18191c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mail-video-body > .bili-page .bili-nav-inner { padding: 0 20px; }
.mail-video-body > .bili-page .bili-main { padding: 16px 20px 32px; }
/* 邮件里的这页没有全局收藏星标，头像不必再让出那条通道，贴着右边即可 */
.mail-video-body > .bili-page .bili-user { margin-right: 0; }

/* 自动抓取录像的播放页：黑底、居中、只用浏览器原生控制条 */
.mail-player {
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
  background: #0d0d10;
  color: #ffffff;
  text-align: center;
}
.mail-player-tag {
  margin: 0;
  font-size: 13px;
  letter-spacing: 2px;
  color: #8b8b93;
  text-transform: uppercase;
}
.mail-player video {
  width: 100%;
  max-width: 800px;
  max-height: 100%;              /* 矮屏（手机横屏）不要把整页顶出滚动条 */
  margin: 0 auto;
  display: block;
  object-fit: contain;           /* 等比装进框里，宁可留黑边也不裁画面 */
  background: #000000;
  border-radius: 2px;
}
.mail-player-name {
  margin: 0;
  font-size: 12px;
  color: #8b8b93;
}

/* 图片附件：黑底居中，等比缩放，不裁切 */
.mail-image-wrap {
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #0d0d10;
}
.mail-image-frame {
  margin: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mail-image {
  display: block;
  max-width: min(640px, 100%);
  max-height: 62vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.mail-image-frame figcaption {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #8b8b93;
}


/* ---------- 发送中提示 ---------- */
.mail-toast {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(23, 26, 33, 0.92);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.22);
  z-index: 6;
  animation: toastIn 0.18s ease;
}
@keyframes toastIn {
  from { transform: translate(-50%, 8px); }
  to   { transform: translate(-50%, 0); }
}

/* ---------- “对方正在输入” ---------- */
.msg.typing { display: flex; align-items: center; gap: 4px; padding: 15px 16px; }
.msg.typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #c2c6d2;
  animation: typingDot 1.1s infinite;
}
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

/* ---------- 资讯浏览器 ---------- */
.browser-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  /* 与内容区同底色，只留一条极细的深色分割线：搜索栏和结果区读成一整块 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}
.addr-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  transition: border-color var(--transition);
}
.addr-wrap:focus-within { border-color: var(--accent); }
.addr-wrap svg {
  width: 15px; height: 15px;
  stroke: #7d8590;
  fill: none; stroke-width: 2; stroke-linecap: round;
  flex: none;
  transition: stroke var(--transition);
}
.addr-wrap:focus-within svg { stroke: #a99bf0; }
.addr-wrap input {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
}
/* 浏览器内容区：纵向独立滚动，横向永不出现滚动条
   （正文再长也只滚这一块，导航栏与窗口外壳保持不动） */
.browser-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
}

/* ---------- 复古录像播放器占位 ---------- */
.video-player { max-width: 560px; margin: 0 auto; }
.vp-screen {
  height: 240px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  /* 扫描线质感 */
}
.vp-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.vp-screen p { color: #555; font-size: 13px; }
.vp-play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  transition: transform 0.15s, background var(--transition);
}
.vp-play:hover { background: var(--accent-hover); transform: scale(1.06); }
.vp-playing, .vp-frozen { color: #bbb; font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.vp-snow { color: #666; font-size: 13px; letter-spacing: 3px; }
.vp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.btn-ghost {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.vp-solved { font-size: 12px; color: #4ade80; }
.vp-hint { margin-top: 12px; font-size: 13px; color: var(--text-dim); line-height: 1.8; }

/* ---------- 弹窗（结局 / 提示） ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; } }
.modal-card {
  width: min(420px, 90vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  text-align: center;
}
.modal-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.modal-card p { font-size: 14px; line-height: 1.9; color: var(--text-dim); margin-bottom: 22px; }
.modal-card .accent-btn { min-width: 120px; }

/* ---------- 可点击链接 / 关键词（悬停手型） ---------- */
.chat-link, .kw-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  transition: color var(--transition);
}
.chat-link:hover, .kw-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 浏览器文章 ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 4px;
}
.article-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--text);
}
.article-body {
  font-size: 14px;
  line-height: 2;
  color: var(--text-dim);
}
.article-body .kw-link { color: var(--accent); }
.article-meta {
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 16px;
}

/* ============================================================
   搜索结果列表页（sr-page）—— 现代搜索引擎质感
   ------------------------------------------------------------
   800px 居中一条流：统计行（右端放内联星标）→ 结果卡片，到底就结束。
   卡片是「网址 / 蓝色标题 / 摘要」三段式，摘要里命中的搜索词加粗提亮；
   1px 描边 + 极暗的半透明底，让卡片轮廓在深色背景上清晰可辨，
   悬停只微亮一档，不做按钮感。
   ============================================================ */

.sr-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 2px 64px;
}

/* ---------- 统计行：找到 N 条结果（用时 x 秒）+ 星标位 ---------- */
.sr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  margin-bottom: 14px;
  padding: 0 2px;
}
.sr-stats {
  font-size: 13.5px;
  line-height: 1.5;
  color: #6b7280;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.sr-starslot {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

/* ---------- 结果卡片 ---------- */
.sr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sr-item {
  padding: 16px 18px 17px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.sr-item.is-clickable { cursor: pointer; }
.sr-item.is-clickable:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.sr-item:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.45);
  outline-offset: 2px;
}

/* 第一行：模拟网址（域名亮一点，路径暗一点） */
.sr-url {
  display: flex;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
}
.sr-url .sr-site {
  flex: none;
  color: #5f6368;
}
.sr-url .sr-path {
  min-width: 0;
  color: #9aa0a6;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 第二行：标题 */
.sr-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  color: #111827;
  overflow-wrap: break-word;
  transition: color 0.18s ease;
}
.sr-item.is-clickable:hover .sr-title {
  color: #1a73e8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* 第三行：摘要 */
.sr-snippet {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.78;
  color: #4b5563;
  overflow-wrap: break-word;
}
.sr-snippet + .sr-snippet { margin-top: 3px; }

/* 命中的搜索词：加粗 + 压暗，不加底色，避免把摘要切碎 */
.sr-hl {
  font-weight: 700;
  color: #111827;
}

/* 失效条目（保留给其他 dead 结果）：标题与域名压暗一档 */
.sr-item.is-dead .sr-title { color: #9ca3af; }
.sr-item.is-dead .sr-url .sr-site { color: #9ca3af; }

/* ---------- 加密档案条（data-locked="robert"）：一块血红方砖 ----------
   未解锁时这里一个字的正文信息都不给：没有域名（sealed 本身就是线索）、
   没有标题、没有摘要，只有一把锁和「访问受限 · 绝密档案」。
   高度与普通结果条（网址 + 标题 + 一行摘要 ≈ 122px）对齐，
   所以它夹在两条正常结果中间时，整列不会错位。 */
.sr-item.is-red-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 122px;
  border: 1px solid #ff3333;
  border-radius: 12px;
  background: #990000;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.sr-item.is-red-locked:hover {
  background: #b30000;
  border-color: #ff5555;
  box-shadow: 0 0 0 1px rgba(255, 51, 51, 0.32), 0 8px 20px rgba(153, 0, 0, 0.34);
}
.sr-item.is-red-locked:active { background: #8a0000; }
.sr-item.is-red-locked:focus-visible {
  outline: 2px solid #ff5555;
  outline-offset: 2px;
}

.sr-item.is-red-locked .lock-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-align: center;
  user-select: none;
}
.sr-item.is-red-locked .lock-glyph {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
  filter: saturate(0.9);
}
.sr-item.is-red-locked .lock-text { white-space: nowrap; }

@media (max-width: 640px) {
  .sr-item.is-red-locked { min-height: 104px; }
  .sr-item.is-red-locked .lock-box { font-size: 13.5px; letter-spacing: 0.1em; gap: 8px; }
  .sr-item.is-red-locked .lock-glyph { font-size: 16px; }
}

/* 折叠条目：只有一行灰字，没有网址、摘要、星标位与任何点击语义。
   虚线灰框表示「这里本该有一条结果」；pointer-events:none 让它连
   hover / 焦点都拿不到，玩家点上去什么都不会发生。 */
.sr-folded {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 16px 18px;
  border: 1px dashed #dfe3e8;
  border-radius: 12px;
  background: #fafafa;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 2px;
  text-indent: 2px;                 /* 抵消末字后的字距，视觉居中 */
  cursor: default;
  pointer-events: none;
  user-select: none;
}

/* ---------- 空结果 ---------- */
.sr-empty {
  margin-top: 2px;
  padding: 26px 22px 28px;
  border: 1px dashed #dfe3e8;
  border-radius: 12px;
  background: #fafafa;
}
.sr-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}
.sr-empty-text {
  max-width: 620px;
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #6b7280;
}

/* 窄窗口：收一点内边距，卡片不要贴边 */
@media (max-width: 980px) {
  .sr-page { padding-bottom: 48px; }
  .sr-item { padding: 15px 16px 16px; }
  .sr-title { font-size: 17px; }
}
@media (max-width: 780px) {
  .sr-item { padding: 14px 14px 15px; }
}

/* ---------- 详情页里仍在用的旧行样式 ---------- */
.result-url { font-size: 12px; color: #6ea8fe; margin: 4px 0 6px; }
.result-desc { font-size: 13px; line-height: 1.8; color: var(--text-dim); }
.result-meta {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.result-dead h3 { color: var(--text-faint); }
.result-dead .result-url { color: #8a6a6a; }

/* ---------- 正文里不再有可点击的线索词（改为玩家手动输入搜索） ---------- */

/* ---------- 返回链接 ---------- */
.back-link {
  font-size: 13px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); text-decoration: underline; }

/* ---------- 全局「返回搜索结果」按钮 ----------
   全站只有这一个返回组件：正文页 / 百科 / IMDb / 404 / 论坛帖底部
   都挂在页面最下方正中，白底胶囊 + 极淡描边 + 轻阴影。
   深色页面（IMDb、暗网）在各自的选择器里覆盖颜色，不动这里。 */
.global-page-back {
  width: 100%;
  text-align: center;
  padding: 40px 0;
  display: flex;
  justify-content: center;
}
.global-page-back .back-link {
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.global-page-back .back-link:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

/* 深色页面：IMDb 的返回按钮换成炭黑胶囊 */
/* 手机横屏：上下留白收一半，别把按钮顶到看不见的地方 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .global-page-back { padding: 26px 0; }
}

/* ---------- 视频站简介 ---------- */
.vp-desc {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-faint);
}

/* ---------- 详情页（词条 / 帖子 / 视频站） ---------- */
.page-detail { max-width: 720px; margin: 0 auto; padding: 4px; }
.page-detail h3 { font-size: 17px; font-weight: 700; line-height: 1.5; }
.page-note {
  margin: 16px 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
  color: var(--text-faint);
}
.back-row { margin-top: 20px; font-size: 13px; }

/* ============================================================
   论坛长文（forum-thread）—— 微信公众号式深度阅读排版
   ------------------------------------------------------------
   整页纯白通栏，不再是「浮在深色外壳上的白卡片」：
     .article-page   宽 100% / 高 100% / 内外边距全 0，白底一路铺到内容区边缘
     .article-page > *  只有内容被收进 800px 的阅读列，白底不受影响
   规则全部锁在 .article-page 里 —— 页面里同名的 .article-title /
   .article-body 是深色详情页用的另一套，不能被这里串味。
   ============================================================ */

/* 底色铺满整个内容区：连 .browser-content 自带的 16px 内边距一起刷上。
   与 .cnn-news-page 用的是同一手法，:has 只在长文页到场时生效，
   滚到底也不会露出上下那两条深色。
   长文页现在只有「论坛帖 / 求助帖」这一类，全部挂 is-forum，
   所以这里直接给复古米黄；纯白留在 .cnn-news-page 那边。 */
.browser-content:has(> .article-page.is-forum) {
  background: #f9f5eb;
}

.article-page {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #3a3a3a;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

/* ---------- 阅读列：只有内容受 800px 约束，白底照样 100% 铺满 ---------- */
.article-page > .article-title,
.article-page > .article-meta,
.article-page > .article-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 56px;
  padding-right: 56px;
}

/* 互动栏的分隔线要和正文左右对齐：800 - 56×2 = 688 */
/* ---------- 求助帖的楼层回复：独立容器，与主楼正文明确断开 ---------- */
.article-page > .article-replies {
  box-sizing: border-box;
  width: 100%;
  max-width: 800px;
  margin: 40px auto 0;
  padding: 22px 56px 34px;
  border-top: 3px double #d8dce2;
  background: #fafafa;
  background-clip: padding-box;
}
.article-page .ar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 11px 20px 11px 22px;
  border-top: 0;
  border-radius: 3px;
  background: #23272e;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #ffffff;
}
.article-page .ar-head b { font-weight: 700; }
.article-page .ar-head span {
  font-size: 13.5px;
  font-weight: 400;
  color: #9aa4b0;
}
.article-page .ar-floor {
  margin: 0;
  padding: 14px 0 14px 20px;
  border-left: 2px solid #e5e7eb;
  border-bottom: 1px solid #eef0f2;
  font-size: 15px;
  line-height: 1.85;
  color: #3a3a3a;
}
.article-page .ar-floor b {
  margin-right: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #9aa0a6;
}
.article-page .ar-floor.is-op {
  padding-left: 20px;
  padding-right: 14px;
  border-left-color: #b9a6f2;
  border-radius: 0 3px 3px 0;
  background: #f4f1fd;
  color: #5b6270;
}
.article-page .ar-floor.is-op b { color: #5e3fbe; }
.article-page .ar-floor:last-child { border-bottom: 0; }

.article-page > .article-foot {
  box-sizing: border-box;
  width: 100%;
  max-width: 688px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 34px;
}

/* ---------- 大标题 ---------- */
.article-page .article-title {
  margin-bottom: 18px;
  padding-top: 46px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.2px;
  color: #1a1a1a;
}

/* ---------- 元信息：一行浅灰小字，靠间距拉开 ---------- */
.article-page .article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1;
  color: #9aa0a6;
  letter-spacing: 0.3px;
}
.article-page .article-tag {
  padding: 2px 5px;
  border: 1px solid #ebedf0;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: #b3b9c1;
  letter-spacing: 1px;
}

/* ---------- 正文：大字号、1.8 倍行距、无首行缩进 ---------- */
.article-page .article-content p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.8;
  color: #3a3a3a;
  text-indent: 0;
  text-align: left;
}
.article-page .article-content p:last-child { margin-bottom: 0; }

/* 编辑记录：正文末尾的浅灰小字，不抢戏 */
.article-page .article-content .article-note {
  margin-top: 26px;
  font-size: 14px;
  line-height: 1.75;
  color: #a3a8ae;
}

/* ---------- 正文中的视频占位块 ---------- */
.article-page .article-video {
  margin: 30px 0 32px;
  padding: 10px;
  background: #f2f3f5;
  border-radius: 8px;
}
.article-page .av-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 冷灰渐变 + 中央提亮 + 四角压暗，模拟一帧褪色、过曝的老录像画面 */
  background:
    radial-gradient(112% 80% at 50% 42%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 62%),
    radial-gradient(140% 122% at 50% 50%, rgba(0,0,0,0) 34%, rgba(0,0,0,.16) 100%),
    linear-gradient(150deg, #aeb9c4 0%, #d6dbe2 48%, #b8c2cc 100%);
}
/* 极淡的扫描线，只为“这是盘老带子”的质感，不做动效 */
.article-page .av-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
    rgba(255,255,255,.14) 0 1px, rgba(255,255,255,0) 1px 3px);
  pointer-events: none;
}
.article-page .av-play {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  padding-left: 2px;
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-page .av-duration {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 1;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(0,0,0,.42);
  color: rgba(255,255,255,.94);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.article-page .av-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 6px 5px;
}
.article-page .av-title {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  color: #2b2b2b;
}
.article-page .av-meta {
  flex: none;
  font-size: 12px;
  color: #9aa0a6;
}

/* ---------- 底部互动栏：左作者，右四个灰色图标 + 数字 ---------- */
.article-page .article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid #f0f1f3;
}
.article-page .article-author-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.article-page .article-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f1f3;
  color: #a2a8af;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-page .article-nick {
  font-size: 14px;
  color: #595f66;
  white-space: nowrap;
}
.article-page .article-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
}
/* 纯展示：不设 cursor，也没有任何 hover 反馈 */
.article-page .article-act {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #b6bcc3;
  font-variant-numeric: tabular-nums;
}
.article-page .article-act svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 文末的返回链接：已统一到 .global-page-back ---------- */

/* ============================================================
   复古论坛皮：求助帖 / 老论坛长文（.article-page.is-forum）
   ------------------------------------------------------------
   与纯白现代的 .cnn-news-page 彻底切开：
     米黄纸张 + 宋体正文 + 虚线元信息 + 深褐版块头 + 点状楼层分隔。
   所有规则都带 .is-forum 前缀，通用 .article-page 规则一条没改，
   所以新闻页、Lost Media 长文仍然是原本的白纸排版。
   选择器权重统一为 (0,3,x)，压得过下面的 @media 覆盖，
   但标题字号刻意不写 —— 让窄屏断点继续按自己的尺寸收。
   ============================================================ */

/* ---------- 纸 ---------- */
.article-page.is-forum {
  background-color: #fcf8ee;
  color: #3e3326;
  font-family: "SimSun", "Songti SC", "STSong", "NSimSun", serif;
  /* 宋体开抗锯齿会发虚、笔画发灰，关掉更像屏幕上的老字 */
  -webkit-font-smoothing: auto;
}

/* ---------- 标题：加粗、更深的墨色 ---------- */
.article-page.is-forum .article-title {
  font-weight: 700;
  letter-spacing: 0;
  color: #2b2118;
}

/* ---------- 元信息：上下两道虚线，像旧帖子里那条「作者 / 时间 / 来自」横栏 ---------- */
.article-page.is-forum .article-meta {
  gap: 12px;
  padding: 9px 0;
  border-top: 1px dashed #d5cbb4;
  border-bottom: 1px dashed #d5cbb4;
  font-size: 13.5px;
  letter-spacing: 0;
  color: #8c7b5e;
}
.article-page.is-forum .article-tag {
  padding: 1px 6px;
  border: 1px solid #c8b994;
  border-radius: 0;
  background: #f4ecd8;
  font-size: 12.5px;
  letter-spacing: 0;
  color: #7a6743;
}

/* ---------- 主楼正文：行距拉开 + 首行缩进两字 ---------- */
.article-page.is-forum .article-content p {
  line-height: 2.05;
  text-indent: 2em;
  color: #3e3326;
}
/* 「本帖最后由……编辑」不算正文，不缩进，改成一条点线小注 */
.article-page.is-forum .article-content .article-note {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dotted #d5cbb4;
  font-size: 13.5px;
  line-height: 1.9;
  text-indent: 0;
  color: #93815f;
}

/* ---------- 回复区：老论坛那种带框的浅色板子 ---------- */
.article-page.is-forum > .article-replies {
  border: 1px solid #e0d4b8;
  background: #f2ebd8;
}
/* 版块标题栏：深褐底 + 米白字，圆角抹平，一眼就是 2000 年代的 BBS */
.article-page.is-forum .ar-head {
  border-radius: 0;
  background: #4a3b26;
  letter-spacing: 0;
  color: #fdf8ec;
}
.article-page.is-forum .ar-head span {
  color: #c9b48c;
}
/* 楼层：褐色导轨 + 点状虚线收尾 */
.article-page.is-forum .ar-floor {
  border-left: 2px solid #ddd0b4;
  border-bottom: 1px dotted #d5cbb4;
  color: #4a3d2c;
}
.article-page.is-forum .ar-floor b {
  color: #a08c66;
}
/* 楼主回复：淡紫灰底 + 加粗的紫褐左边框，保留可辨识度 */
.article-page.is-forum .ar-floor.is-op {
  border-left: 4px solid #a58cc4;
  border-radius: 0;
  background: #f0e9f5;
  color: #4a3f52;
}
.article-page.is-forum .ar-floor.is-op b {
  color: #7b5aa6;
}
/* 楼上已经把框兜住了，最后一层不用再收一道线 */
.article-page.is-forum .ar-floor:last-child {
  border-bottom: 0;
}

/* ---------- 文末互动栏：细虚线分隔，头像改成方形小牌 ---------- */
.article-page.is-forum .article-foot {
  border-top: 1px dashed #d5cbb4;
}
.article-page.is-forum .article-avatar {
  border-radius: 2px;
  background: #ece2c8;
  color: #8c7b5e;
}
.article-page.is-forum .article-nick {
  color: #6b5b40;
}
.article-page.is-forum .article-act {
  color: #b0a184;
}

/* ---------- 正文里的录像块：木框裱起来的旧带子 ---------- */
.article-page.is-forum .article-video {
  padding: 8px;
  border: 1px solid #e0d4b8;
  border-radius: 0;
  background: #f4eedc;
}
.article-page.is-forum .av-title {
  color: #4a3d2c;
}
.article-page.is-forum .av-meta {
  color: #a08c66;
}

/* ---------- 文末返回：已统一到 .global-page-back（米黄纸上也用白胶囊） ---------- */

@media (max-width: 900px) {
  .article-page > .article-title,
  .article-page > .article-meta,
  .article-page > .article-content { padding-left: 30px; padding-right: 30px; }
  .article-page > .article-replies { padding-left: 30px; padding-right: 30px; }
  /* 窗口变窄后阅读列不再顶到 800，分隔线改按百分比让位，保持与正文对齐 */
  .article-page > .article-foot { width: calc(100% - 60px); max-width: none; }
  .article-page .article-title { padding-top: 34px; font-size: 22px; }
  .article-page .article-content p { font-size: 16px; }
}
@media (max-width: 620px) {
  .article-page > .article-title,
  .article-page > .article-meta,
  .article-page > .article-content { padding-left: 20px; padding-right: 20px; }
  .article-page > .article-replies { padding-left: 20px; padding-right: 20px; padding-bottom: 28px; }
  .article-page .ar-head { padding: 10px 14px; font-size: 13.5px; }
  .article-page .ar-floor { padding-left: 14px; padding-right: 0; font-size: 14.5px; }
  .article-page .ar-floor.is-op { padding-left: 14px; padding-right: 10px; }
  .article-page > .article-foot { width: calc(100% - 40px); padding-bottom: 28px; }
  .article-page .article-title { padding-top: 26px; font-size: 20px; }
  .article-page .article-content p { font-size: 16px; line-height: 1.75; }
  .article-page .article-foot { flex-wrap: wrap; row-gap: 14px; }
  .article-page .article-actions { gap: 14px; }
}

/* 空结果的样式统一在「搜索结果列表页」一节里（.sr-empty），这里不再单列 */

/* ============================================================
   IMDb 词条页（Happy With Us）—— 深色模式还原
   全部选择器限定在 .imdb-page 内，不污染终端外壳
   ============================================================ */

/* 页面本体：铺满浏览器内容区（抵消 .browser-content 的 16px 内边距） */
#browser-content-area > .imdb-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  padding-bottom: 26px;
  background: #1a1a1a;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 顶部导航栏 ---------- */
.imdb-page .imdb-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 22px;
  background: #000;
  border-bottom: 1px solid #262626;
}
.imdb-page .imdb-logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 7px;
  border-radius: 3px;
  background: #f5c518;
  color: #000;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1;
  cursor: pointer;
}
.imdb-page .imdb-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.imdb-page .imdb-nav-right span { cursor: pointer; white-space: nowrap; }
.imdb-page .imdb-nav-right span:hover { color: #f5c518; }

/* ---------- Hero ---------- */
.imdb-page .imdb-hero {
  display: flex;
  align-items: flex-start;
  gap: 34px;
  padding: 60px 60px 50px;
  background: #1a1a1a;
}

/* 海报（200 × 300 固定框，里面塞真实图片）
   原图 1200×1800 正好是 2:3，和这个框同比例 —— 放大后依然是整张图，
   一个像素都不裁，只是从 150×220 那个「缩略图尺寸」长成了海报该有的体量。 */
.imdb-page .imdb-poster {
  flex: none;
  width: 200px;
  height: 300px;
  border-radius: 6px;
  border: 1px solid #333;
  /* 占位渐变去掉，只留一层深色底：图片没加载出来时不会露出白洞 */
  background: #232323;
  overflow: hidden;
}
/* 图片按容器裁切填满，不拉伸：2:3 的图塞进 2:3 的框，比例正好吻合 */
.imdb-page .imdb-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 6px;   /* 继承外框的圆角 */
}

.imdb-page .imdb-hero-info { flex: 1; min-width: 0; padding-top: 2px; }

.imdb-page .imdb-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: #fff;
}
.imdb-page .imdb-sub {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: #bbb;
}

/* 类型标签 */
.imdb-page .imdb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.imdb-page .imdb-tags span {
  padding: 3px 11px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  background: #232323;
  color: #ddd;
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* 简介 */
.imdb-page .imdb-plot {
  max-width: 760px;
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.8;
  color: #ddd;
}

/* 主演行 */
.imdb-page .imdb-stars {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.8;
  color: #ddd;
}
.imdb-page .imdb-label { color: #8a8a8a; margin-right: 3px; }
/* 演员名：普通文本；flex gap 也会加在逗号前，回拉 4px 让「A, B, C」读起来正常 */
.imdb-page .imdb-star-name { color: #ddd; }
.imdb-page .imdb-comma { color: #ddd; margin-left: -4px; }

/* 操作按钮 */
.imdb-page .imdb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.imdb-page .imdb-btn-primary {
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  background: #f5c518;
  color: #000;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease;
}
.imdb-page .imdb-btn-primary:hover { background: #e2b400; }
.imdb-page .imdb-btn-primary:active { transform: translateY(1px); }

.imdb-page .imdb-btn-ghost {
  padding: 10px 18px;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  background: #333;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.imdb-page .imdb-btn-ghost:hover { background: #3f3f3f; border-color: #555; }

/* ---------- 底部：Top Cast（单列，演员区铺满整栏） ---------- */
.imdb-page .imdb-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  /* 下边 80px：原来这页底部挂着返回按钮，靠按钮撑住收尾；
     按钮删掉后，这段留白要自己把页面托住，不能让人贴在屏幕下沿。 */
  padding: 50px 60px 80px;
  border-top: 1px solid #262626;
}
.imdb-page .imdb-col { min-width: 0; }

.imdb-page .imdb-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.imdb-page .imdb-sec-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.imdb-page .imdb-sec-head span {
  font-size: 12px;
  color: #5799ef;
  cursor: pointer;
}
.imdb-page .imdb-sec-head span:hover { text-decoration: underline; }

/* Top Cast：圆形头像 + 右侧姓名 / 角色 */
.imdb-page .imdb-cast-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
}
.imdb-page .imdb-cast-item {
  /* 三份等宽、内容居中：三个头像沿整行均匀落位，不再全挤在左边 */
  flex: 1;
  justify-content: center;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* .imdb-ava 现在挂在 <img> 上：固定 72×72、裁成圆形、不拉伸 */
.imdb-page .imdb-ava {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  object-fit: cover;      /* 正方形剧照裁圆，不会压扁 */
  object-position: center;
  display: block;
  background: none;       /* 去掉原来的占位渐变 */
}
.imdb-page .imdb-cast-text { min-width: 0; }
.imdb-page .imdb-cast-text b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.imdb-page .imdb-cast-text small {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: #9a9a9a;
}

/* ---------- 窄窗口降级 ---------- */
@media (max-width: 1020px) {
  .imdb-page .imdb-hero { padding: 40px 40px 34px; gap: 28px; }
  .imdb-page .imdb-title { font-size: 34px; }
  .imdb-page .imdb-bottom { padding: 36px 40px 56px; }
}
@media (max-width: 760px) {
  .imdb-page .imdb-hero { flex-direction: column; padding: 26px 24px 28px; }
  /* 竖排之后海报独占顶部：手机横屏只有 300 多高，200×300 会把标题整个顶到屏幕外，
     收回到 150×225（同样 2:3，不裁图），一屏里还能看见标题 */
  .imdb-page .imdb-poster { width: 150px; height: 225px; }
  .imdb-page .imdb-title { font-size: 28px; }
  .imdb-page .imdb-bottom { padding: 26px 24px 40px; }
  .imdb-page .imdb-nav-right { gap: 12px; font-size: 12px; }
  /* 三等分放不下（72 头像 + 姓名 + 角色）：退回竖排，一项一行 */
  .imdb-page .imdb-cast-list { flex-direction: column; gap: 14px; }
  .imdb-page .imdb-cast-item { flex: none; justify-content: flex-start; }
}

/* ============================================================
   现代新闻门户文章页 cnn-news-page（CNN 风格）
   ------------------------------------------------------------
   《Lost Media》/《汤米·维恩被捕》两个详情页共用同一套骨架：
     cnn-nav 导航 → cnn-breadcrumb 面包屑 → cnn-title-wrap 红竖线标题
     → cnn-meta 元数据 → cnn-image 配图 → cnn-content 正文
   整页纯白，配色只有黑（#111）、灰阶、红（#cc0000，唯一点缀）。
   正文里没有任何可点击/高亮的词，玩家自己复制去搜。
   ============================================================ */

/* 整页铺白：把 .browser-content 的 16px 内边距上下左右全部吃掉，
   白色一直铺到内容区边缘，两侧不再露出深色外壳。
   这里不限制宽度 —— 900px 的正文列交给下面的 .cnn-article，导航保持通栏。 */
#browser-content-area > .cnn-news-page {
  width: calc(100% + 32px);      /* 两侧各多吃 16px 的父级内边距 */
  max-width: none;
  min-height: calc(100% + 32px);
  margin: -16px -16px 0;
  background: #ffffff;
  color: #111111;
  font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 长文滚到底时，内容区自己的 16px 下内边距仍会露成一条深色；
   新闻页在场时把内容区一起刷白，任何滚动位置都不漏底色。 */
.browser-content:has(> .cnn-news-page) {
  background: #ffffff;
}

/* ---------- 1. 顶部导航：红底通栏 + 一条贯穿的深红细线 ----------
   整条导航做成“台标色块”：Logo、分类、右侧按钮全部反白，
   当前分类的指示线也用白色 —— 原来那根红线在红底上等于没有。 */
.cnn-nav {
  display: flex;
  align-items: stretch;
  gap: 18px;
  height: 54px;
  padding: 0 16px;
  background: #cc0000;
  border-bottom: 1px solid #a30000;
}

.cnn-logo {
  display: flex;
  align-items: center;
  flex: none;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
  white-space: nowrap;
}

.cnn-cats {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.cnn-cat {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  /* 未选中的分类压低一点透明度：红底上仍分得出“主次”，
     又不会因为灰白字显得脏 */
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  cursor: default;
}

/* 当前分类：贴着导航底线的粗白线（红底上唯一能看清的指示色） */
.cnn-cat.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  background: #ffffff;
}

/* 选中的那一个回到不透明的白，比其余分类更实一档 */
.cnn-cat.is-active {
  color: #ffffff;
}

.cnn-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  /* 右上方要留给浏览器挂的收藏星标（星标贴模块右侧 26px，宽 28px） */
  padding-right: 42px;
}

.cnn-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  cursor: default;
}

.cnn-nav-item svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cnn-login {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 13px;
  /* 红底上的描边按钮：半透明白框 + 实白字，比纯白细框更透气 */
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  cursor: default;
}

/* ---------- 文章栏：白底通栏里的 900px 正文列（居中） ---------- */
.cnn-article {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 56px 64px;
}

/* ---------- 2. 面包屑 + 阅读时间 ---------- */
.cnn-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: #6b6b6b;
}
.cnn-crumb-sep,
.cnn-crumb-dot {
  font-weight: 400;
  color: #b0b0b0;
}

/* ---------- 3. 红色竖线 + 大标题 ---------- */
.cnn-title-wrap {
  display: flex;
  align-items: stretch;
  gap: 18px;
  margin-top: 16px;
}
.cnn-rule {
  flex: 0 0 7px;
  background: #cc0000;
  border-radius: 1px;
}
.cnn-title {
  font-size: clamp(30px, 3.4vw, 42px);
  overflow-wrap: break-word;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.8px;
  color: #0a0a0a;
}

/* ---------- 4. 元数据 ---------- */
.cnn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e6e6e6;
  font-size: 13.5px;
  color: #6b6b6b;
}
.cnn-meta-sep {
  width: 1px;
  height: 12px;
  background: #d5d5d5;
}

/* ---------- 5. 配图 ---------- */
.cnn-image {
  margin: 26px 0 30px;
}
.cnn-ph {
  position: relative;
  height: clamp(240px, 42vh, 400px);
  border-radius: 6px;
  overflow: hidden;
  background: #d8dce2;
}
/* 冷灰档案照（Lost Media） */
.cnn-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 76% 30%, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0) 62%),
    linear-gradient(155deg, #d7dce2 0%, #a8b1bb 32%, #6f7984 66%, #3f4750 100%);
}
/* 暖灰街景（社会新闻） */
.cnn-ph.is-street::before {
  background:
    radial-gradient(65% 85% at 24% 20%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 60%),
    linear-gradient(150deg, #ded7cc 0%, #b3aa9d 34%, #7d7569 68%, #474139 100%);
}
/* 极淡的斜向纹理，避免纯色块显得像没加载出来 */
.cnn-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(112deg,
    rgba(255, 255, 255, 0.055) 0 2px,
    rgba(255, 255, 255, 0) 2px 7px);
}
/* ---------- 5b. 真实配图（cnn 与 tb 共用） ----------
   容器高度不变，图片填满容器并用 object-fit: cover 裁边保比例，
   所以横图、方图塞进同一个框里都不会变形。
   .tb-ph 的边框 / 红色错位投影 / 「独家画面」红标都挂在容器上，
   照片因此被包进同一套版式，红标压在照片左上角。 */
.cnn-ph img,
.tb-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 有真图时让位：.cnn-ph 的 ::before 是渐层、::after 是斜向纹理，
   两者都是绝对定位，不关掉会整块盖在静态的 <img> 上面。
   （.tb-ph::after 是「独家画面」标签，属于版式元素，继续保留。） */
.cnn-ph.has-img::before,
.cnn-ph.has-img::after {
  display: none;
}
.cnn-image figcaption {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: #8c8c8c;
}

/* ---------- 6. 正文 ---------- */
.cnn-content {
  font-size: 18px;
  line-height: 1.6;
  color: #1a1a1a;
}
.cnn-content p {
  margin: 0 0 25px;
  text-indent: 0;
  text-align: left;
  overflow-wrap: break-word;
}
.cnn-content p:last-child { margin-bottom: 0; }
.cnn-content b {
  font-weight: 700;
  color: #000000;
}

/* ---------- 相关人物 / 评论：只做灰阶分隔，不做任何链接色 ---------- */
.cnn-related {
  margin-top: 34px;
  padding-top: 15px;
  border-top: 1px solid #e6e6e6;
  font-size: 13px;
  color: #767676;
}

.cnn-comments {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 3px solid #111111;
}
.cnn-comments h3 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 800;
  color: #111111;
}
.cnn-comments h3 span {
  font-size: 13px;
  font-weight: 400;
  color: #9a9a9a;
}
.cnn-comment {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid #ececec;
}
.cnn-comment:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.cnn-comment-body b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #111111;
}
.cnn-comment-body p {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.8;
  color: #4a4a4a;
}

/* ---------- 窄窗口：收边距、缩标题，正文仍保持 17px 以上 ---------- */
@media (max-width: 980px) {
  .cnn-article { padding: 0 34px 52px; }
  .cnn-title { letter-spacing: -0.5px; }
}

@media (max-width: 780px) {
  .cnn-nav { height: 50px; gap: 12px; padding: 0 12px; }
  .cnn-logo { font-size: 19px; }
  .cnn-cat { padding: 0 6px; font-size: 12px; }
  .cnn-cat.is-active::after { left: 6px; right: 6px; }
  .cnn-nav-right { gap: 10px; padding-right: 34px; }
  .cnn-nav-item { font-size: 12px; }
  .cnn-article { padding: 0 22px 44px; }
  .cnn-breadcrumb { padding-top: 18px; }
  .cnn-title { font-size: 30px; }
  .cnn-rule { flex-basis: 5px; }
  .cnn-ph { height: 190px; }
  .cnn-content { font-size: 17px; }
}

/* ============================================================
   娱乐八卦小报页 tabloid-news-page（劣质传单 / 地摊小报）
   ------------------------------------------------------------
   与 cnn-news-page 完全隔离：选择器全部带 .tabloid-news-page
   或 tb- 前缀，不复用也不修改任何 .cnn-* 规则。

   这一版刻意做成「三流营销号」：
     · 一律直角，整个页面没有一处 border-radius
     · 阴影全部是 0 模糊的硬投影，像廉价印刷的套色错位
     · 只用四支颜色：纸黄 #fffce8 / 大红 #e60000 / 亮黄 #ffea00 / 纯黑 #000
     · 标签歪七扭八地贴、标题压一道红色重影、小编框整块斜着钉上去
   ============================================================ */

#browser-content-area > .tabloid-news-page {
  display: flex;
  flex-direction: column;
  width: calc(100% + 32px);
  max-width: none;
  min-height: calc(100% + 32px);
  margin: -16px -16px 0;
  background: #fffce8;
  color: #000000;
  font-family: "SimSun", "宋体", "Songti SC", serif;
  border-radius: 0;
  -webkit-font-smoothing: antialiased;
}

/* 长文滚到底时，内容区自己的内边距也刷成同一种纸黄，不漏深色 */
.browser-content:has(> .tabloid-news-page) {
  background: #fffce8;
}

/* ---------- 1. 大红通栏（底下压一条粗黑线） ---------- */
.tb-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  /* 右边留出星标（固定在右上角）的位置 */
  padding: 0 62px 0 18px;
  background: #e60000;
  border-bottom: 4px solid #000000;
  border-radius: 0;
}

.tb-logo {
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1;
  color: #ffffff;
  /* 硬投影而不是柔和发光：像喷绘套色没对准 */
  text-shadow: 3px 3px 0 #000000;
  white-space: nowrap;
}

.tb-tags {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 歪贴的彩色胶布：亮黄 / 亮品红，纯黑厚边 */
.tb-tag {
  padding: 3px 10px;
  background: #ffea00;
  border: 2px solid #000000;
  border-radius: 0;
  color: #000000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.4;
  white-space: nowrap;
  transform: rotate(-5deg);
  box-shadow: 2px 2px 0 #000000;
}
.tb-tag:nth-child(2) {
  background: #ff00ff;
  transform: rotate(4deg);
}
.tb-tag:nth-child(3) {
  background: #ffea00;
  transform: rotate(-3deg);
}

/* 通栏下面那条亮黄的免责声明 */
.tb-strip {
  flex: none;
  margin: 0;
  padding: 6px 16px;
  background: #ffea00;
  border-bottom: 3px solid #000000;
  color: #000000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- 2. 正文栏：一张贴上去的白纸 ---------- */
.tb-article {
  flex: 1 1 auto;
  width: 100%;
  max-width: 820px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 26px 52px 60px;
  background: #ffffff;
  border-left: 2px solid #000000;
  border-right: 2px solid #000000;
  border-radius: 0;
}

/* ---------- 3. 红标 + 巨型标题 + 灰底署名 ---------- */
.tb-kicker {
  margin: 0 0 10px;
}
.tb-kicker span {
  display: inline-block;
  padding: 4px 12px 5px;
  background: #e60000;
  border: 2px solid #000000;
  border-radius: 0;
  color: #ffffff;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 #000000;
}

/* 标题：纯黑字 + 俗气的红色硬重影，不再刷马克笔底 */
.tb-title {
  margin: 8px 0 0;
  font-family: "Microsoft YaHei", "SimHei", "Heiti SC", sans-serif;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.32;
  color: #000000;
  overflow-wrap: break-word;
  text-shadow: 3px 3px 0 #e60000;
}

/* 标题里的 span 只是富文本容器：底色、内边距全部撤掉 */
.tb-title span {
  padding: 0;
  background: none;
}

/* 署名：上下两条粗黑实线 + 一段浅灰底，像随手拼的版 */
.tb-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 5px 8px;
  background: #eeeeee;
  border-top: 3px solid #000000;
  border-bottom: 3px solid #000000;
  border-radius: 0;
  color: #000000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.tb-meta i {
  font-style: normal;
  color: #e60000;
  font-weight: 900;
}

/* ---------- 4. 「独家画面」 ---------- */
.tb-image {
  margin: 20px 0 22px;
}
.tb-ph {
  position: relative;
  height: clamp(180px, 30vh, 260px);
  background: #b9b1a0;            /* 平的灰褐块，不用渐变 */
  border: 3px solid #000000;
  border-radius: 0;
  box-shadow: 6px 6px 0 #e60000;  /* 错位的红色硬投影 */
  overflow: hidden;
}
.tb-ph.is-street {
  background: #9d9078;
}
.tb-ph::after {
  content: "独家画面";
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 9px 3px;
  background: #e60000;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  border-radius: 0;
  color: #ffffff;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}
.tb-image figcaption {
  margin-top: 8px;
  color: #444444;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------- 5. 正文：一句一段 ---------- */
.tb-content {
  font-family: "SimSun", "宋体", "Songti SC", serif;
  font-size: 17.5px;
  line-height: 1.95;
  color: #000000;
}
.tb-content p {
  margin: 0 0 15px;
  overflow-wrap: break-word;
}
.tb-content mark {
  padding: 0 3px;
  background: #ffea00;
  color: #000000;
  font-weight: 700;
}
.tb-content b,
.tb-content strong {
  font-weight: 700;
  color: #000000;
}

/* 小编有话说：亮黄底 + 3px 粗黑边 + 楷体红字，整块斜着钉在版面上 */
.tb-say {
  margin: 18px 0 24px;
  padding: 12px 16px 14px;
  background: #ffe600;
  border: 3px solid #000000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
  color: #cc0000;
  font-family: "KaiTi", "STKaiti", "楷体", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.85;
  transform: rotate(1deg);
}
.tb-say b {
  display: inline-block;
  margin-right: 8px;
  padding: 0 6px;
  background: #cc0000;
  color: #ffe600;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
}

.tb-related {
  margin: 26px 0 0;
  padding-top: 12px;
  border-top: 2px solid #000000;
  color: #444444;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

/* ---------- 6. 评论区：网友炸锅了！ ---------- */
.tb-comments {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 6px solid #000000;
}
.tb-comments h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  color: #e60000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  -webkit-text-stroke: 1px #000000;   /* 大红字的黑边 */
  text-shadow: 2px 2px 0 #000000;
}
.tb-comments h3 span {
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* 评论卡片：纯白底 + 2px 黑框 + 4px 硬投影，只有黑与红两种配色 */
.tb-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
  transform: rotate(-0.4deg);
}
/* 隔一张换红：只有黑红两色硬交替，不引入第三支配色 */
.tb-comment:nth-of-type(2n) {
  border-color: #e60000;
  box-shadow: 4px 4px 0 #e60000;
  transform: rotate(0.5deg);
}

/* 头像：正方形色块，不做圆、不做斜 */
.tb-ava {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #e60000;
  border: 2px solid #000000;
  border-radius: 0;
  color: #ffffff;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.tb-comment:nth-of-type(2n) .tb-ava {
  background: #000000;
}

.tb-cbody b {
  display: block;
  color: #e60000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 14px;
  font-weight: 900;
}
.tb-cbody p {
  margin: 3px 0 0;
  color: #000000;
  font-family: "SimSun", "宋体", serif;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

/* ---------- 7. 窄窗口 / 矮窗口 ---------- */
@media (max-width: 980px) {
  .tb-article { padding: 22px 34px 52px; }
  .tb-title { font-size: 34px; }
}

@media (max-width: 780px) {
  .tb-nav { height: 50px; padding: 0 58px 0 12px; gap: 8px; }
  .tb-logo { font-size: 20px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000000; }
  .tb-tag { padding: 2px 7px; border-width: 2px; font-size: 12px; box-shadow: 1px 1px 0 #000000; }
  .tb-strip { padding: 5px 10px; font-size: 12px; letter-spacing: 0; }
  .tb-article {
    padding: 18px 16px 40px;
    border-left: 0;
    border-right: 0;
  }
  .tb-title { font-size: 27px; letter-spacing: -0.5px; text-shadow: 2px 2px 0 #e60000; }
  .tb-meta { font-size: 12.5px; }
  .tb-ph { height: 168px; }
  .tb-content { font-size: 16px; line-height: 1.9; }
  .tb-say { font-size: 15px; box-shadow: 3px 3px 0 #000000; }
  .tb-comments h3 { font-size: 18px; }
  .tb-cbody p { font-size: 14.5px; }
}

/* 这两档里 .browser-content 的内边距是 10px，整页出血要跟着改 */
@media (orientation: portrait) and (max-width: 768px) {
  #browser-content-area > .tabloid-news-page {
    width: calc(100% + 20px);
    min-height: calc(100% + 20px);
    margin: -10px -10px 0;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #browser-content-area > .tabloid-news-page {
    width: calc(100% + 20px);
    min-height: calc(100% + 20px);
    margin: -10px -10px 0;
  }
  .tb-nav { height: 42px; }
  .tb-strip { display: none; }
  .tb-ph { display: none; }
  .tb-article { padding: 14px 20px 32px; }
}

/* ---------- 8. 文末返回（米黄纸上的黑框红影按钮） ----------
   通用 .global-page-back 是「白胶囊 + 灰描边 + 0.04 淡阴影」，
   放到小报页的 #fffce8 米黄纸上，白底和纸色差几乎为零、灰描边也吃不出边界。
   这里不改通用规则，只在本页覆盖成小报自己的语汇：
   纯白底 + 2px 纯黑描边 + 4px 零模糊红色硬投影 —— 和 .tb-image、
   .tb-comment 用的是同一套「廉价套色错位」手法，直角，不留圆角。
   选择器带 .tabloid-news-page 前缀，天然只作用于小报页。 */
.tabloid-news-page .global-page-back {
  padding: 36px 0 60px;   /* 底部多留一截，别让按钮贴着窗口边 */
  background: transparent;
}
.tabloid-news-page .global-page-back .back-link {
  padding: 11px 26px;
  border-radius: 0;
  background: #ffffff;
  border: 2px solid #111111;
  color: #111111;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 4px 4px 0 #cc0000;
  transition: transform 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}
/* 悬停：按钮与硬投影一起往左上挪 1px、影子加深 1px，像被手指按住一角；
   绝不改成带模糊的软阴影 —— 那会跟整页的错位印刷感打架。 */
.tabloid-news-page .global-page-back .back-link:hover {
  background: #ffffff;
  border-color: #111111;
  color: #e60000;
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #cc0000;
}
/* 按下：整体往右下陷回去，影子同步收短，做出「按进纸里」的手感 */
.tabloid-news-page .global-page-back .back-link:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #cc0000;
}

@media (orientation: landscape) and (max-height: 500px) {
  /* 极矮横屏：上下留白收一半，否则按钮要滚很久才露头 */
  .tabloid-news-page .global-page-back { padding: 20px 0 28px; }
}

/* ============================================================
   传统报纸电子版 old-news-page
   ------------------------------------------------------------
   三篇旧稿专用：2004 恶魔暗示 / 2004 多州联合警告 / 2009 义工投诉。
   照着一张晚报电子版抄的版式：深红报头、灰色信息条、
   蓝色黑体大标题、居中署名 + 一条虚线、宋体正文首行缩进两字。
   完全隔离：外层只有 .old-news-page，内部类名统一带 on- 前缀，
   不碰 cnn-news-page（现代门户）/ tabloid-news-page（娱乐小报）/
   news-2004-page（2004 老门户）。
   ============================================================ */

#browser-content-area > .old-news-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  background: #ffffff;
  color: #333333;
  font-family: "SimSun", "Songti SC", "宋体", serif;
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- 1. 报头：深红通栏 + 行楷刊名 ---------- */
.old-news-page .on-header {
  position: relative;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #cc0000;
}

.old-news-page .on-header-title {
  color: #ffffff;
  font-family: "STXingkai", "华文行楷", "SimHei", "黑体", sans-serif;
  font-size: 46px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 4px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

/* 报头右下角那排灰白色小链接：纯装饰，不响应点击 */
.old-news-page .on-header-links {
  position: absolute;
  right: 40px;
  bottom: 10px;
  color: #ffffff;
  font-family: "SimSun", "宋体", serif;
  font-size: 12px;
  letter-spacing: 1px;
}

.old-news-page .on-header-links span {
  margin-left: 10px;
  cursor: default;
}

/* ---------- 2. 灰色信息条：翻版 / 日期 / 字号 ---------- */
.old-news-page .on-nav-bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #e6e6e6;
  border-bottom: 1px solid #cccccc;
  color: #333333;
  font-size: 13px;
}

.old-news-page .on-nav-bar .on-date {
  font-family: "SimSun", "宋体", serif;
  font-weight: bold;
}

.old-news-page .on-nav-bar .on-prev,
.old-news-page .on-nav-bar .on-tools {
  color: #444444;
  cursor: default;
}

/* ---------- 3. 版心：800px 居中 ---------- */
.old-news-page .on-content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* 大标题：报纸的蓝是偏紫的印刷蓝，不是链接蓝。
   标题与下面那条灰色署名一起居中 —— 署名本来就是 text-align:center，
   标题若靠左，两行会错开一个版心的宽度，像没排完的毛样。
   h1 是通栏块级元素（版心 800px，无额外宽度 / padding），
   居中即等同「在这块版心里居中」，窄屏换行后每一行也各自居中。 */
.old-news-page .on-title {
  margin-bottom: 20px;
  color: #0000ee;
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 32px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
}

/* 署名：居中、灰色、下面一条虚线把它和正文分开 */
.old-news-page .on-meta {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #cccccc;
  color: #888888;
  font-size: 13px;
  text-align: center;
}

/* 正文：宋体、两倍行距、首行缩进两字 */
.old-news-page .on-body p {
  margin-bottom: 15px;
  color: #222222;
  font-size: 16px;
  line-height: 2;
  text-indent: 2em;
}

/* ---------- 4. 相关新闻：双线压顶的延伸阅读栏 ---------- */
.old-news-page .on-related {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 3px double #cc0000;
}

.old-news-page .on-related-title {
  margin-bottom: 12px;
  color: #cc0000;
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
}

.old-news-page .on-related-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.old-news-page .on-related-list li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 15px;
  color: #333333;
  font-size: 14px;
  line-height: 1.8;
}

.old-news-page .on-related-list li::before {
  content: "▪";
  position: absolute;
  left: 0;
  top: 0;
  color: #cc0000;
}

/* ---------- 5. 窄屏 / 手机横屏：报头收高、字号降一档、隐藏装饰 ----------
   两个条件跟站点其他断点保持一致：
   竖屏走 max-width:768；手机横屏（844×390 这类）靠第二个条件命中，
   此时 .browser-content 的内边距也降到 10px，负边距必须跟着收，
   否则整页会比容器宽出 12px，报头右侧会被切掉一条。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #browser-content-area > .old-news-page {
    margin: -10px;                 /* 这一档 .browser-content 的内边距是 10px */
    min-height: calc(100% + 20px);
  }
  .old-news-page .on-header { height: 62px; padding: 0 16px; }
  .old-news-page .on-header-title { font-size: 30px; letter-spacing: 2px; }
  .old-news-page .on-header-links { display: none; }
  .old-news-page .on-nav-bar { position: relative; height: 28px; padding: 0 12px; font-size: 11px; }
  /* 日期永远在正中：左右两侧的「下一篇 / 字号」宽度不等，
     靠 space-between 会把它挤偏，改成绝对定位水平居中 */
  .old-news-page .on-nav-bar .on-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11.5px;
    white-space: nowrap;
  }
  .old-news-page .on-content-wrap { padding: 20px 16px 44px; }
  .old-news-page .on-title { font-size: 22px; line-height: 1.45; }
  .old-news-page .on-meta { margin-bottom: 22px; padding-bottom: 12px; font-size: 12px; }
  .old-news-page .on-body p { margin-bottom: 14px; font-size: 15.5px; line-height: 1.95; }
  .old-news-page .on-related { margin-top: 28px; padding-top: 14px; }
  .old-news-page .on-related-list li { font-size: 13.5px; }
}

/* 极窄（竖屏窄窗口）：日期两侧放不下字号那一组，直接收掉 */
@media (max-width: 560px) {
  .old-news-page .on-nav-bar .on-tools { display: none; }
}

/* ============================================================
   2004 年古早门户新闻页 news-2004-page
   ------------------------------------------------------------
   与 cnn-news-page（现代门户）/ tabloid-news-page（娱乐小报）
   完全隔离：下面每一条选择器都以 .news-2004-page 开头，
   不碰任何现有页面。
   要的不是「复古滤镜」，而是照 2004 年门户的排版规矩来：
   800px 居中白底、深蓝通栏、黑体大标题居中、宋体正文首行缩进、
   右侧 200px 相关新闻框、蓝色带下划线的老式链接。
   没有圆角、没有阴影、没有过渡动画、没有弹窗。
   ============================================================ */

.news-2004-page {
  width: 100%;
  max-width: 800px;              /* 那个年代的主流版心宽度 */
  min-height: 100%;
  margin: 0 auto;                /* 强制居中 */
  background: #ffffff;           /* 纯白，不用米黄纸感 */
  color: #000000;
  font-family: "SimSun", "宋体", serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: auto;
}

/* 内容区自带 16px（窄屏 10px）内边距，页面只做 800px 居中，
   两侧的边白交给内容区一起刷白，才不会有深色边框露出来。
   这条只在 2004 版新闻页到场时命中，不会影响别的页面。 */
.browser-content:has(> .news-2004-page) {
  background: #ffffff;
}

/* ---------- 1. 顶部通栏：纯色块 + 白字 ---------- */
.news-2004-page .n04-nav {
  background: #003399;
  border-bottom: 2px solid #002277;
}

.news-2004-page .n04-nav-inner {
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.2;
  color: #ffffff;
}

.news-2004-page .n04-logo {
  display: inline-block;
  margin-right: 16px;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #ffffff;
}

.news-2004-page .n04-nav-link {
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.news-2004-page .n04-nav-link:hover {
  text-decoration: underline;
}

.news-2004-page .n04-nav-sep {
  padding: 0 6px;
  color: #a9bbe0;
}

/* ---------- 2. 版心：标题 / 元数据 / 虚线 ---------- */
.news-2004-page .n04-shell {
  padding: 16px 16px 26px;
}

.news-2004-page .n04-title {
  margin: 0 0 8px;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.35;
  text-align: center;
  color: #000000;
}

.news-2004-page .n04-meta {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: #666666;
}

.news-2004-page .n04-meta span {
  display: inline-block;
  padding: 0 10px;
}

/* 贯穿整栏的虚线：老门户用它把标题区和正文切开 */
.news-2004-page .n04-rule {
  height: 0;
  margin: 0 0 12px;
  border: 0;
  border-top: 1px dashed #999999;
}

/* ---------- 3. 右侧「相关新闻」：200px 浮动框 ---------- */
.news-2004-page .n04-side {
  float: right;
  width: 200px;
  margin: 2px 0 12px 16px;
  border: 1px solid #cccccc;
  background: #ffffff;
}

.news-2004-page .n04-side-title {
  margin: 0;
  padding: 4px 8px;
  background: #eeeeee;
  border-bottom: 1px solid #cccccc;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.6;
  color: #000000;
}

.news-2004-page .n04-side-list {
  margin: 0;
  padding: 6px 8px 8px 22px;
  list-style: square outside;
}

.news-2004-page .n04-side-list li {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.7;
}

.news-2004-page .n04-side-list li:last-child {
  margin-bottom: 0;
}

/* 那个年代的超链接：正蓝 + 下划线，鼠标移上去转红 */
.news-2004-page .n04-link {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
  overflow-wrap: break-word;
  word-break: break-all;
}

.news-2004-page .n04-link:hover {
  color: #cc0000;
}

/* ---------- 4. 正文：宋体 14px，首行缩进两字 ---------- */
.news-2004-page .n04-body {
  font-family: "SimSun", "宋体", serif;
  font-size: 14px;
  line-height: 1.6;
  color: #000000;
  text-align: justify;
}

.news-2004-page .n04-body p {
  margin: 0 0 10px;
  text-indent: 2em;
  line-height: 1.6;
}

.news-2004-page .n04-body p:last-child {
  margin-bottom: 0;
}

/* ---------- 5. 清浮动 + 页脚 ---------- */
.news-2004-page .n04-clear {
  clear: both;
  height: 0;
  overflow: hidden;
}

.news-2004-page .n04-foot-rule {
  height: 0;
  margin: 16px 0 8px;
  border: 0;
  border-top: 1px solid #cccccc;
}

.news-2004-page .n04-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: #666666;
}

/* ---------- 6. 窄窗口：相关新闻取消浮动，落到正文下方 ---------- */
@media (max-width: 780px) {
  .news-2004-page .n04-shell { padding: 12px 12px 22px; }
  .news-2004-page .n04-title { font-size: 20px; }
  .news-2004-page .n04-side {
    float: none;
    width: auto;
    margin: 12px 0 14px;
  }
}

/* ============================================================
   百科词条页 baike-page
   ------------------------------------------------------------
   蓝星少儿 / 欢乐好时光 两个词条用。中文百科的排版语言：
   浅灰页眉、黑体大标题、右侧信息表格、正文 15px / 1.9。
   所有选择器都锁在 .baike-page 下，不碰别的页面。
   ============================================================ */

/* 页面本体：极浅蓝灰底。
   负 margin 抵消 .browser-content 的 16px 内边距，让底色真正铺满整块内容区，
   否则四周会露出一圈别的底色，整页看起来像一张浮着的小卡片。 */
.baike-page {
  background: #f4f7fc;
  color: #1f2328;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  min-height: 100%;
}

#browser-content-area > .baike-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  padding-bottom: 2px;
}

/* 顶部导航：经典百科蓝 + 白字 */
.baike-page .baike-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  background: #4e6ef2;
  border-bottom: 1px solid #4560d8;
}

.baike-page .baike-logo {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.baike-page .baike-crumb {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

/* 内容外层：只负责给白卡片留一圈边距，自己不画底色 */
.baike-page .baike-body {
  padding: 20px 24px 6px;
}

/* 白底卡片：标题 / 信息表格 / 正文全部装在这一层，浅蓝底上浮起来。
   overflow:hidden 让卡片自己形成 BFC，兜住右侧那张浮动信息表，
   表格比正文长时背景也不会漏出卡片外。 */
.baike-page .baike-card-wrap {
  padding: 26px 28px 28px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.baike-page .baike-title {
  margin: 0 0 4px;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: #14171a;
}

.baike-page .baike-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: #8a8f99;
}

/* 右侧信息表格：与导语段落并排，最宽 320px，窄屏自动落到底下。
   这里刻意不给外层加 overflow:hidden —— 让浮动继续作用于下面的「简介」，
   否则导语一短，表格右侧就会空出一大块白。 */
.baike-page .baike-summary {
  overflow: visible;
}

.baike-page .baike-facts {
  float: right;
  width: 100%;
  max-width: 320px;
  margin: 2px 0 16px 16px;
  border: 1px solid #e2e8f5;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.baike-page .baike-facts th,
.baike-page .baike-facts td {
  border: 1px solid #e8edf7;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.baike-page .baike-facts th {
  width: 88px;
  background: #f6f9ff;
  font-weight: 400;
  color: #5b6270;
  white-space: nowrap;
}

.baike-page .baike-facts td {
  color: #1f2328;
  overflow-wrap: break-word;
  word-break: break-word;
}

.baike-page .baike-lead {
  margin: 0 0 6px;
  text-indent: 0;
  line-height: 1.8;
}

/* 正文区：15px / 1.8，比旧版 1.9 略紧一点，长段落更好读 */
.baike-page .baike-content {
  font-size: 15px;
  line-height: 1.8;
}

.baike-page .baike-h2 {
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #4e6ef2;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #14171a;
}

.baike-page .baike-text p {
  margin: 0 0 12px;
  text-indent: 2em;
  line-height: 1.8;
}

.baike-page .baike-text p:last-child {
  margin-bottom: 0;
}

/* 窗口变窄后，320px 的信息表挤在正文旁边会让每行只剩十来个字：
   到 900px 以下就让表格整块落到正文上方，单列排。 */
@media (max-width: 900px) {
  .baike-page .baike-facts {
    float: none;
    width: 100%;
    max-width: none;
    margin: 12px 0 16px;
  }
}

@media (max-width: 720px) {
  .baike-page .baike-body { padding: 14px 12px 2px; }
  .baike-page .baike-card-wrap { padding: 18px 16px 20px; }
  .baike-page .baike-title { font-size: 22px; }
}

/* ============================================================
   正文 / 评论里的行内链接（cnn 文章、求助帖回复共用）
   ============================================================ */

.cnn-inline-link,
.article-link {
  color: #1a5fb4;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 2px;
}

.cnn-inline-link:hover,
.article-link:hover {
  color: #0b3d91;
  background: #eef4fd;
}

/* ============================================================
   时光机 · 归档搜索结果（借快照容器渲染）
   ============================================================ */

#view-wayback .wayback-screen.snap-results {
  min-height: 100%;
  padding: 20px 22px 32px;
  background: #ffffff;
  color: #1f2328;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

#view-wayback .wayback-screen.snap-results .sr-page {
  max-width: 880px;
  margin: 0 auto;
}

#view-wayback .wayback-screen.snap-results .wb-results-hint {
  max-width: 880px;
  margin: 18px auto 0;
  font-size: 12px;
  color: #6b7280;
}

/* ============================================================
   地方新闻站 news-page（极简：米白纸感 + 宋体 + 双线页眉）
   ============================================================ */

#browser-content-area > .news-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  background: #fbfaf7;
  color: #1f1f1f;
}

.news-page .np-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 30px 48px;
}

.news-page .np-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 3px double #1f1f1f;
}
.news-page .np-logo {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #1f1f1f;
}
.news-page .np-date {
  font-size: 12.5px;
  color: #7d7d7d;
  letter-spacing: 0.02em;
}

.news-page .np-title {
  margin: 22px 0 10px;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.45;
  color: #161616;
}

.news-page .np-byline {
  margin-bottom: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid #ddd8ce;
  font-size: 12px;
  color: #8a857c;
}

.news-page .np-body {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 15px;
  line-height: 1.95;
  color: #222;
}
.news-page .np-body p {
  margin-bottom: 15px;
  text-indent: 2em;
}
.news-page .np-body b { font-weight: 700; }

.news-page .np-related {
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px dashed #ddd8ce;
  font-size: 12.5px;
  color: #8a857c;
}

/* 正文里的书名号、人名保持与正文同色，玩家自己判断要不要搜 */

/* ============================================================
   现代 404 error-404
   ============================================================ */

#browser-content-area > .error-404 {
  margin: -16px;
  min-height: calc(100% + 32px);
  background: #fff;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.error-404 .e404-code {
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  color: #e6e6e6;
}
.error-404 .e404-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.error-404 .e404-hint {
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 12px;
  color: #9aa0ad;
}
.error-404 .global-page-back { padding: 26px 0 4px; }

/* ============================================================
   真名验证（罗伯特·本内特）
   ------------------------------------------------------------
   搜「特里博·特内布」时，第三条是封存档案。点开落到这一屏：
   黑底 + 一个居中的验证框，里面只有标题、输入框、确认按钮、错误提示。
   跟 error-404 一样铺满浏览器内容区（吃掉 .browser-content 的 16px 内边距）。
   ============================================================ */

#browser-content-area > .unlock-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #0b0c0e;
  color: #e6e8ec;
  font-family: ui-monospace, "Consolas", "SFMono-Regular", "PingFang SC", "Microsoft YaHei", monospace;
}

.unlock-box {
  width: 100%;
  max-width: 520px;
  padding: 28px 26px 22px;
  border: 1px solid rgba(255, 51, 51, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.unlock-tag {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  color: #b91c1c;
}

.unlock-title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.55;
  color: #f2f4f7;
}

.unlock-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.unlock-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #e8ebf0;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.unlock-input::placeholder { color: #6b7280; }
.unlock-input:focus {
  outline: none;
  border-color: rgba(185, 28, 28, 0.7);
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.16);
}

.unlock-btn {
  flex: none;
  height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(185, 28, 28, 0.6);
  border-radius: 8px;
  background: rgba(185, 28, 28, 0.16);
  color: #f3d6d6;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.unlock-btn:hover {
  background: rgba(185, 28, 28, 0.3);
  border-color: rgba(185, 28, 28, 0.8);
}
.unlock-btn:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.6);
  outline-offset: 2px;
}

/* 错误提示：内容为空时整块收起，不占位；失败那一刻才出现一行红字 */
.unlock-error {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #f87171;
}
.unlock-error:empty { display: none; }

.unlock-back { margin-top: 18px; }
.unlock-back .back-link {
  font-size: 12.5px;
  color: #8a9099;
}
.unlock-back .back-link:hover { color: #e8ebf0; }

/* 手机竖屏：这一档 .browser-content 的内边距是 10px，出血量跟着改；
   输入框与按钮改成上下两行，按钮铺满。 */
@media (max-width: 640px) {
  #browser-content-area > .unlock-page {
    padding: 28px 18px;
  }
  .unlock-box { padding: 22px 18px 18px; }
  .unlock-title { font-size: 18px; }
  .unlock-row { flex-direction: column; }
  .unlock-btn { width: 100%; }
}

@media (orientation: portrait) and (max-width: 768px) {
  #browser-content-area > .unlock-page {
    margin: -10px;
    min-height: calc(100% + 20px);
  }
}

/* ============================================================
   时光机模块 —— Internet Archive 三视图
   （全部样式限定在 #view-wayback 内，不污染终端外壳）
   ============================================================ */

/* ---------- 三视图切换 ---------- */
#view-wayback .wbm-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  /* 和 .view 同理：非激活视图必须 visibility:hidden。
     只靠 opacity:0 的话，2002 快照那种满是纯色块的页面会在窗口
     下沿漏出 1px 黄边，而且照样参与绘制。 */
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
  background: #fff;
}
#view-wayback .wbm-view.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

/* 窗口高度有限（85vh）：日历页允许内部滚动，首页自己撑满不再滚 */
#view-wayback #wayback-view-calendar {
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

/* 首页：纵向铺满容器，「上黑下白」= 65% / 35% */
#view-wayback #wayback-view-home {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #141414;
}

/* ============================================================
   视图 1：Archive 首页 —— 上段 65% 黑底功能区
   ============================================================ */
.wbm-top {
  flex: 0 0 65%;
  min-height: 0;                 /* 关键：不加这行，下面的 flex:1 会被内容顶开 */
  display: flex;
  flex-direction: column;
  background-color: #141414;
  /* 45° 极淡斜纹 + 极淡的时钟/时间刻度图案 */
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 2px,
      transparent 2px,
      transparent 10px
    ),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'%3E%3Ccircle cx='80' cy='80' r='70' /%3E%3Ccircle cx='80' cy='80' r='60' /%3E%3Cline x1='80' y1='80' x2='80' y2='30' /%3E%3Cline x1='80' y1='80' x2='110' y2='80' /%3E%3Cline x1='80' y1='20' x2='80' y2='10' /%3E%3Cline x1='80' y1='140' x2='80' y2='150' /%3E%3Cline x1='20' y1='80' x2='10' y2='80' /%3E%3Cline x1='140' y1='80' x2='150' y2='80' /%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 160px 160px;
}

.wbm-nav {
  flex: none;
  background: transparent;       /* 背景交给 .wbm-top，斜纹才能一直铺到窗口顶端 */
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 13px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.wbm-logo {
  color: #fff;
  font-weight: 800;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.wbm-logo.dark { color: #111; font-style: normal; }
.wbm-nav-icons { display: flex; gap: 22px; flex: 1; }
.wbm-nav-icons svg {
  width: 18px; height: 18px;
  stroke: #8f8f8f; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  cursor: pointer;
}
.wbm-nav-icons svg:hover { stroke: #fff; }
.wbm-nav-right { display: flex; align-items: center; gap: 10px; }
.wbm-nav-right span { color: #fff; font-size: 12px; cursor: pointer; }
.wbm-nav-right span:hover { text-decoration: underline; }

/* 标题 + 搜索框：在黑区里彻底水平垂直居中 */
.wbm-hero {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;            /* 供搜索提示贴底定位 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 24px 20px;
  background: transparent;
}
.wbm-brand {
  margin: 0;
  color: #e03e2d;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  font-family: "Arial Black", "Arial", sans-serif;
  line-height: 1.05;
}
.wbm-hero-search {
  width: 100%;
  max-width: 560px;
  margin: 26px auto 0;
  display: flex;
}
.wbm-hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 3px 0 0 3px;
  padding: 13px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  background: #fff;
  outline: none;
}
.wbm-hero-search input:focus { box-shadow: inset 0 0 0 2px rgba(224, 62, 45, 0.55); }
.wbm-hero-search button {
  border: none;
  border-radius: 0 3px 3px 0;
  background: #4b4b4b;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 13px;
  padding: 0 26px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.wbm-hero-search button:hover { background: #5f5f5f; }
/* 提示条脱离文档流贴黑区底部，标题 + 搜索框才能真正落在正中 */
.wbm-search-msg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  padding: 0 24px;
  color: #e08a80;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- 时光机搜索结果列表（kind: 'search-list'） ----------
   白底 + 蓝链接 + 绿网址，刻意做成 2004 年那版搜索引擎的样子：
   平台本身是黑的、现代的，翻出来的存档是白的、旧的 ——
   列表越长，越像从黑底里浮上来的一张纸。 */
.wb-search-list {
  margin-top: 30px;
  width: 100%;
  max-width: 680px;
  text-align: left;
  background: #fff;
  padding: 20px 24px;
  border-radius: 4px;
}
.wb-search-list h3 {
  font-size: 14px;
  color: #333;
  margin: 0 0 16px 0;
  font-family: "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}
.wb-search-item {
  margin-bottom: 18px;
  cursor: pointer;
  outline: none;
}
.wb-search-item:last-child { margin-bottom: 0; }
.wb-search-item:focus-visible {
  box-shadow: 0 0 0 2px rgba(26, 13, 171, 0.35);
  border-radius: 3px;
}
.wb-s-url {
  font-size: 12px;
  color: #006621;
  margin-bottom: 2px;
  font-family: "Arial", sans-serif;
  word-break: break-all;
}
.wb-s-title {
  font-size: 16px;
  color: #1a0dab;
  text-decoration: underline;
  margin-bottom: 2px;
  line-height: 1.4;
}
.wb-search-item:hover .wb-s-title { color: #d14836; }
.wb-s-desc {
  font-size: 13px;
  color: #545454;
  line-height: 1.5;
}

/* 列表出现时的首页形态：
   黑区不再固定 65%（否则列表会被裁掉），hero 改从顶部排；
   下面那条 35% 的白底三列先收起来，把整块屏幕让给结果。 */
#view-wayback #wayback-view-home.is-wb-list {
  overflow-y: auto;
}
#view-wayback #wayback-view-home.is-wb-list .wbm-top {
  flex: 0 0 auto;
}
#view-wayback #wayback-view-home.is-wb-list .wbm-hero {
  justify-content: flex-start;
  padding: 26px 24px 34px;
}
#view-wayback #wayback-view-home.is-wb-list .wbm-white {
  display: none;
}
@media (max-width: 700px) {
  .wb-search-list { margin-top: 20px; padding: 16px; }
  .wb-s-title { font-size: 15px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .wb-search-list { margin-top: 14px; padding: 12px 16px; }
  .wb-search-list h3 { margin-bottom: 10px; }
  .wb-search-item { margin-bottom: 12px; }
  #view-wayback #wayback-view-home.is-wb-list .wbm-hero { padding: 14px 20px 22px; }
}

/* ============================================================
   视图 1：Archive 首页 —— 下段 35% 白底三列
   ============================================================ */
.wbm-white {
  flex: 1 1 35%;
  min-height: 0;
  background: #ffffff;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  overflow: hidden;
}
.wbm-cols {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 34px;
}
.wbm-col { min-width: 0; }

/* ① 档案馆图标 + 归档量宣言
   这一列不让压缩：宣言必须整行读得完，被挤成「…被归／档！」很难看 */
.wbm-col-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.wbm-col-left svg {
  width: 64px; height: 64px;
  stroke: #3a3a3a; fill: none; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.wbm-col-left p {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  color: #2b2b2b;
  white-space: nowrap;
}

/* ② 计划简介 */
.wbm-col-mid {
  flex: 1 1 auto;
  max-width: 440px;
}
.wbm-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: #4a4a4a;
}

/* ③ 四项馆藏数据（2×2），宽度由内容撑开，不跟着压缩 */
.wbm-col-right { flex: 0 0 auto; }
.wbm-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}
.wbm-stats li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: #3d3d3d;
  white-space: nowrap;
}
.wbm-stats svg {
  width: 17px; height: 17px;
  stroke: #666; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* 中宽窗口（约 960–1200）：三列按比例收，字号同步收，别让中栏被挤成一条 */
@media (max-width: 1200px) {
  .wbm-cols { gap: 24px; }
  .wbm-col-left svg { width: 54px; height: 54px; }
  .wbm-col-left p { font-size: 13.5px; }
  .wbm-col-mid { max-width: 400px; }
  .wbm-intro { font-size: 13.5px; line-height: 1.75; }
  .wbm-stats { gap: 12px 12px; }
  .wbm-stats li { font-size: 13px; gap: 7px; }
  .wbm-stats svg { width: 15px; height: 15px; }
}

/* 矮屏（笔记本合上小窗 / 768 高度档）：黑区字号往下压，白区不变形 */
@media (max-height: 720px) and (min-width: 961px) {
  .wbm-brand { font-size: 38px; }
  .wbm-hero-search { margin-top: 18px; }
  .wbm-hero-search input { padding: 11px 14px; }
  .wbm-col-left svg { width: 48px; height: 48px; }
  .wbm-col-left p { font-size: 13px; margin-top: 10px; }
  .wbm-intro { font-size: 13px; line-height: 1.7; }
  .wbm-stats { gap: 10px 10px; }
  .wbm-stats li { font-size: 12.5px; }
}

/* 窄屏（≤960）：65/35 塞不下三列，改整页滚动 + 两段各自自适应高度 */
@media (max-width: 960px) {
  #view-wayback #wayback-view-home { overflow-y: auto; }
  .wbm-top { flex: 0 0 auto; height: auto; min-height: 320px; }
  .wbm-hero { padding: 24px 20px 30px; }
  .wbm-brand { font-size: clamp(26px, 7vw, 38px); }
  .wbm-hero-search { margin-top: 20px; }
  /* 窄屏黑区变矮，提示条回到正常流里，免得压住搜索框 */
  .wbm-search-msg { position: static; margin-top: 12px; padding: 0; }
  .wbm-white { flex: 0 0 auto; padding: 34px 22px 40px; }
  .wbm-cols {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    max-width: 560px;
  }
  .wbm-col-left { flex: none; }
  .wbm-col-mid { flex: none; max-width: 100%; text-align: center; }
  .wbm-col-right { flex: none; width: 100%; max-width: 330px; }
}

/* 极窄（手机横屏约 640 高）：只留最小可读字号 */
@media (max-width: 620px) {
  .wbm-nav { gap: 16px; padding: 11px 16px; }
  .wbm-nav-icons { gap: 14px; }
  .wbm-nav-icons svg:nth-child(n+4) { display: none; }
  .wbm-white { padding: 28px 18px 34px; }
  .wbm-intro { font-size: 13px; }
  .wbm-col-left p { font-size: 13.5px; }
}

/* ============================================================
   视图 2：日历页
   ============================================================ */
.wbm-cal-nav {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 22px;
}
.wbm-cal-search { flex: 1; max-width: 480px; }
.wbm-cal-search input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 13px;
  color: #222;
  outline: none;
}
.wbm-cal-search input:focus { border-color: #e03e2d; }
.wbm-donate {
  border: none;
  border-radius: 3px;
  background: #e03e2d;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 12px;
  padding: 9px 20px;
  cursor: pointer;
}
.wbm-donate:hover { background: #c93322; }

.wbm-cal-body { padding: 26px 30px 44px; color: #222; }
.wbm-saved { font-size: 15px; color: #333; margin-bottom: 20px; }

/* 年份柱状时间轴 */
.wbm-timeline {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 82px;
  max-width: 900px;
  border-bottom: 1px solid #ddd;
}
.wbm-bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.wbm-bar {
  width: 72%;
  background: #cfcfcf;
  border-radius: 2px 2px 0 0;
  cursor: default;
}
.wbm-bar-col:hover .wbm-bar { background: #b5b5b5; }
.wbm-bar.hi { background: #ffd43b; }
.wbm-bar.hi { cursor: pointer; }
.wbm-bar-col:hover .wbm-bar.hi { background: #f0b429; }
.wbm-bar-year {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
  height: 14px;
  font-variant-numeric: tabular-nums;
}

/* 12 个月日历网格 */
.wbm-cal-grid {
  margin-top: 24px;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 28px;
}
.wbm-month h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #222; }
.wbm-wk {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-bottom: 3px;
}
.wbm-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 3px;
}
.wbm-day {
  font-style: normal;
  font-size: 13px;
  color: #444;
  text-align: center;
  width: 22px;
  height: 22px;
  line-height: 22px;
  justify-self: center;
  position: relative;
}
/* 有快照的日期：浅蓝圆圈 */
.wbm-day.snap {
  border-radius: 50%;
  background: #cfe0f5;
  color: #1c3d6e;
}
/* 关键快照（各年份的「主快照日」）：可点击 + 悬停提示框 */
.wbm-day.target {
  cursor: pointer;
  font-weight: 700;
  background: #a9c8ef;
}
.wbm-day.target:hover { background: #8db6ea; }
.wbm-day.target::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 30;
}
.wbm-day.target:hover::after { opacity: 1; }

/* ============================================================
   视图 3：快照页（顶部回溯条 + 各年份的粉丝站 / 工作室官网）
   ============================================================ */
#view-wayback #wayback-view-snapshot {
  display: flex;
  flex-direction: column;
}
.wbm-retro-bar {
  flex: none;
  background: #000;
  color: #e8e8e8;
  font-family: "Times New Roman", serif;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #333;
}
.wbm-retro-bar b { color: #ffd43b; }
#wbBackBtn {
  background: #1a1a1a;
  color: #eee;
  border: 1px solid #444;
  border-radius: 3px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
}
#wbBackBtn:hover { border-color: #888; color: #fff; }
.wbm-snapshot-body { flex: 1; overflow-y: auto; background: #000; }

/* ============================================================
   插件安装系统 / 初始流程
   ============================================================ */

/* 未安装 LinkWriter 时，隐藏所有需要插件的入口 */
body:not(.plugin-on) [data-requires-plugin] { display: none !important; }

/* 安装完成后侧栏入口淡入 */
body.plugin-on [data-requires-plugin] { animation: sideReveal 0.3s ease both; }
@keyframes sideReveal {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

/* 安装链接的“已安装”状态 */
.chat-link.installed { color: #14a06a; cursor: default; }
.chat-link.installed:hover { color: #14a06a; text-decoration: none; }

/* ---------- 蓝屏特效：打字机逐字输出 + 终端光标 ---------- */
.bsod {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0000AA;
  color: #ffffff;
  font-family: monospace;
  display: flex;
  align-items: center;
  padding: 0 9vw;
  animation: bsodIn 0.07s steps(1);
  transition: opacity 0.34s ease;   /* 时长与 JS 的 BSOD_FADE_MS 对应 */
}
@keyframes bsodIn { from { opacity: 0.55; } }

/* 淡出：JS 加 .bsod-out，等 transition 走完再挂 .hidden */
.bsod.bsod-out { opacity: 0; pointer-events: none; }

.bsod-inner { width: 100%; }

/* 打字机文本容器：换行符直接生效，光标跟着最后一个字符走 */
#blue-screen-text {
  font-family: 'DotGothic16', 'Courier New', monospace;
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.35);
}

/* 终端光标：实心方块，常驻在文字末尾 */
.bsod-cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.18em;
  background: #ffffff;
  animation: bsodBlink 1s steps(1, end) infinite;
}

@keyframes bsodBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 尊重系统的“减少动态效果”设置：跳过闪入/淡出，光标仍会闪 */
@media (prefers-reduced-motion: reduce) {
  .bsod { animation: none; transition-duration: 0.01s; }
}

/* ============================================================
   写稿页面（LinkWriter —— A4 纸式文档编辑器）
   ------------------------------------------------------------
   外层极浅灰，中间一张纯白 A4 纸（直角、无圆角），上下留白 ≥40px。
   纸内是纵向 Flex：上（正文）/ 中（关键词）/ 下（提交），
   用 space-between 把三段撑开，纸最小高度 800px。
   ============================================================ */
.write-module {
  /* “桌面”：统一的冷蓝灰，比纸面暗一档，纸才浮得起来。
     刻意不叠渐变色 —— 桌面越平，纸的边框与投影越真。 */
  background: #e2e6ec;
  padding: 40px 24px;
  overflow: hidden;
}

/* ---------- 舞台：左侧竖排圆形切稿按钮 + 中间 A4 纸 ----------
   横向 Flex：按钮列 44px · 间距 26px · 纸 840px，整组居中。
   右侧再补一块与按钮列等宽的占位块（::after），
   这样「居中」指的是纸本身居中，纸不会被左侧按钮挤偏。
   纸里的工具栏/A4 白纸都还是原来那套，一行没动。 */
.write-stage {
  --wt-tab-size: 44px;
  --wt-tab-gap: 26px;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--wt-tab-gap);
}
.write-stage::after {
  content: '';
  flex: 0 0 var(--wt-tab-size);
  width: var(--wt-tab-size);
}

/* ---------- 那张 A4 纸 ---------- */
.write-canvas {
  flex: 0 1 840px;
  min-height: 0;
  width: min(840px, 100%);
  margin: 0;
  padding: 0;
  background: #fcfbfa;                   /* 微暖的纸白，不再是刺眼的纯白 */
  border: 1px solid #d1d5db;             /* 纸边比桌面深一档，边界才立得住 */
  border-radius: 0;
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ---------- 卡片顶部：工具栏（滚动时吸顶） ---------- */
.write-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  padding: 0 48px;
  background: #f3f4f6;                       /* 比纸面深一档：它是一条独立的工具条，不是纸上画的线 */
  border-bottom: 1px solid #e5e7eb;          /* 清晰的分割线，把工具条与正文切开 */
  border-radius: 0;
}
.write-doc-name {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #1f2328;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.write-doc-name span { color: #a3a9b4; font-weight: 400; }

/* 内容滚到工具栏下面时，给一条极淡的投影，避免正文被“切一半”的突兀感 */
.write-topbar.is-stuck {
  box-shadow:
    0 10px 16px -14px rgba(16, 24, 40, 0.5),
    0 1px 0 rgba(16, 24, 40, 0.04);
  border-bottom-color: #dde2e9;
}

/* 工具栏下沿再垫一小段同色渐隐，让被压住的文字淡出而不是被切成半行 */
.write-topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 20px;
  background: linear-gradient(to bottom, #f3f4f6 0%, #f3f4f6 38%, rgba(243, 244, 246, 0) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.write-topbar.is-stuck::after { opacity: 1; }

.write-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.write-tool {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 12px;
  color: #4a5158;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.write-tool:hover { background: #e5e9ef; color: #111; }   /* 在灰条上要“按得下去”，不能和底色糊平 */
.write-tool.strong { font-weight: 800; }
.write-tool.italic { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.write-tool.underline { text-decoration: underline; }
.write-divider { width: 1px; height: 15px; background: #d7dce4; margin: 0 4px; }
.write-status {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ffffff;             /* 灰条上的一枚白胶囊，像贴在工具条上的标签 */
  font-size: 12.5px;
  color: #8b93a1;
}

/* ---------- 三篇稿件的切换按钮（A4 纸左侧，竖排正圆） ----------
   1 / 2 / 3 三个 44px 正圆：当前这篇深紫实心白字，写过的白底灰字，
   没解锁的置灰虚线圆 + 小锁。竖排、在纸外左侧空白处、整列垂直居中。 */
.w-draft-tabs {
  flex: none;
  width: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.w-draft-tab {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e3e7ee;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);   /* 一枚落在桌面的实体圆钮，不是画上去的圈 */
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.w-draft-tab:hover:not(:disabled) {
  background: #f5f1fd;
  border-color: #d6cdf2;
  color: #4c32a0;
  transform: translateY(-1px);
}
.w-draft-tab:active:not(:disabled) { transform: translateY(0); }
.w-draft-tab:focus-visible {
  outline: 2px solid rgba(94, 63, 190, 0.5);
  outline-offset: 3px;
}
/* 已经解锁、但当前不在这一篇：白底灰字 */
.w-draft-tab.is-done {
  background: #ffffff;
  border-color: #dfe4ec;
  color: #6b7280;
}
/* 正在编辑的这一篇：深紫实心 + 白字（在冷灰桌面上要压得住，所以比原来再深一档） */
.w-draft-tab.is-active {
  background: #4c32a0;
  border-color: #4c32a0;
  color: #ffffff;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 7px 16px -9px rgba(76, 50, 160, 0.55);
}
.w-draft-tab.is-active:hover {
  background: #3f2987;
  border-color: #3f2987;
  color: #ffffff;
}
/* 未解锁：数字在上、小锁在下，都收在圆里，不会挤到相邻按钮 */
.w-draft-tab.is-locked {
  flex-direction: column;
  gap: 2px;
  background: #f7f8fb;
  border-style: dashed;
  border-color: #e1e6ee;
  color: #b0b9c6;
  cursor: not-allowed;
  box-shadow: none;
}
.w-draft-tab.is-locked .w-tab-num { font-size: 13px; }

.w-tab-num { position: relative; z-index: 1; }

.w-tab-lock {
  display: none;
  width: 13px;
  height: 13px;
  pointer-events: none;
}
.w-tab-lock svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #aeb7c4;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.w-draft-tab.is-locked .w-tab-lock { display: block; }

/* ---------- 纸张内容区：上（正文）/ 中（调查结果）/ 下（提交）自上而下排列 ----------
   原来是 space-between：纸被 flex:1 拉高后，多余的高度被平均塞进两处段间距，
   正文和调查结果之间、调查结果和提交按钮之间各被撑出上百像素的空洞。
   改成 flex-start 后所有段落按 gap 依次往下贴，多余高度全部留到纸的下边缘。 */
.doc-page {
  width: 100%;
  flex: 1 0 auto;
  min-height: 800px;              /* A4 纸的最低高度，窗口再高就继续拉伸 */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  margin: 0;
  padding: 24px 48px 22px;
  background: #fcfbfa;            /* 与纸面同色：doc-page 铺满画布，纸色统一在这一层 */
  border-radius: 0;
  box-shadow: none;
}

/* 上段：标题 + 副标题 + 正文 */
.doc-top {
  display: block;
}

/* 窗口不够高时（<1100px 视口），800px 会把提交区顶到纸外、还多出一截无谓滚动。
   这种情况下改为「跟随内容收缩」，纸永远不会溢出。 */
@media (max-height: 1100px) {
  .doc-page { min-height: 0; }
}

/* 层级：标题 24 / 副标题 13 / 正文 16 */
.w-title {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.42;
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.2px;
}

/* ---------- 动态副标题 ----------
   内容由 js 按当前稿件已填词汇的正负分改写：>0 澄清 / 温情、<0 吃瓜 / 阴谋、
   =0 中立。三档只换颜色不换字号，行高固定，切换时不会顶动下面的正文。 */
.w-subtitle {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.66;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #6a717d;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    color 320ms ease;
  will-change: opacity, transform;
}
.w-subtitle.is-out {
  opacity: 0;
  transform: translateY(-3px);
}

/* 正负比三档：类由 js 在每次增删词后切换（正>负 绿 / 负>正 红 / 持平灰） */
.w-subtitle.subtitle-positive { color: #10b981; font-weight: bold; }
.w-subtitle.subtitle-negative { color: #ef4444; font-weight: bold; }
.w-subtitle.subtitle-neutral  { color: #64748b; font-weight: bold; }

/* 第四态（仅第 3 篇挂上【真正的恶魔】）：标题被这一件事接管，颜色最重 */
.w-subtitle[data-tone="truth"] { color: #a11414; font-weight: 700; }

/* 换上真结局标题的那一刻，红色轻微亮一下再落回暗红 */
.w-subtitle.is-pulse { animation: subTruthPulse 1200ms ease-out 1; }
@keyframes subTruthPulse {
  0%   { color: #e02424; text-shadow: 0 0 12px rgba(224, 36, 36, 0.28); }
  38%  { color: #e02424; text-shadow: 0 0 8px rgba(224, 36, 36, 0.16); }
  100% { color: #a11414; text-shadow: none; }
}

/* 系统开了减少动效就直接换字，不做淡入淡出 */
@media (prefers-reduced-motion: reduce) {
  .w-subtitle { transition: none; }
  .w-subtitle.is-out { opacity: 1; transform: none; }
  .w-subtitle.is-pulse { animation: none; }
}
.w-meta {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #8b93a1;
}
.w-meta b { color: #5e3fbe; font-weight: 700; }

.doc-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
  outline: none;
  white-space: normal;
}
.doc-body p { margin: 0 0 9px; text-indent: 2em; }
.doc-body p:last-child { margin-bottom: 0; }

/* ---------- 填空处 ---------- */
.w-slot {
  display: inline-block;
  margin: 0 2px;
  padding: 0 2px;
  font-size: 16px;
  line-height: 1.6;
  text-indent: 0;
  color: #b3bac5;                        /* 未填：浅灰 */
  border-bottom: 1.5px solid #d7dce4;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.w-slot:hover {
  color: #5e3fbe;
  border-bottom-color: #b3a0e6;
  background: #f8f5ff;
}
.w-slot:focus-visible {
  outline: 2px solid #c3b6ea;
  outline-offset: 2px;
}
.w-slot.filled {
  color: #1e3a8a;                        /* 填词后：深蓝加粗 */
  font-weight: 700;
  border-bottom-color: #1e3a8a;
  background: transparent;
}

/* 隐藏词条【真正的恶魔】：被追加到正文末尾的收尾句 */
.w-demon-line {
  margin: 4px 0 0;
  padding: 6px 12px;
  border-left: 3px solid #e88074;
  border-radius: 0 6px 6px 0;
  background: #fff7f6;
  color: #7a2e26;
  font-size: 15px;
  line-height: 1.8;
  text-indent: 0;
}
.w-demon-word { font-weight: 700; color: #b42318; }

/* ---------- 素材库（同一张纸内，紧凑胶囊 · 左 vs 右） ----------
   嵌在纸面上的一只“素材抽屉”：极淡灰底 + 8px 圆角 + 一圈细边，
   让它退下去一层，而不是和空白纸面糊在一起。
   原本这里用 -17px 的上下负外边距去抵消内边距（space-between 时代为了保持
   “三段位置零位移”）。现在改成 flex-start 自上而下排，负外边距反而会把
   抽屉向上压 1px 盖住正文末尾，所以归零，段间距交给 .doc-page 的 gap。 */
.w-materials {
  margin: 0;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.w-mat-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}
.w-mat-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: #2f3641;                 /* 深灰而非纯黑：压在灰底上更稳，也不抢正文 */
  letter-spacing: 0.2px;
}

.w-mat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 一行一组对立词：左词 — or — 右词，整组居中，与下方的隐藏词条、提交按钮同一条竖轴 */
.w-pair {
  display: grid;
  grid-template-columns: 168px 44px 168px;
  justify-content: center;
  align-items: center;
}
.w-pair .w-chip:first-child { justify-self: end; }
.w-pair .w-chip:last-child { justify-self: start; }
/* 同一列统一宽度：四个词的左右边缘各自对齐，读起来像一张对照表 */
.w-pair .w-chip { width: 168px; max-width: 100%; }
.w-or {
  text-align: center;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.3px;
  color: #b9c0cb;
  user-select: none;
}

/* 胶囊标签：宽度随文字，不再是占满整行的长条 */
.w-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  max-width: 100%;
  padding: 4px 15px;
  border: 1px solid #e2e6ee;
  border-radius: 999px;
  background: #ffffff;
  color: #3d4450;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease,
              box-shadow 0.15s ease;
}
.w-chip:hover {
  border-color: #b9a6ee;
  color: #5e3fbe;
  background: #faf8ff;
  box-shadow: 0 2px 8px -4px rgba(94, 63, 190, 0.5);
}
.w-chip:focus-visible {
  outline: 2px solid #c3b6ea;
  outline-offset: 1px;
}

.w-chip-tick { display: none; font-size: 10px; line-height: 1; color: #5e3fbe; }
.w-chip-count { font-size: 12px; color: #8b93a1; }
.w-chip-count:empty { display: none; }   /* 空占位会让 flex gap 多出一段空隙 */

/* 四个槽位已满：没被用到的词灰掉，点了只给提示 */
.w-chip.is-full {
  border-color: #e7eaef;
  background: #eef1f5;             /* 在灰底面板上要“陷下去”，不能是第二层近白 */
  color: #aab1bb;
}
.w-chip.is-full:hover {
  border-color: #e7eaef;
  background: #eef1f5;
  color: #aab1bb;
  box-shadow: none;
}
.w-chip.is-full .w-chip-tick { color: #b6bcc6; }
.w-chip.is-full .w-chip-count { color: #b6bcc6; }

/* 已在稿件里出现过：显示勾，颜色交给左右两列各自的绿 / 红 */
.w-chip.is-used .w-chip-tick { display: inline; }

/* ---------- 左右两列：左=绿（克制叙述） · 右=红（煽情传闻） ---------- */
.w-chip.keyword-pos:hover,
.w-chip.keyword-pos.selected {
  border-color: #10b981;
  color: #10b981;
  background: #ffffff;
  box-shadow: none;
}
.w-chip.keyword-pos .w-chip-tick,
.w-chip.keyword-pos .w-chip-count { color: #10b981; }
.w-chip.keyword-pos:focus-visible { outline: 2px solid #a7e8ce; outline-offset: 1px; }

.w-chip.keyword-neg:hover,
.w-chip.keyword-neg.selected {
  border-color: #ef4444;
  color: #ef4444;
  background: #ffffff;
  box-shadow: none;
}
.w-chip.keyword-neg .w-chip-tick,
.w-chip.keyword-neg .w-chip-count { color: #ef4444; }
.w-chip.keyword-neg:focus-visible { outline: 2px solid #f7c0bd; outline-offset: 1px; }

/* ---------- 第九个词：真正的恶魔（分割线下方，单独居中，无任何说明文字） ---------- */
.w-hidden-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e7eaef;   /* 抽屉底色变深了，分割线也跟着深一档才看得见 */
}
.w-chip.is-demon { min-width: 118px; padding: 5px 15px; }

/* 已解锁：纯黑底 · 白字 · 黑边（hover / 选中保持同一副面孔） */
.w-chip.is-demon.unlocked,
.w-chip.is-demon.unlocked:hover,
.w-chip.is-demon.unlocked:focus-visible {
  border-color: #000000;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
  outline: none;
}
.w-chip.is-demon.unlocked .w-chip-tick,
.w-chip.is-demon.unlocked .w-chip-count { color: #ffffff; }

/* ---------- 未解锁（字母态）：只显示大写字母，置灰、not-allowed ---------- */
/* 字母态收窄成小方块，居中落在各自的列里：一眼就知道「这格还没内容」 */
.w-pair .w-chip.is-locked {
  width: auto;
  justify-self: center;
}
.w-chip.is-locked,
.w-chip.is-locked:hover,
.w-chip.is-locked:focus-visible {
  min-width: 58px;
  padding: 4px 12px;
  border: 1px dashed #e0e5ec;
  background: #f2f4f7;             /* 比面板再沉一点的留白格，未解锁一眼可见 */
  color: #bcc3ce;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-indent: 1.5px;                    /* 抵消末字后的字距，字母视觉居中 */
  box-shadow: none;
  outline: none;
  cursor: not-allowed;
}

/* 被封死的第九个词：不是「还没收集到」，而是「还不到知道的时候」。
   三个问号散得开一点，落在分割线下面像一行被涂掉的标题。 */
.w-chip.is-sealed,
.w-chip.is-sealed:hover,
.w-chip.is-sealed:focus-visible {
  min-width: 74px;
  color: #948da3;
  letter-spacing: 4px;
  text-indent: 4px;
  background: #f3f1f6;
}
.w-chip.is-locked .w-chip-tick,
.w-chip.is-locked .w-chip-count { display: none; }

/* ---------- 纸面最底部：警告 + 居中提交 ----------
   不再被 space-between 钉在纸的最底端，改为紧随调查结果之下：
   .doc-page 的 gap 16px + 这里的 24px = 与上方抽屉之间 40px 的呼吸感。 */
.w-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  padding: 4px 0 0;
  background: transparent;
}
.w-warn {
  font-size: 12px;
  line-height: 1.5;
  color: #d92d20;
  text-align: center;
}
.w-warn:empty { display: none; }

.w-submit {
  padding: 9px 36px;
  border-radius: 999px;
  background: #5e3fbe;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px -10px rgba(94, 63, 190, 0.9);
  transition: background 0.15s ease, transform 0.12s ease;
}
.w-submit:hover { background: #4c32a0; }
.w-submit:active { transform: translateY(1px); }

/* ---------- 预览态：这篇已经见报了 ----------
   同一张纸、同一个位置，只是把编辑器收起来：素材库、提交区、
   格式工具全部不显示，正文换成一篇成稿，末尾一行灰色署名。 */
.write-module.is-preview .w-materials,
.write-module.is-preview .w-foot,
.write-module.is-preview .write-tools { display: none; }

.write-module.is-preview .doc-body { color: #2f3338; }
.write-module.is-preview .doc-body p { margin-bottom: 12px; }

.write-module.is-preview .write-status {
  margin-left: auto;          /* 格式工具收起来后，状态自己顶到右端 */
  background: #eef7f1;
  color: #2f7d4f;
}

/* 末尾那行灰字：右对齐、不缩进，像编辑部盖的一行小注 */
.doc-body .w-published-note {
  margin: 22px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #a2a9b4;
  text-align: right;
  text-indent: 0;
  letter-spacing: 0.2px;
}

/* 已发布的稿子，在切稿圆钮右下点一个小绿点：
   一眼分清「写过但没发」和「已经发出去了」 */
.w-draft-tab.is-published::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px #ffffff;
}
.w-draft-tab.is-active.is-published::after {
  box-shadow: 0 0 0 2px #4c32a0;
}

/* ---------- 窄窗口 ---------- */
@media (max-width: 900px) {
  .write-module { padding: 18px 14px; }
  /* 宽度不够并排放「按钮列 + 840 纸」了：按钮改成纸上方一横排 */
  .write-stage { flex-direction: column; gap: 12px; }
  .write-stage::after { display: none; }
  .w-draft-tabs {
    width: auto;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }
  .write-stage > .write-canvas { flex: 1 1 auto; width: 100%; }
  .doc-page { padding: 22px 26px 20px; }
  .write-topbar { padding: 0 26px; gap: 10px; }
  .w-title { font-size: 21px; }
  .w-subtitle { font-size: 13.5px; }
  .doc-body { font-size: 15px; }
  .w-pair { grid-template-columns: 156px 26px 156px; }
  .w-pair .w-chip { width: 156px; }
  .w-chip { padding: 5px 11px; font-size: 13px; }
}

/* ---------- 矮窗口：再收一档，尽量让正文与素材同屏 ---------- */
@media (max-height: 820px) {
  .doc-page { padding: 20px 40px 18px; gap: 16px; }
  .w-subtitle { margin-bottom: 8px; }
  .w-meta { margin-bottom: 10px; }
  .doc-body p { margin-bottom: 8px; }
  .w-mat-head { margin-bottom: 6px; }
  .w-mat-list { gap: 4px; }
  .w-chip { padding: 4px 12px; }
}

/* ============================================================
   星标收藏（所有浏览器 / 时光机网页通用）
   ============================================================ */

/* 星标挂在模块层（不在滚动容器内），因此始终停在内容区右上角 */
.browser-module { position: relative; }

.page-star {
  position: absolute;
  top: 24px;
  right: 26px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px rgba(23, 26, 33, 0.16), 0 6px 16px rgba(23, 26, 33, 0.12);
  color: #8b929e;
  z-index: 25;
  transition: transform 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.page-star svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill 0.16s ease, stroke 0.16s ease;
}
.page-star:hover {
  color: #f5b301;
  transform: scale(1.16);
  box-shadow: 0 2px 5px rgba(23, 26, 33, 0.18), 0 10px 22px rgba(245, 179, 1, 0.26);
}
.page-star:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}
.page-star.on { color: #f5b301; }
.page-star.on svg { fill: #f5b301; stroke: #eda900; }
.page-star.pop { animation: starPop 0.3s ease; }

/* 内置手册的锁定星标：永远是实心金色，hover 不放大（点击只会弹提示） */
.page-star.locked { color: #f5b301; cursor: default; }
.page-star.locked svg { fill: #f5b301; stroke: #eda900; }
.page-star.locked:hover {
  transform: none;
  color: #f5b301;
  cursor: default;
  box-shadow: 0 1px 3px rgba(23, 26, 33, 0.16), 0 6px 16px rgba(245, 179, 1, 0.18);
}

/* 搜索结果页的星标：内联在统计行右端，24×24、无底、细线空心 */
.page-star.is-inline {
  position: static;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #7f8794;
}
.page-star.is-inline svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}
.page-star.is-inline:hover {
  transform: none;
  background: none;
  box-shadow: none;
  color: #f5b301;
}
.page-star.is-inline:active { transform: scale(0.94); }
.page-star.is-inline:focus-visible {
  outline: 1px solid rgba(201, 162, 39, 0.9);
  outline-offset: 3px;
  border-radius: 4px;
}

@keyframes starPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 页面顶部导航给星标让出位置，避免遮住“Sign in / 个人中心” */
.imdb-page .imdb-nav { padding-right: 68px; }

/* ============================================================
   资料库（收藏夹）
   ============================================================ */

#view-library { padding: 0; background: #f7f7fb; }

.library-shell {
  position: relative;          /* 阅读态绝对定位盖在网格之上 */
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f7fb;
}

.library-head {
  flex: none;
  padding: 30px 34px 16px;
  border-bottom: 1px solid #ececf3;
}
.library-head h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #171a21;
}
.library-head p {
  margin-top: 6px;
  font-size: 12.5px;
  color: #8b909c;
  min-height: 18px;
}

.library-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 34px 40px;
}

/* 卡片网格 */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* 单张收藏卡片 */
.bm-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  background: #fff;
  border: 1px solid #ececf3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 26, 33, 0.05), 0 3px 10px rgba(23, 26, 33, 0.05);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.bm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23, 26, 33, 0.16);
}
.bm-card:active { transform: translateY(-2px); }
.bm-card:focus-visible {
  outline: 2px solid #b9a8ea;
  outline-offset: 2px;
}

/* 上半部分：模拟截图（页面主色渐变 + 大图标） */
.bm-thumb {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
/* 顶部一层柔光，避免纯色块显得死板 */
.bm-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.28), transparent 62%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.14) 100%);
  pointer-events: none;
}
.bm-icon {
  position: relative;
  z-index: 1;
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}

/* 下半部分：标题 + 站点 */
.bm-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bm-info b {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: #171a21;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bm-info small {
  font-size: 12px;
  color: #a2a8b4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 手册卡片左上角的角标 */
.bm-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  /* 角标是「新手指南」四个字，任何时候都得横着排：容器一窄就折行，
     折出来的两行会盖住缩略图中央的图标。PC 卡片最窄 200px、
     角标只有 67px，这条在 PC 上不改变任何一个像素。 */
  white-space: nowrap;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(4px);
}

/* 内侧一圈淡绿描边，把“官方文档”和普通网页区分开 */
.bm-card--doc { box-shadow: 0 1px 2px rgba(16, 185, 129, 0.12), 0 3px 12px rgba(16, 185, 129, 0.14); }
.bm-card--doc:hover { box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28); }

/* 空态 */
.library-empty {
  padding: 90px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.library-empty svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #c9c3dd;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.library-empty p {
  font-size: 13px;
  line-height: 1.9;
  color: #9aa0ad;
  max-width: 440px;
}

/* ============================================================
   资料库 · 阅读态（LinkWriter 内部手册）
   ------------------------------------------------------------
   点开手册卡片后，同一块区域盖上一层纸面文档：
   顶部常驻「返回 / 星标」，正文独立滚动。
   ============================================================ */

.library-reader {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  background: #f7f7fb;
  animation: readerIn 0.24s ease both;
}
@keyframes readerIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部工具条 ---------- */

.ld-bar {
  flex: none;
  height: 58px;
  padding: 0 26px 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #ececf3;
}

.ld-back {
  height: 32px;
  padding: 0 13px 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #5b6070;
  background: #f2f3f8;
  transition: background 0.16s ease, color 0.16s ease;
}
.ld-back:hover { background: #e8eaf2; color: #2f3444; }
.ld-back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ld-bar-title {
  margin-right: auto;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #a4aab6;
}

/* 星标改为随排布走，稳稳停在右上角 */
.ld-bar .page-star {
  position: relative;
  top: auto;
  right: auto;
  flex: none;
  width: 30px;
  height: 30px;
  box-shadow: 0 1px 3px rgba(23, 26, 33, 0.12);
}
.ld-bar .page-star svg { width: 18px; height: 18px; }

/* ---------- 正文滚动区 ---------- */

.ld-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 0 56px;
}

/* ---------- 文档纸面 ---------- */

.tdoc {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 38px 28px;
  background: #fff;
  border: 1px solid #ececf3;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(23, 26, 33, 0.05), 0 14px 40px rgba(23, 26, 33, 0.08);
}

/* 抬头：绿色标记 + 部门名 + 密级 */
.tdoc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid #10b981;
}
.tdoc-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #12c98d, #059669);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.tdoc-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.tdoc-brand-txt b { font-size: 13px; color: #171a21; }
.tdoc-brand-txt small { font-size: 12px; color: #9aa0ad; letter-spacing: 0.16em; }
.tdoc-secret {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #a35a5a;
  background: #fdf3f3;
  border: 1px solid #f5dcdc;
}

.tdoc-title {
  margin-top: 22px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: #10131a;
}
.tdoc-sub {
  margin-top: 8px;
  font-size: 14px;
  color: #9098a6;
}

/* 文档信息条 */
.tdoc-meta {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 13px 16px;
  background: #f8fafb;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  list-style: none;
}
.tdoc-meta li { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tdoc-meta b { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: #a6acb8; }
.tdoc-meta span {
  font-size: 14px;
  font-weight: 600;
  color: #343a46;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 欢迎语 */
.tdoc-lead {
  margin-top: 22px;
  padding-left: 14px;
  border-left: 3px solid #10b981;
  font-size: 16px;
  line-height: 2.2;
  color: #454b59;
}

/* 小节标题 */
.tdoc-h2 {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #171a21;
}
.tdoc-h2 i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f9c72;
  background: #e8f8f2;
  border-radius: 5px;
  padding: 3px 6px;
}
.tdoc-h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #e8ebf0, rgba(232, 235, 240, 0));
}

/* 功能说明列表 */
.tdoc-list { margin-top: 4px; list-style: none; }
.tdoc-item {
  display: flex;
  gap: 13px;
  padding: 15px 2px;
  border-bottom: 1px solid #f2f4f7;
}
.tdoc-item:last-child { border-bottom: none; }
.tdoc-ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  background: #f4f6f9;
}
.tdoc-item[data-tone="indigo"] .tdoc-ico { background: #eef1ff; }
.tdoc-item[data-tone="blue"]   .tdoc-ico { background: #e9f3ff; }
.tdoc-item[data-tone="amber"]  .tdoc-ico { background: #fff4e3; }
.tdoc-item[data-tone="green"]  .tdoc-ico { background: #e6f9f0; }
.tdoc-item[data-tone="purple"] .tdoc-ico { background: #f2edff; }
.tdoc-item[data-tone="slate"]  .tdoc-ico { background: #eef2f5; }

.tdoc-txt { min-width: 0; }
.tdoc-txt b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1b2029;
}
.tdoc-txt p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 2;
  color: #6b7280;
  text-indent: 0;
}

/* 「线索提取」提示块：浅蓝底 + 左侧竖线，强调但不抢正文 */
.tdoc-txt .tdoc-note {
  margin-top: 8px;
  padding: 8px 11px;
  border-left: 3px solid #93b4f5;
  border-radius: 0 7px 7px 0;
  background: #f4f7ff;
  font-size: 14.5px;
  line-height: 2;
  color: #4b5563;
}
/* 覆盖 .tdoc-txt b 的 display:block，让加粗词留在句子里 */
.tdoc-txt .tdoc-note b {
  display: inline;
  font-size: inherit;
  font-weight: 600;
  color: #2f4f8f;
}

/* 小贴士 */
.tdoc-tips { margin-top: 8px; list-style: none; }
.tdoc-tips li {
  position: relative;
  padding-left: 18px;
  margin-top: 9px;
  font-size: 15px;
  line-height: 2;
  color: #6b7280;
}
.tdoc-tips li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
}

.tdoc-foot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px dashed #e8ebf0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #aab0bc;
}

@media (max-width: 980px) {
  .library-head { padding: 24px 22px 14px; }
  .library-body { padding: 18px 22px 32px; }
  .library-grid { gap: 16px; }

  .ld-bar { padding: 0 18px 0 14px; }
  .ld-bar-title { display: none; }
  .ld-scroll { padding-top: 18px; }
  .tdoc { width: calc(100% - 32px); padding: 26px 22px 22px; }
  .tdoc-title { font-size: 24px; }
  .tdoc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   资讯浏览器 · 首页（现代新闻门户）
   ============================================================ */

/* 首页自己管理内边距，去掉浏览器的 16px 内容留白 */
.browser-module.is-home .browser-content { padding: 0; }

#browser-content-area > .news-home {
  min-height: 100%;
  background: #fff;
  color: #1f2329;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部吸顶导航 ---------- */
.news-home .nh-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #ececf3;
}

.news-home .nh-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 58px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.news-home .nh-logo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #171a21;
  cursor: pointer;
  user-select: none;
}
.news-home .nh-logo::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #5e3fbe, #9d7bea);
  transform: rotate(45deg);
}
.news-home .nh-logo:hover { color: #5e3fbe; }

.news-home .nh-cats {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
}
.news-home .nh-cat {
  position: relative;
  padding: 19px 0;
  font-size: 13.5px;
  color: #5a606d;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.news-home .nh-cat:hover { color: #171a21; }
/* 未开放频道（社会 / 科技 / 娱乐 / 游戏）：点不开，就别伸出手指。
   权重 (0,4,0) 压过上面的 :hover，悬停前后文字颜色一点都不变。 */
.news-home .nh-cat:not(.active) {
  cursor: default;
}
.news-home .nh-cat:not(.active):hover {
  color: #5a606d;
}
.news-home .nh-cat.active { color: #171a21; font-weight: 700; }
.news-home .nh-cat.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11px;
  height: 2px;
  border-radius: 2px;
  background: #5e3fbe;
}

/* 从浏览工具条搬进来的搜索框 */
.news-home .nh-nav-actions {
  margin-left: auto;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-home .nh-nav-actions .addr-wrap {
  flex: none;
  width: 236px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f2f3f7;
  border: 1px solid transparent;
}
.news-home .nh-nav-actions .addr-wrap:focus-within {
  background: #fff;
  border-color: #c7b6f2;
}
.news-home .nh-nav-actions .addr-wrap input {
  padding: 0;
  font-size: 13px;
  background: none;
}
.news-home .nh-nav-actions .addr-wrap svg { width: 15px; height: 15px; }
.news-home .nh-nav-actions .accent-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

/* ---------- 两栏主体 70 / 30 ---------- */
.news-home .nh-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 32px 60px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 36px;
}

.news-home .nh-main { min-width: 0; }

/* ---------- 头条 ---------- */
.news-home .nh-hero {
  cursor: pointer;
  outline: none;
  /* 摘要与阅读数据已移除，用 margin-bottom 给大图与下方列表之间留出呼吸空间
     （列表自身的 margin-top 让位，避免相邻外边距合并把间距吃掉） */
  margin-bottom: 28px;
}

.news-home .nh-hero-cover {
  position: relative;
  height: 232px;
  padding: 24px 26px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(135deg, #2b1d5c 0%, #5e3fbe 52%, #9d7bea 100%);
  box-shadow: 0 10px 26px rgba(94, 63, 190, 0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-home .nh-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 255, 255, 0.30), transparent 46%),
    radial-gradient(circle at 10% 96%, rgba(255, 255, 255, 0.16), transparent 44%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 9px);
}
.news-home .nh-hero:hover .nh-hero-cover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(94, 63, 190, 0.28);
}

.news-home .nh-chip {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(4px);
}

.news-home .nh-hero-title {
  position: relative;
  z-index: 2;
  max-width: 92%;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}
.news-home .nh-hero:hover .nh-hero-title { text-decoration: underline; text-underline-offset: 5px; }

.news-home .nh-hero-sub {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

/* 首页列表里的可点击条目（张文举那条八卦稿） */
.news-home .nh-item.is-link { cursor: pointer; }
.news-home .nh-item.is-link:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 新闻列表 ---------- */
.news-home .nh-list {
  margin-top: 0;   /* 与头条的间距统一由 .nh-hero 的 margin-bottom 控制 */
  border-top: 1px solid #f0f1f5;
}
.news-home .nh-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f1f5;
  cursor: pointer;
}
.news-home .nh-thumb {
  flex: none;
  width: 112px;
  height: 74px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}
.news-home .nh-item-text { min-width: 0; }
.news-home .nh-item-text h3 {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #171a21;
  transition: color 0.15s ease;
}
.news-home .nh-item:hover .nh-item-text h3 { color: #5e3fbe; }
.news-home .nh-item-text p {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #8b909c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-home .nh-item-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #b0b5c0;
}
.news-home .nh-item-meta i { font-style: normal; color: #dcdfe6; }

/* ---------- 右栏 ---------- */
.news-home .nh-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.news-home .nh-panel {
  background: #fafafc;
  border: 1px solid #f0f1f5;
  border-radius: 12px;
  padding: 15px 15px 10px;
}
.news-home .nh-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.news-home .nh-panel-head h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #171a21;
}
.news-home .nh-panel-head span { font-size: 12px; color: #b0b5c0; }

.news-home .nh-rank { list-style: none; }
.news-home .nh-rank li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 0;
  border-top: 1px solid #f1f2f6;
  font-size: 12.5px;
  line-height: 1.6;
  color: #3a3f4a;
  cursor: pointer;
}
.news-home .nh-rank li:first-child { border-top: none; }
.news-home .nh-rank b {
  flex: none;
  width: 15px;
  font-size: 12px;
  font-weight: 700;
  color: #c3c8d2;
  font-variant-numeric: tabular-nums;
}
.news-home .nh-rank li:nth-child(1) b { color: #e5484d; }
.news-home .nh-rank li:nth-child(2) b { color: #f08a24; }
.news-home .nh-rank li:nth-child(3) b { color: #d9a300; }
.news-home .nh-rank li:hover span { color: #5e3fbe; }

.news-home .nh-like { display: flex; flex-direction: column; }
.news-home .nh-like-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #f1f2f6;
  cursor: pointer;
}
.news-home .nh-like-item:first-child { border-top: none; }
.news-home .nh-like-thumb {
  flex: none;
  width: 46px;
  height: 36px;
  border-radius: 6px;
  background-size: cover;
}
.news-home .nh-like-item span:last-child {
  font-size: 12.5px;
  line-height: 1.55;
  color: #3a3f4a;
}
.news-home .nh-like-item:hover span:last-child { color: #5e3fbe; }

/* ---------- 折叠条目：只是展示位，没有可点的去处 ----------
   cursor 一律回到普通箭头（!important 是为了压过 .nh-item / .nh-rank li /
   .nh-like-item 自带的 cursor: pointer），悬停也不再变色、不再出下划线 ——
   鼠标一划过就变紫才是“点得开”的暗示，这里不需要。 */
.news-home [data-fold] {
  cursor: default !important;
}
.news-home .nh-item[data-fold]:hover .nh-item-text h3 {
  color: #171a21;
  text-decoration: none;
}
.news-home .nh-rank li[data-fold]:hover span {
  color: #3a3f4a;
}
.news-home .nh-like-item[data-fold]:hover span:last-child {
  color: #3a3f4a;
  text-decoration: none;
}

/* ---------- 右栏：最后浏览（记录最近访问的 3 个详情页） ---------- */
.news-home .news-side-card {
  background: #ffffff;
  border: 1px solid #f0f1f5;
  border-radius: 12px;
  padding: 15px 15px 9px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 10px 22px -18px rgba(16, 24, 40, 0.3);
}
.news-home .news-side-card .nh-panel-head { margin-bottom: 4px; }

.news-home .nr-list {
  display: flex;
  flex-direction: column;
}

.news-home .nr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3a3f4a;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.news-home .nr-item:hover { background: #f4f5f8; color: #5e3fbe; }
.news-home .nr-item:focus-visible {
  outline: 2px solid #c3b6ea;
  outline-offset: 1px;
}

.news-home .nr-icon {
  flex: none;
  font-size: 12px;
  line-height: 1;
  opacity: 0.85;
}

/* 标题过长省略号截断（flex 子项必须 min-width:0 才生效） */
.news-home .nr-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.news-home .nr-empty {
  padding: 3px 8px 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #b0b5c0;
}

/* ---------- 窄屏降级 ---------- */
@media (max-width: 900px) {
  .news-home .nh-nav-inner { padding: 0 20px; gap: 16px; }
  .news-home .nh-cats { display: none; }
  .news-home .nh-nav-actions .addr-wrap { width: 168px; }
  .news-home .nh-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px 20px 44px;
  }
  .news-home .nh-hero-cover { height: 190px; padding: 18px 20px; }
  .news-home .nh-hero-title { font-size: 22px; }
  .news-home .nh-thumb { width: 92px; height: 64px; }
}

/* 浏览器工具条上的「回首页」按钮 */
.browser-bar .bar-home {
  flex: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.browser-bar .bar-home svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.browser-bar .bar-home:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: #2a2a2a;
}
.browser-bar .bar-home:active { transform: scale(0.96); }

/* 工具条纵向居中（地址栏是自动高度，按钮需要单独对齐） */
.browser-bar { align-items: center; }
.browser-bar .bar-home { align-self: center; }

/* 中等窗口：头条标题缩一档，避免只剩一个字换行 */
@media (max-width: 1100px) {
  .news-home .nh-hero-title { font-size: 21.5px; }
  .news-home .nh-hero-cover { height: 208px; }
  .news-home .nh-nav-actions .addr-wrap { width: 200px; }
}

/* ============================================================
   时光机 · 汉化后的排版微调
   ============================================================ */

/* 中文站名不需要伪斜体，靠字距撑出标识感 */
.wbm-logo {
  font-style: normal;
  font-size: 14.5px;
  letter-spacing: 3px;
}
.wbm-logo.dark { font-style: normal; letter-spacing: 2px; }

/* 红色艺术字：中文用倾斜 + 硬阴影做出 Logo 质感 */
.wbm-brand {
  display: inline-block;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Source Han Sans SC", "Segoe UI", sans-serif;
  font-size: 48px;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 6px;
  padding-left: 6px;            /* 抵消末字多出的字距，保持视觉居中 */
  transform: skewX(-7deg);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

/* 中文按钮字距不要拉太开 */
.wbm-hero-search button { letter-spacing: 3px; padding: 0 24px; font-size: 13.5px; }
.wbm-donate { letter-spacing: 2px; }

/* 中文说明行需要更宽松的行高 */
.wbm-col-left p { font-size: 13.5px; }

/* 月份 / 星期：中文字符在 22px 格子里需要略小一档 */
.wbm-month h4 { font-size: 14px; letter-spacing: 1px; }
.wbm-wk { font-size: 12px; }

/* 中文保存提示里的数字保持等宽、加重 */
.wbm-saved b { font-weight: 700; color: #111; font-variant-numeric: tabular-nums; }

/* 快照回溯条的中文日期更显眼 */
.wbm-retro-bar b { font-weight: 700; letter-spacing: 0.5px; }

@media (max-width: 1080px) {
  .wbm-brand { font-size: 42px; letter-spacing: 5px; padding-left: 5px; }
}

/* ============================================================
   LinkWriter 自动翻译提示（首次进入资讯浏览器）
   ------------------------------------------------------------
   定位上下文：.browser-module（position: relative）
   位置：浏览器窗口内容区顶部居中，absolute + translateX(-50%)
   ============================================================ */

.translate-tip {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(432px, calc(100% - 40px));
  padding: 12px 12px 12px 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.08),
    0 16px 36px rgba(15, 23, 42, 0.22);
  animation: ttDropIn 0.34s cubic-bezier(0.22, 0.85, 0.3, 1.12);
}

/* 首页有 58px 吸顶站内导航，让开它，避免遮住分类与搜索框 */
.browser-module.is-home .translate-tip { top: 80px; }

/* 其余页面有 67px 浏览器工具条，同样让开 */
.browser-module:not(.is-home) .translate-tip { top: 86px; }

.translate-tip.hidden { display: none !important; }

/* 淡出：0.3s 透明度渐变后再切到 display:none */
.translate-tip.tt-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes ttDropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateX(-50%); }
}

/* 地球图标 */
.tt-globe {
  flex: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #efe9fd, #ddcffa);
  font-size: 15px;
  line-height: 1;
  user-select: none;
}

.tt-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: #3a3f4a;
}
.tt-text b {
  color: #5e3fbe;
  font-weight: 700;
}

.tt-ok {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #ddd7f0;
  background: #f6f3fd;
  color: #5e3fbe;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.tt-ok:hover { background: #ece5fb; border-color: #c9b8f2; }
.tt-ok:active { transform: scale(0.97); }
.tt-ok:focus-visible { outline: 2px solid #b9a8ea; outline-offset: 2px; }

/* 窄窗口：仍保持居中，只收窄留白 */
@media (max-width: 560px) {
  .translate-tip { max-width: calc(100% - 24px); gap: 10px; }
  .browser-module.is-home .translate-tip { top: 14px; }
}

/* ---------- 首页软锁提示：translate-tip 的「只读一句话」变体 ----------
   壳子完全沿用上面那套（白底、圆角、投影、ttDropIn 落下、tt-out 淡出、
   首页 80px / 其他页 86px 的让位），只补两条必须补的：

     1) pointer-events: none —— 它正压在首页内容上方，而这时玩家本来就
        还想点点别的新闻。不设成 none，那条 432px 宽的浮条就会变成一块
        吃点击的死区。
     2) z-index: 200 —— 原先 100，提示是「此刻最该被看见的一句」，
        抬到浏览器工具条之上更稳。

   右内边距比原版收 2px：原版右侧留白是给「知道了」按钮的，
   这里没有按钮，照留会显得右边空一块。 */
.soft-lock-tip {
  z-index: 200;
  pointer-events: none;
  padding-right: 14px;
}

/* ---------- 时光机输入框：浅色页面里必须是白底深字 ---------- */
.wbm-hero-search input,
.wbm-cal-search input {
  background: #fff;
  color: #222;
}
.wbm-hero-search input::placeholder,
.wbm-cal-search input::placeholder {
  color: #9a9a9a;
}
.wbm-cal-search input:focus { border-color: #e03e2d; }

/* ============================================================
   dilidili 视频页（B 站风格 · 浅色）
   ------------------------------------------------------------
   整页纯白、内容居中单列（最大 1000px）：
       标题 → 播放器 → 操作栏 → 用户信息 → 简介
   没有搜索框、没有右侧推荐栏；播放键只切图标，页面上没有任何解谜提示。
   ============================================================ */
#browser-content-area > .bili-page {
  min-height: calc(100% + 32px);
  margin: -16px;                       /* 吃掉 .browser-content 的 16px 内边距，整页铺白 */
  background: #ffffff;
  color: #18191c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航：只剩 Logo 与头像，两端对齐 ----------
   粉色品牌条：与 dilidili 的标志色同源，Logo 反白，
   底部那条线换成同色系深一档的粉，只做“收边”，不抢画面。 */
.bili-nav {
  height: 56px;
  background: #fb7299;
  border-bottom: 1px solid #e85c85;
}
.bili-nav-inner {
  max-width: 1000px;                   /* 与下方单列内容同宽，Logo 与正文左边缘对齐 */
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;                     /* 搜索框已去掉，右侧不再给收藏星标让位，左右对称 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bili-logo {
  flex: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;                      /* 粉底上反白，Logo 从“彩色标题”变成“品牌压印” */
  user-select: none;
}
.bili-user { flex: none; display: flex; align-items: center; margin-right: 40px; }
/* 上一行的 40px 不是随手加的：右上角那颗全局收藏星标（.page-star，right:26 + 32 宽）
   是绝对定位挂在模块层上的，会压在页面右上角。头像往左让出这条通道，
   既不会和星标叠在一起，Logo 也仍然贴着正文左边缘。 */
.bili-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  /* 粉底上如果还是粉渐变会直接糊进背景，所以改用同色系里深一档的粉：
     一来从背景里浮得出来，二来和右上角那颗【白色】收藏星标区分开 ——
     底色若改成纯白，窄屏（星标会压到头像上沿）两个白圆会连成一片。 */
  background: #e8507d;
}

/* ---------- 单列主体：子元素自上而下依次堆叠 ---------- */
.bili-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: stretch;                /* 每块都通栏，宽度由 max-width + padding 控制 */
}
.bili-title {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 600;
  color: #18191c;
}
.bili-meta { margin-top: 8px; font-size: 13.5px; color: #9499a0; }   /* 与标题之间留 8px */

/* ---------- 播放器：单列里始终 16:9，宽度自适应窗口 ---------- */
.bili-player {
  width: 100%;
  max-width: 100%;
  margin-top: 24px;                    /* 与上方标题/播放量拉开，别贴在一起 */
}
.bili-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;                /* 宽度变、比例不变，画面不会被拉扁 */
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 舞台里将来若放真 <video>（同一套外壳复用），一律等比装进 16:9 的框，
   不拉伸、不裁切，手机上竖拍的素材也不会被压扁 */
.bili-stage video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000000;
}
/* 真视频：等比装进 16:9 黑框，不拉伸、不裁切。
   .bili-stage .bili-video 比 .bili-stage video 更具体，
   将来若别的页面在舞台里放 <video>，这条只作用于 dilidili 的两个视频页 */
.bili-stage .bili-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 奥普拉页的视频外壳：宽度封顶 800，左右居中，底色纯黑，
   顶部同样留 24px，跟 .bili-player 保持一致（该页是 4:3，用不了 .bili-stage） */
.video-oprah-wrap { display: block; }
.bili-main > .video-oprah-wrap { margin: 24px auto 0; }
/* 全屏（原生控制条自带，这条兜住舞台自身被推进全屏的情况）：
   16:9 的比例交给视口，圆角与留白一并收掉 */
.bili-stage:fullscreen,
.bili-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  padding-top: 0;
  border-radius: 0;
}
/* 兜底：极老的浏览器不认 aspect-ratio 时，用内边距撑出同样的 16:9 盒子 */
@supports not (aspect-ratio: 16 / 9) {
  .bili-stage { height: 0; padding-top: 56.25%; }
  .bili-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .bili-play:hover { transform: translate(-50%, -50%) scale(1.06); }
  .bili-play:active { transform: translate(-50%, -50%) scale(0.97); }
}
.bili-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  transition: transform 0.16s ease;
}
.bili-play:hover { transform: scale(1.06); }
.bili-play:active { transform: scale(0.97); }
.bili-play svg { display: block; margin-left: 3px; }      /* 三角形视觉居中 */
.bili-play.is-playing svg { margin-left: 0; }
.bili-play:focus-visible { outline: 2px solid #fb7299; outline-offset: 3px; }

.bili-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  color: #ffffff;
  font-size: 12.5px;
}
.bili-time { flex: none; opacity: 0.92; font-variant-numeric: tabular-nums; }
.bili-progress {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.34);
}
.bili-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: #fb7299;
}
.bili-ctl {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  opacity: 0.88;
  cursor: pointer;
}
.bili-ctl:hover { opacity: 1; }

/* ---------- 播放器下方操作栏 ---------- */
.bili-actions { display: flex; gap: 26px; margin-top: 14px; }
.bili-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #61666d;
  cursor: pointer;
  transition: color 0.15s ease;
}
.bili-act:hover { color: #fb7299; }
.bili-act-icon { font-size: 15px; line-height: 1; }

/* ---------- 视频简介：可收集词条藏在这段话里 ---------- */
.bili-desc {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f2f3;
  font-size: 15px;
  line-height: 1.8;
  color: #61666d;
  overflow-wrap: break-word;
}

/* ---------- 用户信息：原来在右侧栏，现在落在操作栏与简介之间 ---------- */
.bili-up {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;                    /* 与上方点赞栏拉开一档距离 */
  padding: 12px 14px;
  border: 1px solid #e3e5e7;
  border-radius: 8px;
  background: #ffffff;
}
.bili-up-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dfe2e8, #c7ccd4);
}
.bili-up-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bili-up-name {
  font-size: 14px;
  font-weight: 600;
  color: #18191c;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bili-up-sub { font-size: 13px; color: #9499a0; }

/* ---------- 窄窗口：单列本身就能自适应，只需把内边距收紧 ---------- */
@media (max-width: 720px) {
  .bili-nav-inner { padding: 0 16px; gap: 12px; }
  .bili-main { padding: 16px 16px 32px; }
  .bili-user { margin-right: 46px; }   /* 窄屏两侧内边距变小，星标通道要相应加宽，否则头像会蹭到星标 */
}

/* ============================================================
   时光机 · 年份快选（2001 / 2002）
   ============================================================ */
.wbm-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  max-width: 900px;
}
.wbm-year {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 98px;
  padding: 8px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background: #fafafa;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wbm-year b {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  font-variant-numeric: tabular-nums;
}
.wbm-year span { font-size: 13px; color: #8a8a8a; }
.wbm-year:hover { border-color: #b9b9b9; background: #f1f1f1; }
.wbm-year.active { border-color: #111; background: #ffd43b; }
.wbm-year.active span { color: #6b5900; }

/* 快照页改成「回溯条固定 + 内容区独立滚动」，长页面不会把顶部工具条带走 */
#view-wayback #wayback-view-snapshot {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#view-wayback #wayback-view-snapshot .wbm-snapshot-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

/* ============================================================
   快照 2001 —— 与 2005 同构的骨架，质感退回 2001
   ------------------------------------------------------------
   顶部导航条 + 左侧栏 + 右侧主区，和 2005 一样的分栏逻辑；
   但深蓝底、生硬白色方块、双层粗边框、表格化帖子列表，
   没有任何圆角 / 阴影 / 渐变。
   ============================================================ */
#view-wayback .wayback-screen.snap-2001 {
  min-height: 100%;
  padding: 0;
  background: #0b3b62;
  color: #000000;
  font-family: "SimSun", "Songti SC", "Microsoft YaHei", serif;
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- 顶部导航条：右侧给收藏星标留 68px ---------- */
.fs01-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 40px;
  padding: 0 68px 0 8px;
  background: #0b3b62;
  border-bottom: 3px double #7fa8c9;
}
.fs01-logo {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  white-space: nowrap;
}
.fs01-logo span {
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #b9cde0;
}
.fs01-topright { display: flex; align-items: center; gap: 8px; }

.fs01-search {
  display: inline-flex;
  align-items: stretch;
  height: 19px;
  overflow: hidden;
  border: 1px solid #000000;
  background: #ffffff;
  cursor: default;
}
.fs01-search-txt {
  width: 88px;
  padding: 0 4px;
  font-size: 12.5px;
  line-height: 17px;
  color: #8a8a8a;
  white-space: nowrap;
}
.fs01-search-btn {
  padding: 0 6px;
  border-left: 1px solid #000000;
  background: #c0c0c0;
  color: #000000;
  font-size: 12.5px;
  line-height: 17px;
}
.fs01-login { font-size: 12.5px; color: #cfdcea; white-space: nowrap; }
.fs01-login .fs01-a { color: #ffe066; }

/* ---------- 面包屑：白底窄条 ---------- */
.fs01-crumb {
  padding: 4px 68px 4px 8px;
  border-top: 1px solid #7fa8c9;
  border-bottom: 2px solid #0b3b62;
  background: #ffffff;
  font-size: 12.5px;
  color: #555555;
}
.fs01-crumb b { font-weight: 700; color: #000080; }

/* ---------- 两栏：左栏白块 + 6px 双层粗边框分割 ---------- */
.fs01-body {
  display: flex;
  align-items: flex-start;
  padding: 8px 60px 10px 8px;
}
.fs01-side {
  flex: 0 0 208px;
  min-width: 0;
  padding: 5px;
  border: 2px solid #0b3b62;
  border-right: 0;
  background: #ffffff;
}
.fs01-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 5px;
  border: 2px solid #0b3b62;
  /* 左右两栏之间这条 5px 实心深蓝，是 2001 年最典型的硬分割线 */
  border-left: 5px solid #0b3b62;
  background: #ffffff;
}

/* ---------- 左栏小方框 ---------- */
.fs01-box {
  margin-bottom: 5px;
  border: 1px solid #0b3b62;
}
.fs01-box-h {
  padding: 2px 0 3px;
  background: #0b3b62;
  color: #ffffcc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
}
.fs01-box-b { padding: 4px 5px 5px; }

.fs01-sitebtn {
  display: block;
  padding: 4px 0;
  border: 1px solid #000040;
  background: #000080;
  color: #ffffff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}
.fs01-info p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: #222222;
}
.fs01-counter {
  display: inline-block;
  padding: 0 3px;
  background: #000000;
  color: #33ff33;
  font-family: "Courier New", monospace;
  font-size: 12.5px;
  letter-spacing: 2px;
}

.fs01-navlist { list-style: none; }
.fs01-navlist li {
  padding: 1px 0;
  font-size: 13px;
  line-height: 1.5;
}
.fs01-small p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #333333;
}

.fs01-badges { margin: 0; }
.fs01-badge {
  display: inline-block;
  width: 88px;
  height: 31px;
  margin: 0 3px 3px 0;
  border: 1px solid #000000;
  background: #c0c0c0;
  color: #000000;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  line-height: 31px;
  text-align: center;
}
.fs01-badge.is-gray { background: #c0c0c0; }

/* ---------- Banner：深蓝方块 + 内层细框，居中宋体大字 ---------- */
.fs01-banner {
  margin-bottom: 5px;
  padding: 4px;
  border: 2px solid #000000;
  background: #0b3b62;
  color: #ffffff;
  text-align: center;
}
.fs01-banner-inner {
  padding: 7px 8px 8px;
  border: 1px solid #7fa8c9;
}
.fs01-banner-kicker {
  margin: 0 0 3px;
  font-size: 12.5px;
  letter-spacing: 2px;
  color: #ffe066;
}
.fs01-banner-title {
  margin: 0 0 4px;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 3px;
  color: #ffffff;
}
.fs01-banner-sub {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: #c9dcec;
}

/* ---------- 老式表格：直角、细内线、灰表头、深蓝标题条 ---------- */
.fs01-tbl {
  width: 100%;
  margin-bottom: 5px;
  border-collapse: collapse;
  border: 2px solid #0b3b62;
  background: #ffffff;
  font-size: 13.5px;
}
.fs01-tbl th,
.fs01-tbl td {
  padding: 3px 5px;
  border: 1px solid #96a6b6;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}
.fs01-tbl th {
  background: #d7dee5;
  color: #000000;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}
.fs01-tbl .fs01-th-bar {
  border: 1px solid #0b3b62;
  background: #0b3b62;
  color: #ffffcc;
  letter-spacing: 4px;
}

.fs01-th-role { width: 30%; }
.fs01-th-ep { width: 27%; }
.fs01-role { background: #f2f4f6; font-weight: 700; }
.fs01-note { font-size: 12.5px; color: #c00000; }
.fs01-notice-td {
  padding: 4px 8px;
  background: #ffffcc;
  font-size: 13px;
  line-height: 1.65;
}

/* ---------- 帖子列表：表头 + 大号加粗标题 ---------- */
.fs01-th-title { width: 66%; }
.fs01-th-author { width: 18%; }
.fs01-th-date { width: 16%; }
.fs01-pt {
  margin: 0;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #000080;
}
.fs01-pt-body {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #222222;
}
.fs01-author {
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}
.fs01-author i {
  font-style: normal;
  font-size: 12.5px;
  color: #666666;
}
.fs01-date {
  font-size: 12.5px;
  color: #444444;
  white-space: nowrap;
  text-align: center;
}

/* 假链接：蓝 / 紫，带下划线，不接行为 */
.fs01-a {
  color: #0000cc;
  text-decoration: underline;
  text-underline-offset: 1px;
  cursor: default;
}
.fs01-a.is-visited { color: #800080; }

/* 闪烁 NEW!：只此一处，纯装饰 */
.fs01-new {
  color: #cc0000;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
  animation: fs01Blink 1s steps(1, end) infinite;
}
@keyframes fs01Blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.fs01-foot {
  padding: 6px 68px 8px 8px;
  border-top: 3px double #7fa8c9;
  background: #0b3b62;
  text-align: center;
  font-size: 12.5px;
  color: #b9cde0;
}
/* ---------- 窄窗口：快照正文收边距 ---------- */
@media (max-width: 1000px) {
  .fs01-body { padding-right: 54px; }
  .fs01-side { flex-basis: 190px; }
  .fs01-search-txt { width: 76px; }
}

@media (max-width: 900px) {
  .fs01-body { padding: 6px 46px 8px 6px; }
  .fs01-side { flex-basis: 172px; }
  .fs01-main { border-left-width: 4px; }
  .fs01-banner-title { font-size: 18px; letter-spacing: 2px; }
  .fs01-pt { font-size: 14px; }
  .fs01-th-title { width: 62%; }
}

/* ---------- 手机横屏 / 窄屏：2001 快照正文提前，左栏折到下面 ----------
   横屏可用高度只有 320 - 400px，先让玩家看到 Banner 和帖子列表，
   左栏的小方框（资料 / 计数 / 导航）顺着往下排。 */
@media (max-width: 720px) {

  /* 2001：正文提前、左栏垫底，双层边框改成横向分割 */
  .fs01-topbar { height: 36px; padding: 0 70px 0 6px; }
  .fs01-logo { font-size: 15px; }
  .fs01-logo span { display: none; }
  .fs01-search { display: none; }
  .fs01-crumb { padding: 4px 70px 4px 6px; }
  .fs01-body {
    flex-direction: column;
    padding: 6px 8px 8px;
  }
  .fs01-main {
    order: 1;
    width: 100%;
    border-left: 2px solid #0b3b62;
    border-top: 5px solid #0b3b62;
  }
  .fs01-side {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    border-right: 2px solid #0b3b62;
    border-top: 0;
  }
  .fs01-banner-title { font-size: 16px; letter-spacing: 1px; }
  .fs01-pt { font-size: 13.5px; }
  .fs01-pt-body { font-size: 13px; }
  .fs01-th-title { width: 58%; }
  .fs01-author { width: 22%; }
  .fs01-foot { padding: 6px 70px 8px 6px; }
}

/* ============================================================
   小屏桌面：把宽度让给阅读区
   ------------------------------------------------------------
   窗口本体封顶 1100px，所以 1366 / 1280 这类屏幕上真正挤的是窗口内部。
   这里只缩左边两条固定栏，不动右侧阅读区的任何字号：
     导航 70 → 60、联系人 300 → 240，正文净多出约 70px；
     邮件侧栏与联系人栏统一到 240，两个模块的栏宽不再一宽一窄。
   下限写 981px：比它更窄的屏由下面那套 980 降级规则接管。
   本块放在所有模块基础样式之后，否则会被后声明的 width 覆盖。
   ============================================================ */

@media (min-width: 981px) and (max-width: 1400px) {
  #rail { width: 60px; }
  .chat-contacts { width: 240px; }
  .mail-side { width: 240px; }

  /* 正文留白的地板：新闻原文本身有 56px，这里只补窄的那几处，
     任何宽度下正文都不会贴到窗口边缘。 */
  .sr-page { padding-left: 8px; padding-right: 8px; }
}

/* ============================================================
   小屏高度：把纵向空间还给阅读区
   ------------------------------------------------------------
   1366×768 / 1280×720 这类笔记本上，85vh 会把窗口压到 650px 左右，
   首屏只够看半篇文章。这里做三件事：
     · 取消 85vh 的上限，改用 95vh 兜底；
     · 给窗口一个 600px 的内容地板，不再继续把内容压扁；
     · 窗口改为正常文档流 + 上下 24px 留白（圆角 / 描边 / 投影原样保留，
       悬浮质感不变）；屏幕真装不下 600px 时，让 body 出现纵向滚动条，
       而不是把界面塞进一个死高度里。
   只在桌面宽度（≥981px）生效，手机横屏仍走下面那套整窗铺满。
   ============================================================ */

@media (min-width: 981px) and (max-height: 800px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* 绝对定位 + translate(-50%,-50%) 的元素一旦高过视口，
     顶部会被裁掉且无法滚动；改成文档流后才能整体滚出来。 */
  #layout {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    height: calc(100vh - 48px);
    min-height: 600px;
    max-height: 95vh;
    margin: 24px auto;
  }

  /* 极端矮屏下 body 会出现滚动条，顺手也收成细条 */
  html::-webkit-scrollbar,
  body::-webkit-scrollbar { width: 6px; }
  html::-webkit-scrollbar-track,
  body::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 999px;
  }
}

/* ============================================================
   移动端适配（手机横屏）
   ------------------------------------------------------------
   设计前提：手机横屏的可视高度通常只有 320~430px，所以统一用
   `(orientation: landscape) and (max-height: 500px)` 作为「手机横屏」
   的判定条件——桌面浏览器窗口压到 500px 以下也会走这套紧凑布局，
   结果同样是可用的，不会出错。

   分三段：
     1. 全局：禁止双击缩放、竖屏黑色遮罩
     2. 手机横屏：整窗铺满 + 各模块收窄 + 隐藏滚动条
     3. 触屏（hover:none）：给所有关键控件补 :active 反馈
   删除方式：本段 CSS + index.html 的 #rotateHint / #chatBack + JS 第十一节。
   ============================================================ */

/* ---------- 1. 全局 ---------- */

/* 手指点击立即响应，不再等待 300ms 双击判定，也不会误触放大 */
body { touch-action: manipulation; }

/* 聊天返回按钮：只在窄屏横屏出现，桌面/平板完全不可见 */
.chat-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4b5160;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chat-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-back:active { background: #f1f2f7; }

/* 竖屏遮罩：默认不存在，只有手机竖屏才出现 */
.rotate-hint { display: none; }

@media (orientation: portrait) and (max-width: 768px) {
  html, body { overflow: hidden; overscroll-behavior: none; }

  .rotate-hint {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 26px;

    background: #000000;
    color: #ffffff;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Microsoft YaHei", "PingFang SC", sans-serif;

    /* 吃掉所有触摸事件，玩家无法穿透到后面的游戏界面 */
    touch-action: none;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
  }

  .rotate-hint-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
  }

  .rotate-hint-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 26px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.92;
    animation: rotateHintPhone 2.6s ease-in-out infinite;
  }

  .rotate-hint-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.02em;
  }

  .rotate-hint-sub {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.42);
  }
}

@keyframes rotateHintPhone {
  0%, 18%   { transform: rotate(0deg); }
  55%, 100% { transform: rotate(-90deg); }
}

/* ---------- 2. 手机横屏：整窗铺满 ---------- */

@media (orientation: landscape) and (max-height: 500px) {

  html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* 取消居中悬浮窗，直接吃满可视区域；--app-vh 由 JS 跟 visualViewport 同步，
     键盘弹出时整窗跟着变矮，输入框不会被挡在屏幕外 */
  #layout {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100vw;
    height: var(--app-vh, 100vh);
    min-height: 0;          /* 覆盖小屏高度那套 600px 地板，否则会顶出视口 */
    max-width: none;
    max-height: none;
    margin: 0;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* 左侧导航压到 50px，图标跟着缩 */
  #rail { width: 50px; }
  .rail-center { gap: 6px; }
  .rail-btn { width: 36px; height: 36px; border-radius: 10px; }
  .rail-btn svg { width: 18px; height: 18px; }
  .rail-btn.active::before { left: -4px; width: 2px; height: 16px; }
  .rail-foot { bottom: 6px; }
  .rail-badge { padding: 2px 5px; border-radius: 5px; font-size: 11px; }

  /* 隐藏自定义滚动条，保留原生惯性滑动 */
  #layout, #layout * { scrollbar-width: none; }
  #layout *::-webkit-scrollbar { width: 0; height: 0; display: none; }

  /* ---------- 实时通讯 ---------- */
  .chat-contacts { width: 220px; }
  .contacts-head { padding: 12px 12px 8px; }
  .contacts-head h2 { margin-bottom: 8px; font-size: 16px; }
  .contacts-search { padding: 0 9px; border-radius: 8px; }
  .contacts-search input { padding: 7px 0; font-size: 16px; }   /* 16px 防 iOS 聚焦缩放 */
  .contact { gap: 9px; padding: 8px; border-radius: 10px; }
  .contact-list { padding: 4px 6px 10px; }
  .avatar { width: 34px; height: 34px; font-size: 13px; }

  .chat-head { height: 50px; gap: 8px; padding: 0 12px; }
  .chat-head .avatar { width: 30px; height: 30px; font-size: 12px; }
  .chat-log { gap: 8px; padding: 12px 14px; }
  .msg { max-width: 84%; padding: 9px 12px; font-size: 14px; line-height: 1.6; }
  .chat-input {
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .chat-input input { padding: 9px 12px; font-size: 16px; }
  .chat-input button { min-height: 40px; padding: 0 16px; font-size: 14px; }

  /* ---------- 收件箱 ---------- */
  .mail-side { width: 140px; padding: 12px 8px; }
  .mail-side-head { padding: 0 4px 10px; }
  .mail-side-head h2 { font-size: 16px; }
  .mail-side-head p { font-size: 11.5px; }
  .mail-nav-item { gap: 8px; padding: 8px; font-size: 12.5px; }
  .mail-main { min-width: 0; }
  .mail-list { width: 190px; padding: 10px 8px; }
  .mail-item { padding: 10px; }
  .mail-pane-head { flex-wrap: wrap; gap: 4px; padding: 12px 14px 8px; }
  .mail-pane-head h3 { font-size: 15px; }
  .mail-form { padding: 6px 14px 12px; }
  .mail-field input,
  .mail-field textarea { font-size: 16px; }
  .mail-reader, .mail-attach-body { padding: 14px 16px 22px; }
  .mail-send { min-height: 42px; padding: 0 22px; }

  /* ---------- 资料库 ---------- */
  .library-head { padding: 12px 16px 10px; }
  .library-head h1 { font-size: 18px; }
  .library-head p { margin-top: 3px; font-size: 12.5px; }
  .library-body { padding: 12px 16px 24px; }
  .library-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  /* ---------- 资讯浏览器外壳 ---------- */
  .browser-bar { gap: 8px; padding: 8px 10px; }
  .addr-wrap { gap: 8px; padding: 0 10px; border-radius: 9px; }
  .addr-wrap input { padding: 8px 0; font-size: 16px; }
  .browser-content { padding: 10px; }

  /* ---------- 新闻详情（cnn-news-page）---------- */
  #browser-content-area > .cnn-news-page {
    max-width: none;
    width: calc(100% + 20px);     /* 这一档 .browser-content 的内边距是 10px */
    margin: -10px -10px 0;
    padding: 0 0 20px;
    min-height: calc(100% + 20px);
  }
  .cnn-nav { height: 42px; gap: 8px; padding: 0 10px; }
  .cnn-logo { font-size: 16px; letter-spacing: -0.2px; }
  .cnn-cats { overflow-x: auto; overflow-y: hidden; }
  .cnn-cat { padding: 0 6px; font-size: 12.5px; }
  .cnn-cat.is-active::after { left: 6px; right: 6px; height: 2px; }
  .cnn-nav-right { gap: 8px; padding-right: 42px; }
  .cnn-nav-item { font-size: 12.5px; }
  .cnn-article { padding: 0 15px 28px; }
  .cnn-breadcrumb { gap: 5px; padding-top: 14px; font-size: 12.5px; }
  .cnn-title-wrap { gap: 12px; margin-top: 12px; }
  .cnn-rule { flex-basis: 4px; }
  .cnn-title { font-size: 22px; line-height: 1.26; letter-spacing: -0.3px; }
  .cnn-meta { gap: 8px; margin-top: 12px; padding-bottom: 14px; font-size: 12.5px; }
  .cnn-image { margin: 16px 0 18px; }
  .cnn-ph { height: 150px; }
  .cnn-image figcaption { margin-top: 6px; font-size: 12px; }
  .cnn-content { font-size: 16px; line-height: 1.75; }
  .cnn-content p { margin-bottom: 16px; }
  .cnn-comments { margin-top: 24px; padding-top: 14px; }
  .cnn-comment { padding: 14px 0; }

  /* ---------- 搜索结果（sr-page）---------- */
  .sr-page { max-width: none; padding: 6px 12px 28px; }
  .sr-stats { font-size: 12.5px; }
  .sr-item { padding: 12px 13px; border-radius: 10px; }
  .sr-folded { min-height: 48px; padding: 13px 14px; border-radius: 10px; font-size: 12px; letter-spacing: 1.5px; }
  .sr-url { font-size: 12.5px; }
  .sr-title { font-size: 16px; line-height: 1.45; }
  .sr-snippet { font-size: 14.5px; line-height: 1.7; }

  /* IMDb：同样要抵消现在的 10px 内边距，否则会左右各多出 6px */
  #browser-content-area > .imdb-page {
    margin: -10px;
    min-height: calc(100% + 20px);
  }

  /* 百科页：这一档 .browser-content 的内边距是 10px，负边距跟着收 */
  #browser-content-area > .baike-page {
    margin: -10px;
    min-height: calc(100% + 20px);
  }

  /* ---------- dilidili 视频页 ---------- */
  #browser-content-area > .bili-page { margin: -10px; min-height: calc(100% + 20px); }
  .bili-nav-inner { gap: 10px; padding: 0 12px; }
  .bili-logo { font-size: 16px; }
  .bili-main { padding: 12px; }              /* 本来就是单列，这里只把内边距收紧 */
  .bili-title { font-size: 16px; line-height: 1.4; }
  .bili-meta { margin-top: 6px; font-size: 12.5px; }
  .bili-actions { flex-wrap: wrap; gap: 10px; }
  .bili-up { margin-top: 14px; padding: 10px 12px; }
  .bili-desc { margin-top: 12px; padding-top: 10px; font-size: 12px; line-height: 1.8; }

  /* ---------- 时光机：极端矮窗（手机横屏）放弃 65/35，改整页滚动 ---------- */
  #view-wayback #wayback-view-home { overflow-y: auto; }
  .wbm-top { flex: 0 0 auto; height: auto; min-height: 236px; }
  .wbm-hero { padding: 22px 16px 26px; }
  .wbm-brand { font-size: 30px; }
  .wbm-hero-search { margin-top: 14px; }
  .wbm-search-msg { position: static; margin-top: 8px; padding: 0; }
  .wbm-white { flex: 0 0 auto; padding: 22px 16px 26px; }
  .wbm-cols { flex-direction: column; gap: 18px; max-width: 520px; }
  .wbm-col-left,
  .wbm-col-mid,
  .wbm-col-right { flex: none; max-width: 100%; }
  .wbm-col-left svg { width: 44px; height: 44px; }
  .wbm-col-left p { font-size: 13px; margin-top: 10px; }
  .wbm-intro { font-size: 13px; line-height: 1.7; }
  .wbm-stats { gap: 10px 10px; }
  .wbm-stats li { font-size: 12.5px; }
  .wbm-cal-grid { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }

  /* ---------- 写稿器：A4 纸占满全宽 ---------- */
  .write-module { padding: 0; }
  .write-canvas {
    width: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .write-topbar { height: 42px; gap: 10px; padding: 0 14px; }
  .write-doc-name { font-size: 13px; }
  .write-tools { display: none; }            /* 手机上工具栏意义不大，优先让标题完整 */
  .doc-page { min-height: 0; gap: 12px; padding: 14px 15px 14px; }
  /* 与桌面端同理：负外边距归零，抽屉与正文 / 提交之间的间距只由 gap 决定 */
  .w-materials { margin: 0; padding: 10px 12px; }
  /* 手机：圆形按钮缩到 34px，横排在纸上方，贴着窗口左右各留 12px */
  .write-stage { gap: 10px; }
  .w-draft-tabs { gap: 8px; padding: 10px 12px 0; }
  .w-draft-tab { width: 34px; height: 34px; font-size: 12.5px; border-radius: 50%; }
  .w-draft-tab.is-locked .w-tab-num { font-size: 12px; }
  .w-tab-lock, .w-tab-lock svg { width: 10px; height: 10px; }
  .w-title { font-size: 19px; line-height: 1.36; }
  .w-subtitle { font-size: 13px; line-height: 1.55; margin-bottom: 7px; }
  .w-meta { margin-bottom: 8px; font-size: 12.5px; }
  .doc-body { font-size: 15.5px; line-height: 1.8; }
  .doc-body p { margin-bottom: 8px; }
  .w-mat-list { gap: 4px; }

  /* 关键词按钮自动换行，不撑破纸宽 */
  .w-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px 6px;
    width: 100%;
  }
  .w-pair .w-chip { width: auto; max-width: 46%; }
  .w-chip { min-height: 34px; padding: 7px 12px; font-size: 12.5px; }
  .w-submit { min-height: 44px; padding: 10px 30px; }

  /* ---------- 收藏星标：加大热区，靠边停 ---------- */
  .page-star:not(.is-inline) {
    top: 8px;
    right: 6px;
    width: 40px;
    height: 40px;
  }

  /* 自动翻译提示：手机上改成左右贴边的一条，别把结果/标题整个盖住 */
  .translate-tip {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    transform: none;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
  }
  .translate-tip .tt-ok { flex: none; padding: 5px 12px; font-size: 12px; }
}

/* 极矮的横屏（320px 高，如 iPhone SE）：再压一档，让素材和提交更早露出来 */
@media (orientation: landscape) and (max-height: 360px) {
  .doc-page { gap: 9px; padding: 10px 14px 12px; }
  /* 横屏高度极紧：抽屉负外边距同样归零，间距全交给 9px 的 gap */
  .w-materials { margin: 0; padding: 8px 10px; }
  /* 横屏只剩 300 出头的高度，按钮行再压一档，别把正文挤下去 */
  .write-stage { gap: 7px; }
  .w-draft-tabs { gap: 6px; padding: 6px 10px 0; }
  .w-draft-tab { width: 28px; height: 28px; font-size: 12.5px; }
  .w-draft-tab.is-locked .w-tab-num { font-size: 11.5px; }
  .w-tab-lock, .w-tab-lock svg { width: 9px; height: 9px; }
  .w-title { font-size: 17.5px; }
  .w-subtitle { font-size: 12.5px; line-height: 1.5; margin-bottom: 6px; }
  .doc-body { font-size: 15px; line-height: 1.72; }
  .w-mat-head { margin-bottom: 4px; }
  .w-mat-list { gap: 3px; }
  .w-chip { min-height: 32px; padding: 6px 10px; }
  .w-submit { min-height: 40px; padding: 8px 26px; }
  .cnn-ph { height: 120px; }
}

/* 更窄的横屏（iPhone SE 一类）：中间栏让位，聊天改成一屏一栏 */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 700px) {
  .chat-contacts {
    width: 100%;
    border-right: 0;
  }
  .chat-shell:not(.is-chat-open) .chat-main { display: none; }
  .chat-shell.is-chat-open .chat-contacts { display: none; }
  .chat-shell.is-chat-open .chat-back { display: inline-flex; }

  .mail-side { width: 120px; }
  .mail-list { width: 168px; }
  .cnn-nav-item { display: none; }           /* 顶部导航只留 Logo + 分类 + 登录 */
}

/* ---------- 3. 触屏：补 :active 反馈 ---------- */

@media (hover: none) {
  .rail-btn:active { background: rgba(255, 255, 255, 0.3); color: #fff; }
  .contact:active { background: #ece4ff; }
  .mail-nav-item:active { background: #f2edff; color: #4b2fa8; }
  .bm-card:active { transform: scale(0.99); }
  .sr-item.is-clickable:active { background: rgba(255, 255, 255, 0.09); }
  .w-chip:active:not(.is-locked) { background: #f2edff; border-color: #c9b8f2; }
  .w-submit:active,
  .mail-send:active,
  .chat-input button:active { transform: scale(0.97); }
  .page-star:active { transform: scale(0.92); }
  .nh-hero:active,
  .bm-card:active,
  .contact:active { opacity: 0.94; }
}

/* ============================================================
   可收集关键词（collectible-keyword）
   ------------------------------------------------------------
   详情页正文里那些能被收进写稿器素材库的短语：
   只靠「蓝色 + 加粗」在正文里立住 —— 没有底色、没有内边距、
   没有圆角，读起来就是一句被标蓝的原文，而不是贴上去的标签。
   点过之后回到普通深灰正文，光标变回箭头——
   它已经只是一句话，不再是一个可点的东西。
   不做发光、不做抖动、不弹任何东西。
   ============================================================ */

.collectible-keyword {
  color: #0078d4;
  font-weight: 700;
  cursor: pointer;
  /* 只过渡颜色：底色已经不存在，写进去只会让人误以为还有底 */
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 悬停只加深颜色 + 一道下划线，不做底色高亮 */
.collectible-keyword:hover {
  color: #005a9e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* 收下之后立刻定住：不留过渡，否则每次重新打开这一页，
   已经收过的词会先蓝一下再褪成灰，像是又被点亮了一次 */
.collectible-keyword.collected,
.collectible-keyword.collected:hover {
  color: #4b5563;
  font-weight: 400;
  text-decoration: none;
  cursor: default;
  transition: none;
}

/* 纯黑底的警方卷宗：蓝色提亮一档，
   收过的灰也得跟着提亮，否则在黑底上会糊成一团看不清的墨点 */
.dn-page .collectible-keyword {
  color: #4da3ff;
}
.dn-page .collectible-keyword:hover {
  color: #93c5fd;
}
.dn-page .collectible-keyword.collected,
.dn-page .collectible-keyword.collected:hover {
  color: #7c7c7c;
}

/* ------------------------------------------------------------
   卷宗第九个词（data-key="I"）：血红高亮
   ------------------------------------------------------------
   前八个词都是「蓝字 = 可收集」的通用提示，唯独这一处是整条线的
   终点 —— 卷宗末尾那行手写批注「真正的恶魔」，收进素材库后叫
   【罗伯特·本内特无期徒刑】。所以只给这一个 data-key 开例外：
   红字、仍然加粗、仍然没有底色，读起来还是正文里的一句原文，
   只是从满页蓝里跳出来。

   三条都用 !important：
   下面的 .collectible-keyword.collected 是 (0,2,0)、
   .dn-page .collectible-keyword.collected 是 (0,3,0)，而这三条是 (0,3,0)/(0,4,0)，
   收过之后要能立刻定住变灰，不能先红一下再褪色（重开页面时尤其明显）。
   只在本页（.dn-page）生效，别的网页那八个词一个像素都不动。
   ------------------------------------------------------------ */
.dn-page .collectible-keyword[data-key="I"] {
  color: #ff3333 !important;
}

/* 悬停：再亮一档 + 下划线（粗 2px 沿用全站，离字 2px） */
.dn-page .collectible-keyword[data-key="I"]:hover {
  color: #ff6666 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 收下之后：跟其他词一样褪成暗灰，不再是可点的东西 */
.dn-page .collectible-keyword[data-key="I"].collected,
.dn-page .collectible-keyword[data-key="I"].collected:hover {
  color: #7c7c7c !important;
  text-decoration: none;
}

/* ============================================================
   暗网档案（darknet-file）+ 进入时的红屏
   ------------------------------------------------------------
   纯黑底、极细深灰网格、惨白字、血红标题；
   没有圆角、没有阴影、没有动效，只留一套冷冰冰的排版。
   ============================================================ */

#browser-content-area > .dn-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 30px) 44px;
  background-color: #050505;
  /* 34px 一格、1px 线宽的深灰网格 */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.042) 1px, transparent 1px);
  background-size: 34px 34px;
  color: #e0e0e0;
  font-family: "Courier New", Consolas, "SimSun", monospace;
  font-size: 13px;
  line-height: 1.8;
}

.dn-frame {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px clamp(16px, 3vw, 30px) 30px;
  border: 1px solid #1c1c1c;
  background: rgba(5, 5, 5, 0.88);
}

.dn-head {
  padding-bottom: 16px;
  border-bottom: 1px solid #2a0000;
}
.dn-warn {
  margin: 0;
  color: #cc0000;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}
.dn-no {
  margin: 8px 0 0;
  color: #5c5c5c;
  font-size: 13px;
  letter-spacing: 1px;
}

.dn-rows { margin-top: 20px; }
.dn-row {
  display: flex;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid #141414;
}
.dn-key {
  flex: 0 0 68px;
  color: #cc0000;
  font-size: 13px;
  letter-spacing: 2px;
}
.dn-val {
  flex: 1;
  min-width: 0;
  color: #dcdcdc;
  font-size: 14px;                     /* 原本全靠 .dn-frame 继承的 13px，这里显式抬到 14px */
}
.dn-strong {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dn-detail { margin-top: 24px; }
.dn-detail .dn-key { display: block; margin-bottom: 8px; }
.dn-text {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid #3a0000;
  color: #e0e0e0;
  font-size: 14.5px;
  line-height: 2;
  text-align: justify;
}

.dn-foot {
  margin: 26px 0 0;
  padding-top: 12px;
  border-top: 1px solid #141414;
  color: #4f4f4f;
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

/* 红色封存章：歪一点，像盖上去的 */
.dn-seal {
  width: max-content;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 8px 22px;
  border: 2px solid #cc0000;
  color: #cc0000;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 8px;
  text-indent: 8px;
  transform: rotate(-6deg);
  opacity: 0.92;
}

/* ---------- 进入暗网前的一层红屏 ---------- */

.dark-alert {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #cc0000;
  opacity: 0;
  cursor: wait;
}
.dark-alert.is-fire { animation: daFlash 1.15s steps(1, end) forwards; }

/* 一闪、再一闪，最后落到黑 —— steps 让每一次跳变都是硬的 */
@keyframes daFlash {
  0%   { opacity: 1; background-color: #cc0000; }
  14%  { opacity: 1; background-color: #ff0000; }
  24%  { opacity: 0.12; }
  36%  { opacity: 1; background-color: #a80000; }
  48%  { opacity: 0.08; }
  60%  { opacity: 1; background-color: #cc0000; }
  100% { opacity: 1; background-color: #000000; }
}

.da-line,
.da-sub { opacity: 0; }
.dark-alert.is-fire .da-line { animation: daTextIn 0.24s linear 0.16s forwards; }
.dark-alert.is-fire .da-sub { animation: daTextIn 0.24s linear 0.3s forwards; }
@keyframes daTextIn { to { opacity: 1; } }

.da-line {
  margin: 0;
  color: #ffffff;
  font-family: "Courier New", monospace;
  font-size: 18px;
  letter-spacing: 7px;
  text-indent: 7px;
}
.da-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 2.5px;
}

/* ============================================================
   真结局：全屏黑场 + 逐行浮现的聊天记录
   ============================================================ */

.truth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  overflow-y: auto;
  padding: 34px 24px;
  background: #000000;
  color: #d8d8d8;
  font-family: "Courier New", Consolas, "SimSun", monospace;
  animation: truthIn 0.6s linear both;
}
@keyframes truthIn { from { opacity: 0; } to { opacity: 1; } }

.truth-log {
  width: min(620px, 100%);
  transition: opacity 1.4s linear;
}
.truth-log.is-faded { opacity: 0; }

.truth-line {
  margin: 0 0 15px;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  color: #cfcfcf;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.55s linear, transform 0.55s ease;
}
.truth-line.is-on { opacity: 1; transform: none; }

.truth-final {
  width: min(620px, 100%);
  margin: 0;
  color: #d81b1b;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 1.2s linear;
}
.truth-final.is-on { opacity: 1; }

.truth-close {
  margin-top: 4px;
  padding: 6px 18px;
  border: 1px solid #242424;
  background: transparent;
  color: #5e5e5e;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 3px;
  text-indent: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s linear 0.4s, color 0.2s linear, border-color 0.2s linear;
}
.truth-close.is-on { opacity: 1; }
.truth-close:hover { color: #cfcfcf; border-color: #6a6a6a; }

/* ---------- 窄屏：暗网与结局跟着收一档 ---------- */

@media (max-width: 720px) {
  #browser-content-area > .dn-page {
    margin: -10px;
    min-height: calc(100% + 20px);
    padding: 14px 10px 28px;
  }
  .dn-frame { padding: 16px 12px 20px; }
  .dn-warn { font-size: 12px; letter-spacing: 1px; }
  .dn-no { font-size: 12px; }
  .dn-row { gap: 10px; padding: 7px 0; }
  .dn-key { flex-basis: 54px; font-size: 12px; letter-spacing: 1px; }
  .dn-val { font-size: 12.5px; }
  .dn-text { font-size: 13px; line-height: 1.9; padding-left: 10px; }
  .dn-foot { font-size: 11px; }
  .dn-seal { font-size: 12px; letter-spacing: 5px; text-indent: 5px; padding: 6px 14px; }

  .truth-overlay { padding: 20px 16px; gap: 14px; }
  .truth-line { font-size: 12px; line-height: 1.8; margin-bottom: 12px; }
  .truth-final { font-size: 12.5px; line-height: 1.8; }
  .da-line { font-size: 12px; letter-spacing: 4px; text-indent: 4px; }
  .da-sub { font-size: 11.5px; letter-spacing: 1px; }
}

/* 手机横屏时浏览器内容区的内边距是 10px，暗网页的负边距要跟着改，
   否则右边缘会多出 6px 横向滚动 */
@media (orientation: landscape) and (max-height: 500px) {
  #browser-content-area > .dn-page {
    margin: -10px;
    min-height: calc(100% + 20px);
    padding: 12px 10px 26px;
  }
  .dn-frame { padding: 14px 12px 18px; }
  .dn-warn { font-size: 12px; letter-spacing: 1px; }
  .dn-seal { font-size: 12px; letter-spacing: 5px; text-indent: 5px; }
}

/* ============================================================
   写稿器 · 真结局黑化主题
   ------------------------------------------------------------
   只在第 3 篇正文末尾挂上【真正的恶魔】时，由 js 给
   #view-write .write-module 加 .theme-dark（撤回 / 切稿即摘掉）。
   作用域锁在写稿模块内，左侧紫色导航、新闻 / 百科 / 时光机零影响。
   只换颜色，不动任何尺寸、间距与排版。
   ============================================================ */
.write-module.theme-dark {
  background: #0a0a0a;
  scrollbar-color: #333333 #0a0a0a;
}
.write-module.theme-dark .write-canvas {
  background: #0a0a0a;
  border-color: #333333;
  box-shadow: none;
  scrollbar-color: #333333 #0a0a0a;
}
.write-module.theme-dark .write-canvas::-webkit-scrollbar { width: 10px; }
.write-module.theme-dark .write-canvas::-webkit-scrollbar-track { background: #0a0a0a; }
.write-module.theme-dark .write-canvas::-webkit-scrollbar-thumb {
  background: #333333;
  border: 2px solid #0a0a0a;
  border-radius: 6px;
}

/* ---------- 顶部工具栏 ---------- */
.write-module.theme-dark .write-topbar {
  background: #0a0a0a;
  border-bottom-color: #333333;
}
.write-module.theme-dark .write-topbar.is-stuck {
  border-bottom-color: #333333;
  box-shadow: none;
}
.write-module.theme-dark .write-topbar::after {
  background: linear-gradient(to bottom, #0a0a0a 0%, #0a0a0a 38%, rgba(10, 10, 10, 0) 100%);
}
.write-module.theme-dark .write-doc-name { color: #ffffff; }
.write-module.theme-dark .write-doc-name span { color: #9a9a9a; }
.write-module.theme-dark .write-tool { color: #d6d6d6; }
.write-module.theme-dark .write-tool:hover { background: #1a1a1a; color: #ffffff; }
.write-module.theme-dark .write-divider { background: #333333; }
.write-module.theme-dark .write-status {
  background: #1a1a1a;
  color: #e8e8e8;
}

/* ---------- 纸面：标题 / 副标题 / 正文 ---------- */
.write-module.theme-dark .doc-page { background: #0a0a0a; }
.write-module.theme-dark .w-title { color: #ffffff; }
.write-module.theme-dark .w-subtitle,
.write-module.theme-dark .w-subtitle.subtitle-positive,
.write-module.theme-dark .w-subtitle.subtitle-negative,
.write-module.theme-dark .w-subtitle.subtitle-neutral { color: #ffffff; }
/* 真结局专属副标题保留一点血色，作为黑场里唯一的特殊色 */
.write-module.theme-dark .w-subtitle[data-tone="truth"] { color: #ff6b6b; }
.write-module.theme-dark .w-subtitle.is-pulse { animation: subTruthPulseDark 1200ms ease-out 1; }
@keyframes subTruthPulseDark {
  0%   { color: #ff8a8a; text-shadow: 0 0 14px rgba(255, 107, 107, 0.35); }
  38%  { color: #ff8a8a; text-shadow: 0 0 9px rgba(255, 107, 107, 0.2); }
  100% { color: #ff6b6b; text-shadow: none; }
}
.write-module.theme-dark .w-meta { color: #a8a8a8; }
.write-module.theme-dark .w-meta b { color: #ffffff; }
.write-module.theme-dark .doc-body { color: #ffffff; }

/* 填空处：未填深灰、已填白字白线 */
.write-module.theme-dark .w-slot {
  color: #8a8a8a;
  border-bottom-color: #333333;
}
.write-module.theme-dark .w-slot:hover {
  color: #ffffff;
  border-bottom-color: #666666;
  background: #151515;
}
.write-module.theme-dark .w-slot:focus-visible { outline-color: #666666; }
.write-module.theme-dark .w-slot.filled {
  color: #ffffff;
  border-bottom-color: #ffffff;
}
.write-module.theme-dark .w-demon-line {
  border-left-color: #7f1d1d;
  background: #141414;
  color: #f0d0d0;
}
.write-module.theme-dark .w-demon-word { color: #ff6b6b; }

/* ---------- 素材库 ---------- */
.write-module.theme-dark .w-materials {
  background: #141414;             /* 黑化时同样是一只抽屉，只是换成深一档的黑 */
  border-color: #2e2e2e;
}
.write-module.theme-dark .w-mat-head h3 { color: #ffffff; }
.write-module.theme-dark .w-or { color: #6b6b6b; }
.write-module.theme-dark .w-hidden-box { border-top-color: #333333; }

/* 未选中：黑底白字 + 浅灰描边 */
.write-module.theme-dark .w-chip {
  background: #0a0a0a;
  border-color: #4a4a4a;
  color: #ffffff;
}
.write-module.theme-dark .w-chip:hover {
  background: #161616;
  border-color: #7a7a7a;
  color: #ffffff;
  box-shadow: none;
}
.write-module.theme-dark .w-chip:focus-visible { outline-color: #666666; }
.write-module.theme-dark .w-chip-count { color: #b0b0b0; }

/* 已选中：保留左绿 / 右红的语义，只把底换成黑 */
.write-module.theme-dark .w-chip.keyword-pos:hover,
.write-module.theme-dark .w-chip.keyword-pos.selected {
  background: #0a0a0a;
  border-color: #10b981;
  color: #10b981;
}
.write-module.theme-dark .w-chip.keyword-neg:hover,
.write-module.theme-dark .w-chip.keyword-neg.selected {
  background: #0a0a0a;
  border-color: #ef4444;
  color: #ef4444;
}

/* 槽位已满 / 未收集：暗一档，仍是黑底 */
.write-module.theme-dark .w-chip.is-full,
.write-module.theme-dark .w-chip.is-full:hover {
  background: #111111;
  border-color: #2b2b2b;
  color: #6a6a6a;
}
.write-module.theme-dark .w-chip.is-full .w-chip-tick,
.write-module.theme-dark .w-chip.is-full .w-chip-count { color: #6a6a6a; }
.write-module.theme-dark .w-chip.is-locked,
.write-module.theme-dark .w-chip.is-locked:hover,
.write-module.theme-dark .w-chip.is-locked:focus-visible {
  background: #0d0d0d;
  border-color: #2e2e2e;
  color: #6a6a6a;
}
.write-module.theme-dark .w-chip.is-demon.unlocked,
.write-module.theme-dark .w-chip.is-demon.unlocked:hover,
.write-module.theme-dark .w-chip.is-demon.unlocked:focus-visible {
  background: #000000;
  border-color: #6a6a6a;
  color: #ffffff;
}
.write-module.theme-dark .w-chip.is-demon.unlocked .w-chip-tick,
.write-module.theme-dark .w-chip.is-demon.unlocked .w-chip-count { color: #ffffff; }

/* ---------- 底部：提示 + 提交 ---------- */
.write-module.theme-dark .w-warn { color: #ff8a8a; }
.write-module.theme-dark .w-submit {
  box-shadow: 0 8px 20px -10px rgba(94, 63, 190, 0.9);
}

/* ---------- 预览态：成稿同样黑底白字 ---------- */
.write-module.theme-dark.is-preview .doc-body { color: #ffffff; }
.write-module.theme-dark.is-preview .write-status {
  background: #1a1a1a;
  color: #e8e8e8;
}
.write-module.theme-dark .w-published-note { color: #8a8a8a; }

/* ---------- 纸外的 1 / 2 / 3 切稿圆钮跟着换深色（紫色当前项不变） ---------- */
.write-module.theme-dark .w-draft-tab {
  background: #111111;
  border-color: #333333;
  color: #d0d0d0;
}
.write-module.theme-dark .w-draft-tab:hover:not(:disabled) {
  background: #1a1a1a;
  border-color: #555555;
  color: #ffffff;
}
.write-module.theme-dark .w-draft-tab.is-done {
  background: #111111;
  border-color: #333333;
  color: #cfcfcf;
}
.write-module.theme-dark .w-draft-tab.is-active,
.write-module.theme-dark .w-draft-tab.is-active:hover {
  background: #5e3fbe;
  border-color: #5e3fbe;
  color: #ffffff;
}
.write-module.theme-dark .w-draft-tab.is-locked {
  background: #0e0e0e;
  border-color: #2b2b2b;
  color: #5f5f5f;
}
.write-module.theme-dark .w-tab-lock svg { stroke: #5f5f5f; }

/* ============================================================
   悬浮音乐播放器（body 直属，位于主视窗之外）
   ------------------------------------------------------------
   左下角 30px 的圆形半透明按钮：
     常态     紫色 42% 透明 + 毛玻璃
     hover    紫色加深到 92%，轻微上浮
     播放中   音符缓慢呼吸
     特殊网页 转为暗红（配合 JS 的 0.65 倍速慢放）
   z-index 300：压在主视窗之上，低于弹窗 1000 / 蓝屏 9999。
   ============================================================ */
.bgm-dock {
  position: fixed;
  left: 30px;
  bottom: 30px;
  z-index: 300;
  line-height: 0;
}

.bgm-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(94, 63, 190, 0.42);
  -webkit-backdrop-filter: blur(9px) saturate(1.3);
  backdrop-filter: blur(9px) saturate(1.3);
  box-shadow: 0 10px 24px -10px rgba(31, 22, 66, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #ffffff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              transform 0.22s ease, border-color 0.22s ease;
}

.bgm-btn:hover {
  background: rgba(94, 63, 190, 0.92);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 30px -10px rgba(31, 22, 66, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.bgm-btn:active { transform: translateY(0) scale(0.95); }

.bgm-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.bgm-icon {
  display: block;
  font-size: 22px;
  line-height: 1;
  /* emoji 自带彩色，这里不做滤镜，保持系统原样 */
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.92;
}

/* ---------- 播放中：音符缓慢呼吸 ---------- */
.bgm-btn.is-playing .bgm-icon {
  opacity: 1;
  animation: bgm-breathe 2.8s ease-in-out infinite;
}

@keyframes bgm-breathe {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50%      { transform: scale(1.14) rotate(4deg); }
}

/* ---------- 特殊网页：暗红 + 慢慢呼吸的光环 ---------- */
.bgm-dock.is-creepy .bgm-btn {
  background: rgba(127, 29, 29, 0.58);
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 10px 26px -10px rgba(60, 10, 10, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bgm-dock.is-creepy .bgm-btn:hover {
  background: rgba(153, 27, 27, 0.92);
  border-color: rgba(254, 202, 202, 0.6);
}

.bgm-dock.is-creepy .bgm-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(248, 113, 113, 0.38);
  animation: bgm-creepy-ring 4.6s ease-out infinite;
  pointer-events: none;
}

@keyframes bgm-creepy-ring {
  0%   { transform: scale(0.92); opacity: 0.75; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

/* ---------- 小屏 / 手机横屏：让出左下角的导航条，挪到右下角 ---------- */
@media (max-width: 720px), (orientation: landscape) and (max-height: 500px) {
  .bgm-dock { left: auto; right: 14px; bottom: 14px; }
  .bgm-btn { width: 42px; height: 42px; }
  .bgm-icon { font-size: 18px; }
}

/* ---------- 系统开启「减少动态效果」时全部静止 ---------- */
@media (prefers-reduced-motion: reduce) {
  .bgm-btn,
  .bgm-btn:hover,
  .bgm-btn:active { transition: none; transform: none; }
  .bgm-btn.is-playing .bgm-icon { animation: none; }
  .bgm-dock.is-creepy .bgm-btn::after { animation: none; opacity: 0.4; }
}

/* ============================================================
   2002 · 星火工作室（FrontPage 草台风 / 纯 CSS，无图片）
   ------------------------------------------------------------
   所有选择器都锁在 .snap-2002 / .spark-studio-page 下，不污染其它页面。

   这一版是故意做「难看」的：纯青色底、纯黄 / 纯粉方块、5px 纯黑直角边框、
   3px 纯黑描边 + 4px 错位硬阴影、全页居中、歪歪扭扭的旋转、
   纯色方块拼出来的像素星星，以及一个写着 NEW! 的方块徽标。
   全站没有一处渐变、没有一个圆角、没有留白 —— 一个不懂设计的人
   用 FrontPage 拖出来的网页，就是这个样子。
   ============================================================ */

#view-wayback .wayback-screen.snap-2002 {
  min-height: 100%;
  padding: 0;
  background: #00ffff;
  color: #000000;
  font-family: "SimSun", "宋体", "Microsoft YaHei", sans-serif;
}

#view-wayback .wayback-screen.snap-2002 ::selection {
  background: #ff00ff;
  color: #000000;
}

.spark-studio-page {
  position: relative;
  /* 装饰件允许故意出血，由这层裁掉 */
  overflow: hidden;
  box-sizing: border-box;
  max-width: 860px;
  min-height: 100%;
  margin: 0 auto;
  padding: 22px 26px 40px;
  /* 纯色，不许任何渐变 */
  background: #00ffff;
  color: #000000;
  font-family: "SimSun", "宋体", "Microsoft YaHei", sans-serif;
  /* 全页居中：不要现代排版那种左对齐 + 留白 */
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 像素星星：一个方块，加一圈方块拼成 ---------- */
.spk-star {
  position: absolute;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  background: #ffff00;
  box-shadow:
    12px 0 0 #ff00ff,
    -12px 0 0 #ff00ff,
    0 12px 0 #ff00ff,
    0 -12px 0 #ff00ff,
    12px 12px 0 #ffff00,
    -12px -12px 0 #ffff00,
    12px -12px 0 #ffff00,
    -12px 12px 0 #ffff00;
  pointer-events: none;
  animation: spk-pixel-blink 2.2s steps(2, end) infinite;
}
.spk-star-a {
  left: 16px;
  top: 16px;
}
.spk-star-b {
  right: 22px;
  top: 322px;
}

@keyframes spk-pixel-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0.45; }
}

/* 页面上再补两簇，纯方块，没有任何渐变 */
.spark-studio-page::before,
.spark-studio-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* 左侧中部：粉心黄花 */
.spark-studio-page::before {
  left: 18px;
  top: 236px;
  background: #ff00ff;
  box-shadow:
    14px 0 0 #ff00ff,
    -14px 0 0 #ffff00,
    0 14px 0 #ffff00,
    0 -14px 0 #ffff00;
}

/* 右下角：黄心粉花 */
.spark-studio-page::after {
  right: 26px;
  bottom: 44px;
  background: #ffff00;
  box-shadow:
    14px 0 0 #ffff00,
    -14px 0 0 #ff00ff,
    0 14px 0 #ff00ff,
    0 -14px 0 #ff00ff;
}

/* ---------- 顶部视觉区 ---------- */
.spk-hero {
  position: relative;
  z-index: 2;
  padding: 0;
  text-align: center;
}

/* 一行黑框黄底的小字，歪着，像用表格硬塞进去的 */
.spk-kicker {
  display: inline-block;
  margin: 0;
  padding: 3px 12px 4px;
  background: #ffff00;
  border: 3px solid #000000;
  color: #000000;
  font-family: "SimSun", "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(-1deg);
}

/* 大标题：黄字 + 3px 黑描边 + 4px 错位黑影，整块歪 4 度 */
.spk-logo {
  display: block;
  margin: 34px 0 0;
  line-height: 1;
  text-align: center;
  transform: rotate(-4deg);
}
.spk-logo-cn {
  display: block;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: clamp(40px, 8vw, 78px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffff00;
  -webkit-text-stroke: 3px #000000;
  /* 先描边再填色：不然 3px 描边会把字心吃掉，黄字变成一团黑 */
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #000000;
}
.spk-logo-en {
  display: block;
  margin: 10px 0 0;
  font-family: "Arial Black", Impact, "Microsoft YaHei", sans-serif;
  font-size: clamp(20px, 4.2vw, 38px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #ff00ff;
  -webkit-text-stroke: 3px #000000;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #000000;
}

/* 右上角那个方块：粉底黑框，中间一个 NEW!，非常像盗版素材 */
.spk-cd {
  position: absolute;
  right: 0;
  top: 4px;
  width: 76px;
  height: 76px;
  background: #ff00ff;
  border: 5px solid #000000;
  box-shadow: 6px 6px 0 #000000;
  transform: rotate(8deg);
  z-index: 3;
}
.spk-cd i { display: none; }
.spk-cd::before {
  content: "NEW!";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffff00;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
  -webkit-text-stroke: 2px #000000;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 #000000;
}

/* 滚动条式的小横条：纯粉底，5px 黑框，硬投影 */
.spk-ticker {
  display: inline-block;
  margin: 26px 0 0;
  padding: 5px 14px 6px;
  background: #ff00ff;
  border: 5px solid #000000;
  box-shadow: 6px 6px 0 #000000;
  color: #000000;
  font-family: "SimSun", "SimHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  transform: rotate(1.5deg);
}

/* ---------- 核心标语 ---------- */
.spk-slogan {
  position: relative;
  z-index: 2;
  margin: 46px 0 0;
  transform: rotate(1.5deg);
}
.spk-slogan h2 {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 22px 10px;
  background: #ffff00;
  border: 5px solid #000000;
  box-shadow: 9px 9px 0 #000000;
  color: #000000;
  font-size: clamp(24px, 4.6vw, 38px);
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 3px 3px 0 #ff00ff;
}
.spk-slogan-en {
  margin: 16px 0 0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #000000;
}

/* ---------- 创始人卡片：黄底黑框，反着歪一点 ---------- */
.spk-about {
  position: relative;
  z-index: 2;
  max-width: 100%;
  margin: 48px auto 0;
  padding: 18px 20px 22px;
  background: #ffff00;
  border: 5px solid #000000;
  box-shadow: 10px 10px 0 #000000;
  transform: rotate(-1.5deg);
  text-align: center;
}
.spk-about-title {
  display: inline-block;
  margin: 0 0 16px;
  padding: 3px 16px 5px;
  background: #ff00ff;
  border: 5px solid #000000;
  box-shadow: 5px 5px 0 #000000;
  color: #000000;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 3px 3px 0 #ffff00;
  transform: rotate(-2deg);
}
.spk-about-text {
  margin: 0;
  padding: 14px 16px;
  background: #ffffff;
  border: 5px solid #000000;
  color: #000000;
  font-family: "SimSun", "宋体", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.95;
  text-align: center;
}
.spk-about-sign {
  margin: 16px 0 0;
  text-align: center;
  font-family: "SimSun", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000000;
}

/* ---------- 底部：访客计数器 ---------- */
.spk-foot {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  display: block;
  text-align: center;
  transform: rotate(-1deg);
}
.spk-counter {
  display: inline-block;
  margin: 0;
  padding: 7px 18px 8px;
  background: #000000;
  color: #00ff00;
  border: 5px solid #000000;
  box-shadow: 6px 6px 0 #ff00ff;
  font-family: "Courier New", monospace;
  font-size: 14px;
  letter-spacing: 1px;
}
.spk-counter b {
  color: #ffff00;
  font-size: 20px;
  letter-spacing: 4px;
  text-shadow: 3px 3px 0 #ff00ff;
}
.spk-copy {
  margin: 16px 0 0;
  font-family: "SimSun", serif;
  font-size: 12px;
  color: #000000;
}

/* ---------- 这页的滚动条：黑槽 + 亮粉块 ---------- */
#view-wayback .wbm-snapshot-body.is-spark {
  background: #00ffff;
  scrollbar-color: #ff00ff #000000;
}
#view-wayback .wbm-snapshot-body.is-spark::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
#view-wayback .wbm-snapshot-body.is-spark::-webkit-scrollbar-track {
  background: #000000;
}
#view-wayback .wbm-snapshot-body.is-spark::-webkit-scrollbar-thumb {
  background: #ff00ff;
  border: 3px solid #000000;
}
#view-wayback .wbm-snapshot-body.is-spark::-webkit-scrollbar-thumb:hover {
  background: #ff5cff;
}

/* ---------- 窄屏：收掉边上的方块，别压字 ---------- */
@media (max-width: 760px) {
  .spark-studio-page { padding: 18px 14px 34px; }
  .spk-cd {
    width: 58px;
    height: 58px;
    top: 2px;
    border-width: 4px;
    box-shadow: 4px 4px 0 #000000;
  }
  .spk-cd::before {
    font-size: 13px;
    -webkit-text-stroke: 2px #000000;
    text-shadow: 2px 2px 0 #000000;
  }
  .spk-star-b { display: none; }
  .spk-logo-cn { letter-spacing: 1px; }
  .spk-about {
    padding: 14px 12px 18px;
    box-shadow: 8px 8px 0 #000000;
  }
  .spk-about-text { font-size: 14px; padding: 12px; }
  .spk-slogan h2 { letter-spacing: 2px; box-shadow: 7px 7px 0 #000000; }
  .spk-ticker { font-size: 12px; letter-spacing: 0; }
}

@media (max-width: 520px) {
  .spk-cd { display: none; }
  .spark-studio-page::before,
  .spark-studio-page::after { display: none; }
  .spk-about-title { font-size: 22px; letter-spacing: 2px; }
  .spk-about-text { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .spk-star { animation: none; }
}

/* ============================================================
   现代 · 星火游戏有限公司官网（spark-corp-page）
   ------------------------------------------------------------
   和 2002 年那份 Y2K 涂鸦站是同一家公司，却是两套完全相反的语言：
     深色金属 #1a1a1a → #2a2a2a + 亮银 #e2e8f0，亮橙 #f97316 只做极少量点缀；
     金属拉丝 / 玻璃反光用 linear-gradient + repeating-linear-gradient 叠；
     1px 银色发丝边框、0 圆角、0 倾斜、0 动效、三栏严格对称；
     大面积深色留白 —— 秩序的压迫感全部来自对齐，而不是装饰。
   所有选择器锁在 .spark-corp-page 下，不影响任何既有页面。
   ============================================================ */

/* 整页铺满：抵消 .browser-content 的 16px 内边距，两侧不露深色外壳 */
#browser-content-area > .spark-corp-page {
  margin: -16px;
  min-height: calc(100% + 32px);
  /* 深色金属底：一条 4px 周期的纵向拉丝 + 斜向 #2a2a2a → #1a1a1a 渐变。
     亮度差压在 4% 以内，只让底色「有方向」，绝不抢任何文字 */
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.016) 0 1px,
      rgba(255, 255, 255, 0) 1px 4px),
    linear-gradient(160deg, #262626 0%, #1a1a1a 52%, #2a2a2a 100%);
  color: #cbd5e1;
  font-family: Helvetica, Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.spark-corp-page ::selection {
  background: #ea580c;
  color: #ffffff;
}

/* ---------- 1. 顶部导航：一条极窄的镜面高光 ---------- */
.spark-corp-page .sc-nav {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.045) 0,
      rgba(255, 255, 255, 0) 1px,
      rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, #272727 0%, #1b1b1b 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

.spark-corp-page .sc-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  /* 右侧 88px 是给全局收藏星标（.page-star，right 26 + 32 宽）留的通道，
     否则「加入我们」会被那个白色圆钮压掉半截 */
  padding: 0 88px 0 40px;
  height: 72px;
}

.spark-corp-page .sc-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

/* 方形亮银徽标：抛光金属渐变 + 1px 高光描边，没有任何圆角 */
.spark-corp-page .sc-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(226, 232, 240, 0.62);
  background: linear-gradient(155deg, #f1f5f9 0%, #cbd5e1 34%, #94a3b8 62%, #5b6673 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.55);
  color: #14181d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.spark-corp-page .sc-logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.1;
  color: #e2e8f0;
}

.spark-corp-page .sc-logo-text em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: #8b95a3;
}

.spark-corp-page .sc-nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.spark-corp-page .sc-nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #8d96a3;
  cursor: default;
  transition: color 0.18s ease;
}

.spark-corp-page .sc-nav-link:hover { color: #e2e8f0; }

/* 唯一的高亮态：一条亮橙，压在导航底线上 */
.spark-corp-page .sc-nav-link.is-active { color: #f1f5f9; }

.spark-corp-page .sc-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #ea580c 0%, #f97316 62%, #fb923c 100%);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.42);
}

/* ---------- 2. Hero：拉丝金属区块 ---------- */
.spark-corp-page .sc-hero {
  position: relative;
  overflow: hidden;
  padding: 120px 40px 124px;
  text-align: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.022) 0 1px,
      rgba(255, 255, 255, 0) 1px 4px),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.1) 0 2px,
      rgba(0, 0, 0, 0) 2px 9px),
    linear-gradient(104deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.045) 50%,
      rgba(255, 255, 255, 0) 70%),
    linear-gradient(158deg, #303030 0%, #202020 46%, #171717 100%);
}

/* 顶边一道极细的反光，像抛光金属的边缘 */
.spark-corp-page .sc-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(720px, 76%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.58) 50%,
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* 底部一层几乎看不见的暖橙余温，只为了让大字浮起来 */
.spark-corp-page .sc-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -190px;
  width: 720px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(249, 115, 22, 0.1) 0%,
    rgba(249, 115, 22, 0) 68%);
  pointer-events: none;
}

.spark-corp-page .sc-hero-inner {
  position: relative;
  z-index: 1;
}

.spark-corp-page .sc-hero-kicker {
  margin: 0 0 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.44em;
  color: #7b8490;
}

/* 主标语：亮银渐变（顶部近白、底部落到冷银），字重与字距保持不变 */
.spark-corp-page .sc-hero-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 44%, #a8b3c1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 唯一一条实心色块：44×2 的亮橙 */
.spark-corp-page .sc-hero-rule {
  width: 44px;
  height: 2px;
  margin: 32px auto 0;
  background: linear-gradient(90deg, #ea580c 0%, #f97316 70%, #fb923c 100%);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.38);
}

.spark-corp-page .sc-hero-sub {
  margin: 30px 0 0;
  font-size: 14.5px;
  letter-spacing: 0.14em;
  color: #9aa4b1;
}

/* ---------- 3. 商业成就：1px 银色缝的三栏数据板 ---------- */
.spark-corp-page .sc-stats {
  padding: 84px 40px;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.014) 0 1px,
      rgba(255, 255, 255, 0) 1px 5px),
    linear-gradient(180deg, #191919 0%, #212121 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* gap 露出底色 = 银色发丝分隔线，比给每张卡加 border 更锐利 */
.spark-corp-page .sc-stats-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1120px;
  margin: 0 auto;
  background: rgba(148, 163, 184, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 44px rgba(0, 0, 0, 0.42);
}

.spark-corp-page .sc-stat {
  padding: 46px 38px 42px;
  background: linear-gradient(180deg, #272727 0%, #1b1b1b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.spark-corp-page .sc-stat-num {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #f8fafc;
}

.spark-corp-page .sc-stat-plus {
  margin-left: 3px;
  color: #f97316;
  font-weight: 700;
}

/* 「亿」和「+」「年」一样是量词，数字保持白，量词走亮橙 */
.spark-corp-page .sc-stat-cn {
  margin-left: 2px;
  color: #f97316;
  font-weight: 700;
  letter-spacing: 0;
}

.spark-corp-page .sc-stat-unit {
  margin-left: 6px;
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: 0.16em;
  color: #f97316;
}

.spark-corp-page .sc-stat-label {
  margin: 20px 0 0;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  color: #cbd5e1;
}

.spark-corp-page .sc-stat-en {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #6b7480;
}

/* ---------- 4. 企业简介：左右两栏，顶部各压一条对齐的细线 ---------- */
.spark-corp-page .sc-about {
  padding: 96px 40px 104px;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.012) 0 1px,
      rgba(255, 255, 255, 0) 1px 6px),
    linear-gradient(180deg, #212121 0%, #1a1a1a 100%);
}

.spark-corp-page .sc-about-inner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 72px;
  max-width: 1120px;
  margin: 0 auto;
}

.spark-corp-page .sc-about-head {
  padding-top: 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.36);
}

.spark-corp-page .sc-sec-label {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: #f97316;
}

.spark-corp-page .sc-sec-title {
  margin: 22px 0 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: #e2e8f0;
}

.spark-corp-page .sc-about-body {
  padding-top: 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.36);
}

.spark-corp-page .sc-about-text {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 2.05;
  color: #a2abb7;
  text-align: justify;
}

.spark-corp-page .sc-about-text:last-child { margin-bottom: 0; }

/* ---------- 5. 页脚 ---------- */
.spark-corp-page .sc-foot {
  background: linear-gradient(180deg, #191919 0%, #121212 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.26);
}

.spark-corp-page .sc-foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 40px 30px;
}

.spark-corp-page .sc-foot-copy {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #79828e;
}

.spark-corp-page .sc-foot-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.spark-corp-page .sc-foot-links span {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #828c98;
  cursor: default;
  transition: color 0.18s ease;
}

.spark-corp-page .sc-foot-links span:hover { color: #cbd5e1; }

/* ---------- 6. 窄屏：网格降为单列，其余靠对齐撑住 ---------- */
@media (max-width: 940px) {
  .spark-corp-page .sc-nav-inner { padding: 0 72px 0 24px; height: 64px; }
  .spark-corp-page .sc-hero { padding: 84px 24px 88px; }
  .spark-corp-page .sc-hero-title { letter-spacing: 0.08em; }
  .spark-corp-page .sc-stats { padding: 56px 24px; }
  .spark-corp-page .sc-stat { padding: 34px 26px 32px; }
  .spark-corp-page .sc-about { padding: 64px 24px 72px; }
  .spark-corp-page .sc-about-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .spark-corp-page .sc-foot-inner { padding: 24px; }
}

@media (max-width: 700px) {
  .spark-corp-page .sc-nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 20px;
    gap: 14px;
  }
  .spark-corp-page .sc-nav-links { gap: 20px; }
  .spark-corp-page .sc-nav-link { font-size: 12px; letter-spacing: 0.04em; }
  .spark-corp-page .sc-hero { padding: 64px 20px 68px; }
  .spark-corp-page .sc-hero-kicker { letter-spacing: 0.3em; }
  .spark-corp-page .sc-stats { padding: 44px 20px; }
  .spark-corp-page .sc-stats-inner { grid-template-columns: minmax(0, 1fr); }
  .spark-corp-page .sc-stat { padding: 28px 22px; }
  .spark-corp-page .sc-about { padding: 52px 20px 60px; }
  .spark-corp-page .sc-about-text { font-size: 14px; line-height: 1.95; }
  .spark-corp-page .sc-foot-inner { padding: 22px 20px 24px; }
  .spark-corp-page .sc-foot-links { gap: 18px; flex-wrap: wrap; }
}

/* 手机横屏：这一档 .browser-content 的内边距只有 10px，补偿量跟着改 */
@media (orientation: landscape) and (max-height: 500px) {
  #browser-content-area > .spark-corp-page {
    margin: -10px;
    min-height: calc(100% + 20px);
  }
}

/* ============================================================
   轻量提示（toast）：目前只服务「关键词已收录」
   ------------------------------------------------------------
   绝对定位在主内容区 #main 的右下角（#main 已是 position: relative，
   且 overflow: hidden），所以它跟着主视窗走、落在窗口内边缘，
   而不是贴着整个屏幕的右下角。留 24px 内缩，不会被视窗裁切。
   z-index 999：高于页面内的浮动/表格/长文（页面里最高只有 100），
   低于全屏遮罩（1000）和结局黑场（9999）。
   纯 opacity / transform 过渡，pointer-events: none，
   所以它盖在上面也不会挡住任何点击。同一时刻只挂一个节点，
   拆旧建新由 js 的 showToast() 负责。
   ============================================================ */
.toast-message {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 999;

  padding: 12px 20px;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);

  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   结局演出：主窗口渐隐 → 纯黑 → 逐行浮现
   ------------------------------------------------------------
   旧的 .truth-*（全屏黑场 + 聊天记录）保留未删，
   但第 3 篇提交后的演出已经统一交给这套。#ending-overlay
   默认不可见、不吃点击，由 js 加 .is-open 才亮起来。
   ============================================================ */

/* 结局开场：整块桌面（含窗口外那圈网点）跟主窗口一起沉下去。
   窗口 1.5s 淡出，这里同步 1.5s 变黑 —— 两边同一条时间线，
   窗口完全透明的那一刻，底下已经是一块纯黑，看不见任何底色跳变。
   网格是 background-image，没法参与颜色过渡，所以直接撤掉；
   它在窗口外那一圈本来就极淡，撤掉时窗口还半掩着，看不出「啪」一下。 */
body.ending-bg-fade {
  background-color: #000000 !important;
  background-image: none !important;
  transition: background-color 1.5s ease;
}
/* 紫色光晕跟着一起收：留着它，黑场边上会有一团会动的雾 */
body.ending-bg-fade #bg-glow {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.main-window-fade-out {
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

#ending-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 不用纯黑：极暗的灰更像「显示器背光还亮着、但画面全黑」。
     之所以留这一档底光（#0a0a0a = 10/255，约 4% 灰），是为了让扫描线
     与四面暗角都有可压暗的余量：亮线能往上抬到 32，暗线能往下压到 5，
     中间才有层次。直接用 #050505 也不是不行（亮 27 / 暗 2），
     但暗角一叠就全糊在 0 附近，四角会变成死黑一块。 */
  background-color: #0a0a0a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
  /* 扫描线要铺满整屏且不参与滚动，超出部分一律裁掉 */
  overflow: hidden;
}

#ending-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- CRT 扫描线 ----------
   一层 4px 周期的横向条纹：上 2px 是极淡的白（磷光余辉），下 2px 压黑（行间缝隙）。
   只写「透明 → 黑」是看不见的：#0a0a0a 的底再乘 0.82，差值连一个色阶都不到。
   所以亮线必须真的比底色亮一档，暗线再把这一档压下去，才有「百叶窗」的走向。

   ⚠ 调参记录（这层之前「看不见」的真实原因，别再退回那组数）：
     旧值 亮 0.06 / 暗 0.42 / 伪元素 opacity 0.6，实测在 1440×900 下
       屏幕中央  亮 17  暗 7   （差 10/255 ≈ 3.9%）
       四角暗角内 亮 10  暗 4   （差 6/255  ≈ 2.4%，已经完全贴在黑里）
     两层 opacity 相乘（伪元素 0.6 × 亮线 0.06）把亮线吃掉了大半，
     像素上确实「有」，肉眼上确实「没有」。
     现在：亮 0.09 / 暗 0.50 / 伪元素 opacity 1（不再二次打折）
       屏幕中央  亮 32  暗 5   （差 27/255 ≈ 10.6%）
       四角暗角内 亮 20  暗 3   （差 17/255 ≈ 6.7%，收边处仍看得出走向）
     正文是 255 的白，和最亮的条纹差着 8 倍，读字完全不受影响。

   关键在 z-index: -1。#ending-overlay 自己因为 z-index:9999 + fixed
   已经是一个层叠上下文，它内部的负层不会掉到页面背后去，
   而是「压在遮罩自己的底色之上、所有文字之下」：
   纹理只作用于背景，一个字都不会盖到。同理 ::after 的暗角
   也只是把四周的底压暗，反而让中间的白字对比更高。

   用 background-size + 渐变各占一半，比 repeating-linear-gradient
   更好控制周期，也不依赖浏览器对 repeating 的取整方式。 */
#ending-overlay::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.09),
    rgba(255, 255, 255, 0.09) 50%,
    rgba(0, 0, 0, 0.50) 50%,
    rgba(0, 0, 0, 0.50)
  );
  background-size: 100% 4px; /* 4px 一个周期：2px 亮 + 2px 暗 */
  background-repeat: repeat;
  z-index: -1;               /* 压在遮罩底色之上、所有文字之下，绝不挡字 */
  pointer-events: none;
  opacity: 1;                /* 不在这一层再打折：对比度已经算好了 */
}

/* ---------- 四周暗角 ----------
   中心 40% 完全透明，向外逐渐压到 80% 黑，把视线收在屏幕中央的文字上。
   circle 默认按 farthest-corner 算半径：1440×900 下半径约 849px，
   正文左右边缘（±300 左右）只落在 35% 附近 —— 几乎不被压暗；
   真正压到八成黑的是四个角，那里本来也没有字。
   所以这层只收边、不动正文，反而让中间的白色更跳。 */
#ending-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.8) 100%);
  z-index: -1;
  pointer-events: none;
}

#ending-text-container {
  max-width: 800px;
  /* 真结局 17 行，屏幕矮的时候要能滚：容器自己吃下超出的高度，
     底下的标题、按钮才不会被顶出视野。 */
  max-height: 64vh;
  overflow-y: auto;
  padding: 0 32px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.8;
  color: #ffffff;
  scrollbar-width: none;          /* 滚动条会破坏这片纯黑 */
  /* 真结局清屏前要让「整块聊天记录」一起暗下去，而不是同一帧被抽走。
     时长与 js 里的 ENDING_CODA_FADE_OUT (1500ms) 一对一，改一处必须改两处。 */
  transition: opacity 1.5s ease-in-out;
}
#ending-text-container::-webkit-scrollbar { width: 0; height: 0; }

/* 整体淡出：只加在真结局「清屏前」那一下。
   父级 opacity 会连子元素一起暗掉，所以十几行聊天记录是一起沉下去的，
   不会出现某一行还在淡入、其余已经消失的错位。 */
#ending-text-container.is-fading-out {
  opacity: 0;
}

/* 每插入一行就自己淡入，并从下方轻轻浮上来 */
#ending-text-container p {
  margin: 0 0 0.55em;
  opacity: 0;
  transform: translateY(12px);
  animation: endingLineIn 0.9s ease forwards;
}

@keyframes endingLineIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 全篇只有这一处血字，而且只红后半句：
   “R：可能有点恐怖。”保持白色，
   只有“但我想要把他切开然后吃下去”变红加粗。 */
.red-text {
  color: #cc0000;
  font-weight: bold;
}

/* 前半句不另设颜色，跟着 .ending-line 的白走 */
.normal-text {
  color: inherit;
}

/* 结局标题：末句之后先空出一段纯黑（普通结局 2s），
   黑够了才让这一行慢慢浮上来。开头再慢一点，别抢最后那句话。
   真结局不走这条：它在清屏之后由 .ending-credit-text + .ending-title 单独接管。 */
#ending-text-container .ending-title {
  margin-top: 34px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.16em;
  color: #cc0000;
  text-shadow: 0 0 24px rgba(204, 0, 0, 0.35);
  opacity: 0;
  animation: endingTitleIn 1.6s ease forwards;
}

@keyframes endingTitleIn {
  from { opacity: 0; transform: translateY(18px); letter-spacing: 0.30em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.16em; }
}

/* 后日谈小标题（【关于绯闻】/【关于商战】/【关于结局】）：
   黑屏里的章节牌 —— 暗灰、字距放开、上下都留白，
   把「前两篇稿件的后日谈」和「最终结局」切成三段。
   压在正文之上就够，不做颜色冲突、不加下划线、不放大到正文级别，
   眼睛扫过去知道换章了，注意力仍落在下面的句子上。 */
#ending-text-container .ending-header {
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 2px;
  color: #888888;
}

/* 真结局的收尾字幕：「【本故事由真实事件改编】」。
   它已经不在 endingsData.true.lines 里了 —— 清屏之后由 js 单独建一个 <p>
   插进来，所以这一条不再是「正文里的一行」，而是整场演出的最后一块字。

   32px / 800 是整个结局里最大的一行（正文 20px、标题 30px）：
   前面十几行聊天记录刚刚被一次性抽走，这块字要一个人站在空黑里。

   原来这里挂 20vh 的顶边距，想让它「先空一段再落字」，代价是整组
   （字幕 + 结局标题 + 重新撰稿）被 #ending-overlay 居中时重心整体下沉 ——
   24 行字清空后，屏幕上是「一大块空黑 + 贴着下半屏的一小撮字」，
   头重脚轻。改成 0：#ending-text-container 此时只剩这块字的自然高度，
   外层 flex 的 justify-content: center 才能把这组内容真正摆到正中，
   按钮跟着上提。空场留给字幕自己用 opacity 慢慢浮出来，不靠边距撑。

   animation: none 和 transform: none 是必须的：
   #ending-text-container p 那条通用规则会给每个 <p> 挂 0.9s 的淡入动画，
   动画会压过 js 写的 inline opacity —— 不关掉它，这行字 0.9 秒就闪完了，
   根本没有 3 秒的缓缓浮现。margin 也要重写，否则会吃到那条 0 0 0.55em。 */
#ending-text-container .ending-credit-text {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 4px;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  animation: none;
  transform: none;
  opacity: 0;              /* 起点；js 下一帧改成 1，3s 过渡才成立 */
}

/* 字幕之后才浮出的结局标题：跟着收尾的节奏走，所以比正文里的标题小一号，
   血红的发光也去掉（那圈光晕是给「结局」二字单独亮相用的，这里不需要抢戏）。 */
#ending-text-container .ending-credit-text + .ending-title {
  margin-top: 40px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 6px;
  color: #cc0000;
  text-shadow: none;
  animation: none;
  transform: none;
  opacity: 0;              /* 同样交给 js 的 2s 过渡 */
}

/* 重新撰稿：整片黑里唯一的出口，跟在文字下方居中。
   绝对定位的那个按钮已经拆掉，这里靠 flex 居中 + margin-top 站位，
   初始 display:none 写在 HTML 里，演完由 js 改成 inline-block。 */
#rewrite-btn {
  flex: none;
  margin-top: 40px;
  padding: 10px 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.16em;
  cursor: pointer;
  animation: endingLineIn 1.1s ease both;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

#rewrite-btn:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

#rewrite-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

/* ============================================================
   搜索态 · 白色系（默认皮肤）
   ------------------------------------------------------------
   只认「浏览器内容区里正放着一张搜索结果页」这一个条件：

       :where(body:has(.browser-content > .sr-page)) .browser-bar

   用 :where() 把条件本身的选择器权重清零，白色条只有 .browser-bar
   的 (0,1,0) —— 于是后面的 .theme-search-dark 规则随便就能压住它，
   不用靠 !important 打架。同理，首页是 .news-home 不是 .sr-page，
   新闻详情页也不是，它们头顶那条深色工具条一点都不会变。
   ============================================================ */

:where(body:has(.browser-content > .sr-page)) .browser-bar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

:where(body:has(.browser-content > .sr-page)) .addr-wrap {
  background: #f3f4f6;
  border-color: #e5e7eb;
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap:focus-within {
  background: #ffffff;
  border-color: var(--accent);
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap svg {
  stroke: #9ca3af;
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap:focus-within svg {
  stroke: var(--accent);
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap input {
  color: #111827;
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap input::placeholder {
  color: #9ca3af;
}
:where(body:has(.browser-content > .sr-page)) .addr-wrap input:focus {
  background: transparent;
}

:where(body:has(.browser-content > .sr-page)) .browser-bar .bar-home {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #4b5563;
}
:where(body:has(.browser-content > .sr-page)) .browser-bar .bar-home:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: var(--accent);
}

:where(body:has(.browser-content > .sr-page)) .browser-content {
  background: #ffffff;
  color: #111827;
}

/* ============================================================
   搜索态 · 纯黑系统（body.theme-search-dark）
   ------------------------------------------------------------
   特里博 / Trebor 专属。整块桌面先黑下去（body 带 !important，
   盖掉桌面那层浅灰），窗口投一圈红边阴影，然后工具条、地址栏、
   结果条、标题挨个变黑变红。切回去只靠 remove 这个类，
   JS 里没有一毫秒的行内样式。
   ============================================================ */

body.theme-search-dark {
  background: #050505 !important;
  transition: background-color 0.4s ease;
}

body.theme-search-dark #layout {
  box-shadow:
    0 0 0 1px rgba(255, 0, 0, 0.2),
    0 18px 40px rgba(0, 0, 0, 0.8);
}

/* ---------- 工具条与地址栏 ---------- */
body.theme-search-dark .browser-bar {
  background: #111111;
  border-bottom: 1px solid #333333;
}
body.theme-search-dark .addr-wrap {
  background: #000000;
  border-color: #333333;
}
body.theme-search-dark .addr-wrap:focus-within {
  background: #000000;
  border-color: #660000;
}
body.theme-search-dark .addr-wrap input {
  color: #ffffff;
}
body.theme-search-dark .addr-wrap input::placeholder {
  color: #555555;
}
body.theme-search-dark .addr-wrap input:focus {
  background: transparent;
}
body.theme-search-dark .addr-wrap svg {
  stroke: #555555;
}
body.theme-search-dark .addr-wrap:focus-within svg {
  stroke: #ff4d4d;
}
body.theme-search-dark .browser-bar .bar-home {
  background: #000000;
  border-color: #333333;
  color: #888888;
}
body.theme-search-dark .browser-bar .bar-home:hover {
  background: #1a0000;
  border-color: #660000;
  color: #ff4d4d;
}

/* ---------- 结果区 ---------- */
body.theme-search-dark .browser-content {
  background: #050505;
  color: #e5e5e5;
}

body.theme-search-dark .sr-stats {
  color: #888888;
}

body.theme-search-dark .sr-item {
  background: #111111;
  border-color: #333333;
}
body.theme-search-dark .sr-item.is-clickable:hover {
  background: #171717;
  border-color: #444444;
  box-shadow: 0 0 0 1px rgba(255, 77, 77, 0.16);
}
body.theme-search-dark .sr-item .sr-title {
  color: #ff4d4d;
}
body.theme-search-dark .sr-item.is-clickable:hover .sr-title {
  color: #ff6b6b;
}
body.theme-search-dark .sr-item .sr-snippet {
  color: #888888;
}
body.theme-search-dark .sr-url .sr-site {
  color: #555555;
}
body.theme-search-dark .sr-url .sr-path {
  color: #444444;
}
body.theme-search-dark .sr-hl {
  color: #ffffff;
}
body.theme-search-dark .sr-item.is-dead .sr-title {
  color: #7a3a3a;
}
body.theme-search-dark .sr-item.is-dead .sr-url .sr-site {
  color: #444444;
}

/* 折叠条目与空状态：白纸上的浅灰虚线，到黑里改成暗灰虚线 */
body.theme-search-dark .sr-folded {
  background: #0d0d0d;
  border-color: #2a2a2a;
  color: #666666;
}
body.theme-search-dark .sr-empty {
  background: #0d0d0d;
  border-color: #2a2a2a;
}
body.theme-search-dark .sr-empty-title {
  color: #d0d0d0;
}
body.theme-search-dark .sr-empty-text {
  color: #888888;
}

/* 加密档案条：黑里那格红要退成「暗红铁板」，才不至于像块荧光塑料 */
body.theme-search-dark .sr-item.is-red-locked {
  background: #2a0000;
  border-color: #660000;
}
body.theme-search-dark .sr-item.is-red-locked:hover {
  background: #3a0000;
  border-color: #8f0000;
  box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.25), 0 10px 24px rgba(0, 0, 0, 0.7);
}
body.theme-search-dark .sr-item.is-red-locked:active {
  background: #200000;
}

/* ---------- 星标：白药丸在黑底上太跳，换成暗底红边 ---------- */
body.theme-search-dark .page-star {
  background: #141414;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 6px 16px rgba(0, 0, 0, 0.5);
  color: #777777;
}

/* ---------- 4. 网页负片：崩坏态下网页反色（图片 / 视频除外） ----------
   #browser-content-area 的每个直接子元素就是「一张网页」
   （.sr-page / .cnn-news-page / .news-home / .bili-page ……），
   所以滤镜挂在子元素上：主视窗外壳、左侧导航、工具条、地址栏
   全都在外面，一个像素都不会被反 —— 要求里「不能作用于游戏外壳」就是靠这一层
   结构保证的，不靠任何额外开关。

   两页不吃反色，直接用 :not() 从选择器里摘掉（不是叠一层 invert —— 那样只是把
   同一条声明再写一遍，照样反一次）：
   · .sr-page 搜索结果列表：它本来就有一套手工调的「黑底红字」皮肤
     （见上面 .theme-search-dark .sr-item / .sr-title / .sr-stats 那一组）。
     吃反色只会翻成白底黑字的浅色页 —— 卡片近白、文字浅灰，直接糊成一片。
   · .dn-page 暗网卷宗：设计上就是 #050505 纯黑底 + 血红标题 + 深灰网格。
     吃反色会翻成惨白底 + 粉红字，纯黑压迫感全丢，封存章也不再扎眼。
   其余新闻 / 百科 / 论坛 / 视频页照旧翻负片。
   星标按钮是 UI 不是网页内容，一并摘掉，否则黑底上的金星会翻成蓝色。

   图片和视频用「反两次」抵消：父级已经 invert(1) + hue-rotate(180deg)，
   媒体自己再来一遍，两层合起来正好是恒等变换 ——
   照片、海报、视频画面保持原色，只有网页的文字与色块被翻成负片。
   注意这条必须带 !important：媒体自身的 filter 会被上面那条继承性规则压住；
   它的 :not() 链也必须和父级那条逐字一致，否则被摘掉的两页里，
   图片会失去「父级那一次」而单独被反一遍（结果就是图变负片、底还是黑的）。 */
body.theme-search-dark #browser-content-area > *:not(.sr-page):not(.dn-page):not(.page-star) {
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.5s ease;
}

body.theme-search-dark #browser-content-area > *:not(.sr-page):not(.dn-page) img,
body.theme-search-dark #browser-content-area > *:not(.sr-page):not(.dn-page) video {
  filter: invert(1) hue-rotate(180deg) !important; /* 抵消父级的反色 */
}

/* 兜底：这两页永远不吃反色（与上面的 :not() 双保险，
   以后别处再加 filter 规则也不会把 sr-page / dn-page 翻过去）。 */
body.theme-search-dark #browser-content-area > .sr-page,
body.theme-search-dark #browser-content-area > .dn-page {
  filter: none !important;
}

/* ============================================================
   真结局 · 心理预警（结尾前的一道刹车）
   ------------------------------------------------------------
   播到「你颤抖着手，点开了文件：」就停住，这里浮出一行灰字
   和两个方框。它必须像终端自己打出来的一行提示：没有白底、
   没有圆角、没有阴影，只有灰字、细边框，和这片纯黑。
   ============================================================ */
.ending-warning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  opacity: 0;
  animation: endingWarningIn 1.1s ease 0.15s forwards;
}

@keyframes endingWarningIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 容器里的 p 统一带「逐行上浮」，这条灰字不能跟着浮，
   所以把 #ending-text-container p 那套动画在这里整个关掉。 */
#ending-text-container .ending-warning .ending-warning-note {
  margin: 0;
  max-width: 560px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "PingFang SC",
    "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  color: #888888;
  text-align: center;
  opacity: 1;
  transform: none;
  animation: none;
}

.ending-warning-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ending-warning-btn {
  padding: 9px 22px;
  border: 1px solid #444444;
  border-radius: 2px;
  background: transparent;
  color: #ffffff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "PingFang SC",
    "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  cursor: pointer;
  opacity: 1;
  transform: none;
  animation: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.ending-warning-btn:hover,
.ending-warning-btn:focus-visible {
  border-color: #ffffff;
  color: #ffffff;
  outline: none;
}

@media (max-width: 640px) {
  .ending-warning { gap: 14px; margin-top: 20px; }
  #ending-text-container .ending-warning .ending-warning-note {
    font-size: 12px;
    letter-spacing: 0.08em;
  }
  .ending-warning-btns { gap: 12px; }
  .ending-warning-btn { padding: 8px 16px; font-size: 12.5px; }
}

/* ============================================================
   手机端：整屏铺满 + 视频全屏 + BGM 侧边收纳
   ------------------------------------------------------------
   判定条件为什么写两段：
     iPhone 12 横过来是 844×390，宽度已经超过 768px ——
     只写 (max-width: 768px)，真机横屏时一条都命中不了。
     所以第二段沿用本文件既有的「手机横屏」判据
     （orientation: landscape + 可视高度 ≤500px），再补 width ≤1024px
     兜住平板横屏。PC 正常窗口（宽 ≥1025px 且高 ≥500px）两段都不成立，
     桌面端零影响 —— 与前面移动端布局用的是同一套约定。
   ============================================================ */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {

  /* ---------- 1. 主视窗外的「桌面」不再存在 ---------- */
  body {
    background: #ffffff !important;
    background-image: none !important;      /* 去掉 24px 网点矩阵 */
  }

  /* 光晕是跟着鼠标走的，触屏没有指针，留着只会在边角泛一层紫 */
  #bg-glow { display: none !important; }

  /* ---------- 2. 主视窗铺满全屏（不留边、不圆角、不投影） ---------- */
  #layout {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;             /* 取消 translate(-50%,-50%) 居中 */
    width: 100vw !important;
    /* 兜底 100vh；有 visualViewport 时跟着 --app-vh 走，
       软键盘弹起整窗变矮，底部输入框不会被盖住 */
    height: 100vh !important;
    height: var(--app-vh, 100vh) !important;
    max-width: none !important;
    max-height: 100vh !important;
    max-height: var(--app-vh, 100vh) !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* ---------- 3. 视频页：把高度尽量留给画面 ---------- */
  .mail-player {
    padding: 10px 12px;
    gap: 10px;
  }
  .mail-player video {
    max-width: 100%;
    /* 邮件面板标题条约 50px + 本段上下内边距与两行小字约 82px，
       剩下的全给画面；object-fit: contain 保证不裁切 */
    max-height: calc(var(--app-vh, 100vh) - 132px);
  }

  /* ---------- 4. BGM 按钮：贴左边缘，常态只露一半 ---------- */
  .bgm-dock {
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    bottom: 80px !important;                /* 离开底部操作区 */
    line-height: 0;
    /* 向左推出自身宽度的一半：常态只露一条 24px 的窄边 */
    transform: translateX(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
  /* 展开：滑回边缘内 12px，48px 的按钮完整露出 */
  .bgm-dock.is-expanded {
    transform: translateX(12px);
  }
  .bgm-dock.is-expanded .bgm-btn {
    background: rgba(94, 63, 190, 0.9);
  }
  .bgm-btn {
    width: 48px !important;
    height: 48px !important;
  }
  .bgm-icon {
    position: relative;
    left: 12px;                              /* 收起时把音符挪进可见的那半边 */
    font-size: 20px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease, opacity 0.3s ease;
  }
  .bgm-dock.is-expanded .bgm-icon { left: 0; }
}

/* 系统开启「减少动态效果」时，滑出 / 收回直接到位 */
@media (prefers-reduced-motion: reduce) {
  .bgm-dock { transition: none; }
}

/* ============================================================
   黑化搜索态 · 侧栏血化 + 光晕变红（body.theme-search-dark）
   ------------------------------------------------------------
   这一层故意放在文件最后，专门盖住前面写死的品牌紫：

     1) #rail 从 #5e3fbe 沉成 #8b0000，悬停 / 选中 / 未读点一起换血色
     2) #bg-glow 的两层渐变（径向光晕 + 24px 网点）全部转红，并放开
        第 186 行「暗色态直接把光晕收成 opacity:0」那一条
     3) body 上重绑 --accent / --accent-hover，让写稿器提交、播放键、
        文章内链这些跟着 var(--accent) 走的组件一起变红

   全部靠 .theme-search-dark 这一个类继承，JS 一行没动；
   类一加上立刻换色，remove 之后立刻回紫，没有行内样式残留。
   ============================================================ */

/* ---------- 0. 强调色改绑（只写在 body 上，绝不碰 :root） ---------- */
body.theme-search-dark {
  --accent: #dc2626;
  --accent-hover: #b91c1c;
}

/* ---------- 1. 左侧导航条：紫 → 血 ---------- */
body.theme-search-dark #rail {
  background: #8b0000;
}

/* 悬停 / 选中：白色蒙层比紫底时更轻，压住血红的饱和度，
   免得整条栏在鼠标划过时泛粉 */
body.theme-search-dark .rail-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
body.theme-search-dark .rail-btn.active {
  background: rgba(255, 255, 255, 0.25);
}

/* 选中态左侧那条白色短条保持纯白：红底上它是唯一的冷色，
   换成任何暖色都会跟血红糊成一片 */
body.theme-search-dark .rail-btn.active::before {
  background: #ffffff;
}

/* 未读红点的外圈原来垫的是紫色，跟着底色一起换，
   否则红点外面会套一枚突兀的紫环 */
body.theme-search-dark .rail-btn.has-unread::after {
  box-shadow: 0 0 0 2px #8b0000;
}

/* 左下角安装徽标：白蒙层略提，边框压成半透明白，不在红底上抢戏 */
body.theme-search-dark .rail-badge {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.26);
}

/* ---------- 2. 左下角 BGM 圆钮：紫玻璃 → 深血红 ----------
   它原本是 rgba(94,63,190,.42) 的毛玻璃紫。黑化态要求「一丝紫都不许留」，
   所以这里不再用半透明红 —— 那种写法只有 0.6 的遮盖力，底下的紫色光晕、
   网点会从 40% 的缝隙里透上来，看着仍是紫的；改成不透明的 #4a0000 实色，
   配 #ff3333 的边框与一圈红色外发光，才是彻底的血红。

   选择器同时点名 .bgm-dock.is-creepy 的组合态：黑化搜索会顺手把 BGM 切进
   慢放，dock 随之拿到 is-creepy，那条 rgba(127,29,29,.58) 的旧规则也在抢
   同一个属性 —— 两边都写进选择器，谁的权重高都不会漏回半透明暗红玻璃。

   全部 !important：这一层是黑化态的最终裁决，不该被后面任何规则翻掉；
   但只锁颜色相关的四个属性，圆角、尺寸、毛玻璃、过渡一律不碰。 */
body.theme-search-dark .bgm-btn,
body.theme-search-dark .bgm-dock.is-creepy .bgm-btn {
  background: #4a0000 !important;
  border-color: #ff3333 !important;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.3) !important;
  color: #ff6666 !important;
}

/* 音符图标：🎵 是彩色 emoji，color 对它无效（emoji 有自带色板），
   必须用滤镜把整枚字形压成纯黑，才能和 #4a0000 的深红底形成
   「红底黑符」的高对比。brightness(0) 只改亮度、不改形状与位置，
   播放中的呼吸动画（transform）照常跑。
   只挂在 body.theme-search-dark 上：退出黑化后这条不命中，
   图标立刻回到系统原色。 */
body.theme-search-dark .bgm-icon,
body.theme-search-dark .bgm-dock.is-creepy .bgm-icon {
  filter: brightness(0) !important; /* 强制把彩色 emoji 变成纯黑 */
  opacity: 1 !important;            /* 保持不透明，让黑色更纯粹 */
}

/* 悬停：整体提亮一档，但仍留在深红区间（不往 #b91c1c 那种亮红跑） */
body.theme-search-dark .bgm-btn:hover,
body.theme-search-dark .bgm-dock.is-creepy .bgm-btn:hover {
  background: #5c0000 !important;
  border-color: #ff4d4d !important;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.42) !important;
}

/* 按下：压得更暗，给一点「按进去」的反馈 */
body.theme-search-dark .bgm-btn:active,
body.theme-search-dark .bgm-dock.is-creepy .bgm-btn:active {
  background: #3a0000 !important;
  border-color: #ff3333 !important;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.26) !important;
}

/* 键盘焦点环：原来在深红底上是白圈，改成粉红，跟按钮同一色系 */
body.theme-search-dark .bgm-btn:focus-visible {
  outline-color: #ff6666;
}

/* 慢放时那圈向外扩散的光环（is-creepy 的 ::after）：
   原本是 rgba(248,113,113,.38) 的浅红，黑化态下统一压到 #ff3333 系，
   免得它自己亮成一枚偏粉的圈，把刚压下去的紫红感又带回来 */
body.theme-search-dark .bgm-dock.is-creepy .bgm-btn::after {
  border-color: rgba(255, 51, 51, 0.42) !important;
}

/* ---------- 3. 背景光晕：那盏紫灯换成红灯 ----------
   这里用 background-image 而不是 background 简写：
   简写会把第二层「24px 网点」一起冲掉，网格就没了。
   保持 0% / 55% / 100% 三段透明度与 24px 网点尺寸不变，
   只把 rgba(94,63,190,…) 换成红 —— 光晕的扩散范围、
   遮罩收边、跟随鼠标的位移全部沿用原来的。
   红色在纯黑底上比紫色更吃光，网点层提亮到 #ef4444 / 0.62，
   并用 0.62 的透明度收在一个「暗红发亮」的区间里，不往粉上跑。 */
body.theme-search-dark #bg-glow {
  background-image:
    radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(220, 38, 38, 0.18) 0%,
      rgba(220, 38, 38, 0.09) 55%,
      rgba(220, 38, 38, 0) 100%),
    radial-gradient(rgba(239, 68, 68, 0.62) 1.5px, transparent 1.5px) !important;
  background-size: auto, 24px 24px !important;
  background-position: center center, center center !important;
}

/* 第 186 行让暗色态永远 opacity:0（怕紫灯在黑底上乱晃）。
   现在灯本身已经是红的，改成「鼠标动过才亮」的原有语义：
   只有带 .is-on 时才重新点起来，没动鼠标依旧不亮。 */
body.theme-search-dark #bg-glow.is-on {
  opacity: 1;
}

/* ============================================================
   开机登录屏（#login-screen）
   ------------------------------------------------------------
   结构在 index.html 的 <body> 最顶端，这里只管长相。

   层级 9000：高过 #layout(10) / #bg-glow(1) / .bgm-dock(300)，
   所以登录时整台机器是封死的；又低于结局演出层
   (9500 / 9998 / 9999) 和竖屏守卫(99999) —— 那几层要么在通过登录
   之后才出现，要么是「请横屏」的强制提示，登录屏不该盖在它们上面。

   画面：assets/image/login-bg.jpg（6000×4000 风景照）+ 两层紫色暗罩，
   中间浮一块 backdrop-filter 毛玻璃卡片。玻璃透出的是「被压暗、被模糊
   过的照片」，不是一块纯色板；卡内文字再各压一层 text-shadow，照片里
   最亮的天空也吃不掉标题。
   ============================================================ */

#login-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;

  /* 背景三层，从上往下叠：
     ① 径向暗角：四角压到接近全黑，视线自然收到中间那张卡片上，
        顺手把照片里最容易过曝的天空和水面按住；
     ② 纵向紫黑渐变：上浅下深，和主界面的深紫底色是一族的；
     ③ 照片本体：cover 铺满，焦点略偏上（center 42%），竖屏手机
        也不会只切到一片地砖。
     background-color 兜底：照片有 2MB，慢网时先看到深紫，不会白屏闪一下。 */
  background-color: #0b0918;
  background-image:
    radial-gradient(circle at 50% 42%,
      rgba(11, 9, 24, 0) 0%,
      rgba(11, 9, 24, 0.4) 72%,
      rgba(8, 6, 18, 0.82) 100%),
    linear-gradient(180deg,
      rgba(16, 12, 34, 0.5) 0%,
      rgba(11, 8, 26, 0.68) 100%),
    url('../assets/image/login-bg.jpg');
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
  background-position: center center, center center, center 42%;

  -webkit-tap-highlight-color: transparent;
  /* 登录成功只是给这块屏加 .is-hidden，靠这条过渡把照片化开。
     visibility 也写进过渡里：opacity 归零的同时退出命中测试，
     不会留下「看不见但还挡鼠标」的残影。
     刻意不写 will-change: opacity —— 那会让本层成为 backdrop root，
     卡片的毛玻璃就采不到照片，只会在渐隐时闪一下。 */
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* 收起态：绝不能再用 display:none —— 那会跳过过渡、直接「啪」一下切屏。
   这里用 opacity + visibility 做成 0.8s 渐隐，玩家能透过正在淡去的照片
   看到背后早已渲染好的 #layout。
   pointer-events:none 让这 0.8s 里鼠标直接穿透到下面的游戏界面。 */
#login-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 卡片比底色晚半步：整块轻微放大并上浮，读起来像「面板被推远」，
   而不是一张纸原地变透明。只动 transform，不改阴影与尺寸。 */
#login-screen .login-box {
  transition: transform 0.8s cubic-bezier(0.22, 0.85, 0.3, 1);
}
#login-screen.is-hidden .login-box {
  transform: scale(1.05) translateY(-6px);
}

/* ---------- 毛玻璃卡片 ---------- */
.login-box {
  width: min(420px, calc(100vw - 48px));
  /* flex 列 + stretch：子元素依旧撑满整张卡片（等价于原来的块级排版），
     但高度不再受外边距塌陷影响，加分隔线 / 装饰时也不用再算一遍。 */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 40px 44px 34px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);

  /* 半透明深紫 + 一层从左上斜下来的高光：
     高光让平面「像一块玻璃」而不像一块板，同时把左上角垫亮一点点，
     字压上去反而更清楚。颜色必须在最后一位，它是最底层。 */
  background:
    linear-gradient(155deg,
      rgba(255, 255, 255, 0.085) 0%,
      rgba(255, 255, 255, 0.022) 40%,
      rgba(255, 255, 255, 0) 62%),
    rgba(26, 21, 48, 0.34);

  /* 毛玻璃：模糊的是卡片背后的照片，不是卡片里的字。
     saturate 稍微提一点，免得照片被压暗后整块发灰。 */
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);

  box-shadow:
    0 24px 64px -24px rgba(0, 0, 0, 0.72),
    0 2px 10px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-align: center;
}

/* 不支持 backdrop-filter 的老浏览器：玻璃退化成一块更实的深紫板。
   宁可少一点通透，也不能让字直接压在照片上读不清。 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .login-box {
    background:
      linear-gradient(155deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.015) 40%,
        rgba(255, 255, 255, 0) 62%),
      rgba(22, 18, 40, 0.84);
  }
}

.login-kicker {
  margin: 0 0 14px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;              /* 字距把整体推右了，补偿回来 */
  color: rgba(216, 208, 255, 0.9);  /* 带一点品牌紫的冷白；10.5px 的小字不敢给太虚 */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.login-title {
  margin: 0;                       /* 下边距交给 .login-hint 的 margin-top，避免两者折叠后多出 2px */
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f5f8ff;
  /* 第一层 1px 硬阴影压住笔画边缘，第二层大范围柔和阴影把字从照片上「托起来」 */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

/* 输入框外壳：错误态的红色描边挂在这一层，输入框本身只管底色与边框；
   圆角跟着输入框一起改成 10px，光圈才不会从四个角漏出去。 */
.login-field {
  border-radius: 10px;
  transition: box-shadow 0.18s ease;
}

#login-pass {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);  /* 比卡片再深一档：玻璃上开一扇小窗 */
  color: #f7f9ff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 16px;                  /* 16px 起步：iOS 上不会被自动放大 */
  letter-spacing: 0.16em;
  text-align: center;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#login-pass::placeholder {
  color: rgba(206, 213, 232, 0.6);
  letter-spacing: 0.06em;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

#login-pass:focus {
  border-color: #a78bfa;            /* 主界面的品牌紫，比原来的蓝更贴主题 */
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

/* 浏览器自动填充：默认会刷成刺眼的浅黄底，整块玻璃就毁了。
   用一条足够大的 inset 阴影把底色盖回深紫，文字颜色单独指定。 */
#login-pass:-webkit-autofill,
#login-pass:-webkit-autofill:hover,
#login-pass:-webkit-autofill:focus {
  -webkit-text-fill-color: #f7f9ff;
  -webkit-box-shadow: 0 0 0 60px #16122a inset;
  caret-color: #f7f9ff;
  transition: background-color 99999s ease-out 0s;
}

.login-field.is-error #login-pass {
  border-color: #ff5c5c;
  background: rgba(48, 6, 10, 0.42);
}

.login-field.is-error {
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.16);
}

/* 密码提示：现在是标题下面、输入框上面那一行。
   8px 贴住标题（读作一句补充说明），24px 与输入框拉开（读完该动手了）；
   字号 14：去掉按钮旁那句说明后，它是卡片里唯一的中间层文字。
   玻璃上给 0.78 的白，比纯白软一档，也不至于被照片糊掉。 */
.login-hint {
  margin: 8px 0 24px;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

/* 品牌紫（#5e3fbe）：和左侧导航栏、活动态是同一支颜料。
   渐变只比纯色亮一档（#6b4bd0 → #5e3fbe），玻璃上看起来是「一块有厚度的紫」；
   hover 提亮 + 紫色外发光，active 压深并下沉 1px，手感落在同一套节奏里。 */
#login-btn {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, #6b4bd0 0%, #5e3fbe 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  cursor: pointer;
  box-shadow:
    0 10px 26px -12px rgba(94, 63, 190, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

#login-btn:hover {
  background: linear-gradient(180deg, #7c5ae2 0%, #6f4dd4 100%);
  box-shadow:
    0 12px 30px -10px rgba(124, 90, 226, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

#login-btn:active {
  background: linear-gradient(180deg, #5a3cb2 0%, #5335a8 100%);
  transform: translateY(1px);
  box-shadow:
    0 6px 16px -10px rgba(94, 63, 190, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#login-btn:focus-visible {
  outline: 2px solid rgba(196, 181, 253, 0.85);
  outline-offset: 3px;
}

.login-error {
  margin: 14px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #ffb3b3;                   /* 玻璃上偏粉的红：12.5px 小字也要够亮，最亮花瓣上仍有 5:1 */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* 小屏：面板收窄、内边距降一档，圆角收到 14 免得像块板砖；
   模糊降到 14px —— 手机上 18px 的 backdrop-filter 掉帧明显，
   而卡片本身变小了，14px 已经看不出差别。输入框仍保持 16px 防缩放。 */
@media (max-width: 480px) {
  .login-box {
    padding: 30px 22px 26px;
    width: calc(100vw - 36px);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
  }
  .login-title { font-size: 21px; }
}

/* ============================================================
   附件页：手风琴（预览块插在被点卡片正下方）
   ------------------------------------------------------------
   列表和预览块在同一个滚动流里，.mail-attach-scroll 是唯一的滚动容器。
   .attach-drawer 由 js 现场创建，insertAdjacentElement('afterend')
   插进 .mail-attach-body 里、紧跟被点的那张卡片，所以它永远是「列表的
   一部分」：下面的卡片被自然顶下去，既不会跑到屏幕右侧，也不会另开一页。
   ============================================================ */
.mail-attach-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* 始终给滚动条留位：展开后一出现滚动条，列表也不会突然窄 8px */
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
}

/* 预览块。水平方向不留外边距 —— 它已经是 .mail-attach-body 的子元素，
   左右由列表的 padding 统一控制，这样宽度能和上下的卡片严格对齐。
   纵向：列表是 flex column 且 gap:10px，所以这里写 2/14 才是视觉上的
   「上方 12px、下方 24px」（2+10、14+10）。
   背景用纯黑、圆角归零：媒体铺满时四角不会露出底色，看起来就是一块
   原生内嵌的播放面板，而不是「浮在黑卡片上的一个小窗口」。 */
.attach-drawer {
  margin: 2px 0 14px 0;
  flex: none;
  background: #000000;
  border-radius: 0;
  overflow: hidden;
  animation: drawerOpen 0.3s ease-out forwards;
}
@keyframes drawerOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 媒体容器：不再内缩、不再居中，就是一个铺满抽屉的块。
   内边距和最小高度都去掉 —— 有它们就会在画面四周留出一圈黑边，
   看起来像「视频没铺满」。 */
.attach-media-wrap {
  display: block;
  width: 100%;
}

/* 图片 / 视频都走原生的 <img> / <video controls>。
   宽度 100% + 高度 auto：按自身比例算出高度，横向一定撑满抽屉，
   既不会变形（没有固定 height），也不会被裁掉（不用 cover）。 */
.attach-media-wrap video,
.attach-media-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

/* 媒体加载失败时的一句话（黑底上要够亮） */
.attach-drawer .attach-empty-tip {
  margin: 0;
  padding: 24px 16px 6px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #9a9aa2;
}

/* 失败提示下面的两个出口：重新加载 / 新窗口打开 */
.attach-drawer .attach-error-actions {
  margin: 0;
  padding: 0 16px 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.attach-drawer .attach-retry,
.attach-drawer .attach-open-link {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #d6d4e2;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.attach-drawer .attach-retry:hover,
.attach-drawer .attach-open-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.attach-drawer .attach-retry:active {
  transform: translateY(1px);
}

/* 展开中的那张卡片：描紫边，说明「这条正在下面播」 */
.mail-attach-body .attach-card.is-active {
  border-color: #5e3fbe;
  background: #faf7ff;
  box-shadow: 0 10px 24px rgba(94, 63, 190, 0.16);
}
.mail-attach-body .attach-card.is-active .attach-info b { color: #4b2fa8; }
.mail-attach-body .attach-card.is-active .attach-thumb { background: #e9e1ff; }
.mail-attach-body .attach-card.is-active .attach-open { color: #4b2fa8; }

/* 窄屏：只收列表留白，媒体依旧贴边铺满（这里不能再写 padding / max-height，
   否则小屏又会长出一圈黑边） */
@media (max-width: 900px) {
  .mail-attach-body { padding: 18px 16px 12px; }
}

/* 极矮横屏：列表再收一档。媒体同样不加限高 —— 高度由宽度算，
   真放不下就交给 .mail-attach-scroll 滚动，别去截画面 */
@media (orientation: landscape) and (max-height: 500px) {
  .mail-attach-body { padding: 12px 16px 8px; gap: 8px; }
  .attach-drawer { margin: 2px 0 10px 0; }
}

/* ============================================================
   普通浏览器：命中「时光机专属页面」时的指路文字
   ------------------------------------------------------------
   拼在 .sr-page 外面，所以它只是页面末尾的一句话，不是一条结果：
   没有边框、没有底色、没有圆角、没有 :hover，也没挂 data-page ——
   鼠标移上去不会变手型，点它什么都不会发生。
   ============================================================ */
.search-archive-tip {
  /* 结果列表只有一条折叠框，这里用 40px 把它和上面的框隔开一段 */
  margin-top: 40px;
  text-align: center;
  font-size: 14.5px;
  line-height: 2;
  color: #8b929e;
  letter-spacing: 0.5px;
  /* 说明文字永远不可交互：不出现手型、不被选中成可点对象 */
  cursor: default;
  user-select: text;
}

/* 窄屏：跟结果列表一起收一点，别把这段话挤成三行 */
@media (max-width: 640px) {
  .search-archive-tip {
    margin-top: 26px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1.9;
    letter-spacing: 0.3px;
  }
}

/* ============================================================
   古早新闻页：正文末尾的转载声明
   ------------------------------------------------------------
   三篇旧稿（2004 恶魔暗示 / 2004 多州警告 / 2009 义工投诉）共用。
   它挂在 .on-body 里面，正文规则 .old-news-page .on-body p 是
   「16px / 首行缩进两字 / #222」，而且优先级 (0,2,1) 高于单独一个
   .on-disclaimer (0,2,0) —— 所以选择器必须带上 .on-body（加到 0,3,0），
   否则字号、颜色、缩进都会被正文那条压回去。
   ============================================================ */
.old-news-page .on-body .on-disclaimer {
  font-size: 15px;
  font-weight: bold;
  color: #555;
  text-align: right;
  margin-top: 40px;
  text-indent: 0; /* 取消首行缩进 */
}

/* ============================================================
   黑化搜索态 · 首页（.news-home）色块统一压成暗红
   ------------------------------------------------------------
   首页那些「占位色块」原本是紫 / 粉 / 橙 / 青的渐变（缩略图甚至直接写在
   HTML 内联 style 里），平时是彩色的版面节奏；一旦进黑化态，整页吃
   invert(1) hue-rotate(180deg)，它们会翻成荧光绿、亮橙、荧光紫，
   在纯黑底上跳得最凶 —— 就是「突兀」的来源。

   所以这里把这几种色块全部钉死成同一族的暗红，跟左侧血红的导航栏、
   黑色的页面底同一口气。三条硬要求：

   1. 一律 !important：缩略图的渐变是写在标签上的内联 style，
      普通声明压不过它（内联样式优先级高于任何选择器）。
   2. 只换颜色，不碰 width / height / border-radius / padding / flex —— 
      排版、尺寸、位置与原来逐像素一致。
   3. 选择器都带 body.theme-search-dark：只在这一个状态里生效，
      平时回浅色仍然是原来那套彩色。

   注意 .nh-hero-cover 原本用的是 background 简写（含渐变），
   这里也用简写整体替换；.nh-thumb / .nh-like-thumb 原本用的是
   background-image + CSS 里的 background-size/position，
   所以只覆盖 background-image，尺寸那两条原样保留。
   ============================================================ */

/* 1. 头条大图背景：紫 → 深红 */
body.theme-search-dark .news-home .nh-hero-cover {
  background: linear-gradient(135deg, #1a0000 0%, #4a0000 100%) !important;
  box-shadow: 0 10px 26px rgba(139, 0, 0, 0.25) !important;
}

/* 2. 头条里的标签（深度 · Lost Media）：白色半透明药丸 → 暗红玻璃片 */
body.theme-search-dark .news-home .nh-chip {
  background: rgba(255, 0, 0, 0.15) !important;
  border-color: rgba(255, 50, 50, 0.4) !important;
  color: #ff9999 !important;
}

/* 3. 普通新闻列表的缩略图（覆盖原本的 inline style） */
body.theme-search-dark .news-home .nh-item .nh-thumb {
  background-image: linear-gradient(135deg, #330000, #550000) !important;
}

/* 4. 猜你喜欢的缩略图 */
body.theme-search-dark .news-home .nh-like-item .nh-like-thumb {
  background-image: linear-gradient(135deg, #220000, #440000) !important;
}

/* 5. 右侧「热门排行榜」前三名的序号：红 / 橙 / 金 → 统一血红 */
body.theme-search-dark .news-home .nh-rank li:nth-child(1) b,
body.theme-search-dark .news-home .nh-rank li:nth-child(2) b,
body.theme-search-dark .news-home .nh-rank li:nth-child(3) b {
  color: #ff4d4d !important;
}

/* 6. 让上面那几块「暗红」真的落到屏幕上：色块自己再反一次
   ------------------------------------------------------------
   .news-home 整页在黑化期是吃 invert(1) hue-rotate(180deg) 的
   （见前面「4. 网页负片」那一组）。只写第 1/3/4 条的话，
   #4a0000 到屏幕上会被翻成 #ffb5b5 一档的浅粉：
   色系统一了，亮度却更高，色块照样是「亮」的，反而更跳。

   做法与媒体图那条完全一致（`.theme-search-dark ... img`）：给色块自己
   再叠一层同样的滤镜，两层合起来是恒等变换，屏幕上显示的就是这里写死的暗红，
   和左侧 rgb(139, 0, 0) 的血红导航同一档。

   只加在三个「纯色块」上，不加 .nh-chip：标签在头条封面里，
   封面已经带了一层，再叠就是第三次反色，会重新翻成浅粉。
   封面里除白字没有别的颜色，白色反两次仍是白色，
   头条标题、摘要、右上角那圈白色高光都不受影响；
   filter 也不参与布局，宽高、圆角、内边距逐像素不变。 */
body.theme-search-dark .news-home .nh-hero-cover,
body.theme-search-dark .news-home .nh-item .nh-thumb,
body.theme-search-dark .news-home .nh-like-item .nh-like-thumb {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* ============================================================
   黑化搜索态 · 首页顶部导航栏「去紫」（body.theme-search-dark）
   ------------------------------------------------------------
   首页导航条是浅色门户的配色，紫是它的主色：
     · .nh-logo::before  品牌方块：linear-gradient(#5e3fbe, #9d7bea)
     · .nh-cat.active::after 「首页」下方的指示条：#5e3fbe
     · 放大镜 SVG 的描边：常态 #7d8590，聚焦时更紫
   平时这层紫很轻，进了黑化态反而最刺眼 —— 因为整页在吃
   invert(1) hue-rotate(180deg)，紫色被翻成霓虹紫（实测 #a181f7 一档），
   在黑底上泛光，看着像另一套主题漏了进来。

   关键点（和上面「首页色块」那一组是同一套机制）：
   只把颜色写成红色是没用的。写 #ff3333 叠在反色父级下，
   到屏幕上会变成浅粉红 #ff8b8b 一档，红是红，但发飘、发亮。
   所以这里仍然用「反两次抵消」：目标元素自己再叠一层同款滤镜，
   父级一次 + 自己一次 ≈ 恒等，屏幕落回来的就是下面写死的色值
   （比只吃一次父级反色的 #ff8b8b 淡粉红重得多）。

   有个物理上限要先说清：这个补偿能挡住「亮度翻转」，挡不住「色域截断」。
   父级 hue-rotate 那一步，红通道会先算到 300 以上、再被 clamp 回 255，
   这部分信息永久丢失 —— 所以屏幕色只能落到 #ff3333 的邻居：
   实测按钮底 / 下划线 #d94f4f、菱形最亮 #c54848。
   想再亮一档，把写死的红往亮里调（#ff4747 → 屏幕 #eb5656）也能走，
   但 #ff3333 本身（G=51）在这条链上不可达：
   反色后的红，绿蓝分量最低只能压到 79 左右。

   应用范围只限「发光的小色块 / 图标 / 按钮」这四类纯色元素：
   菱形方块、分类下划线、放大镜描边、搜索按钮。
   filter 不参与布局，宽高、圆角、间距一像素不动；
   给它们补同款 transition，是为了让进出黑化态的 0.5 秒里
   父级与自己同步渐变，中途不会闪出一帧「只反一次」的怪色。
   ============================================================ */

/* 1. Logo 前面的品牌方块：#5e3fbe→#9d7bea 紫 → 血红渐变
   （尺寸 10px、rotate(45deg) 保持原样，只换渐变两端的颜色） */
body.theme-search-dark .news-home .nh-logo::before {
  background: linear-gradient(135deg, #ff3333, #990000) !important;
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.5s ease;
}

/* Logo 文字悬停：原本跳紫 #5e3fbe（反色后成黄绿，最扎眼的一处） */
body.theme-search-dark .news-home .nh-logo:hover {
  color: #ff3333;
}

/* 2. 分类下划线（当前选中的「首页」）：#5e3fbe → 血红 */
body.theme-search-dark .news-home .nh-cat.active::after {
  background: #ff3333 !important;
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.5s ease;
}

/* 3. 搜索框里的放大镜：灰描边（聚焦时偏紫）→ 浅红 */
body.theme-search-dark .news-home .nh-nav-actions .addr-wrap svg {
  stroke: #ff6666 !important;
  filter: invert(1) hue-rotate(180deg);
  transition: stroke 0.3s ease, filter 0.5s ease;
}

/* 输入的文字：暗黑态的通用规则给的是 white（给浏览器工具条的地址栏用），
   但首页这个搜索框是搬进 .news-home 里的 —— 它会跟着整页一起反色，
   白字翻成黑的，压在同样翻成近黑的框底上，等于完全看不见。
   这里把颜色压成深灰，反色后落到浅白，和框底重新拉开对比。 */
body.theme-search-dark .news-home .nh-nav-actions .addr-wrap input {
  color: #111111 !important;
}

/* 搜索框聚焦态：边框原本是 #c7b6f2 紫（暗黑态那套 #660000 被首页的
   .nh-nav-actions 规则按权重压掉了），一并压回暗红 */
body.theme-search-dark .news-home .nh-nav-actions .addr-wrap:focus-within {
  border-color: #660000 !important;
}

/* 4. 搜索按钮：暗黑态的品牌红 #dc2626 反色后是浅粉红，这里钉死成亮红，
   字压成纯黑 —— 红底黑字比反色后的「浅粉底 + 黑字」对比强得多 */
body.theme-search-dark .news-home .nh-nav-actions .accent-btn {
  background: #ff3333 !important;
  color: #000000 !important;
  filter: invert(1) hue-rotate(180deg);
  transition: background 0.15s ease, filter 0.5s ease;
}
body.theme-search-dark .news-home .nh-nav-actions .accent-btn:hover {
  background: #cc0000 !important;
}
body.theme-search-dark .news-home .nh-nav-actions .accent-btn:active {
  background: #a30000 !important;
}

/* ============================================================
   暗黑模式 · 论坛长文页的「白边」补丁
   ------------------------------------------------------------
   病灶不在文章本身，在**外层容器**：
     .article-page 是 100% 通栏，但它不吃负外边距，内容区那 16px 内边距
     原样露在外面；而 .browser-content:has(> .article-page.is-forum) 早就
     把这层底色刷成了米黄 (#f9f5eb)。它的特异度是 (0,3,0)，
     比 body.theme-search-dark .browser-content 的 (0,2,1) 高 ——
     所以暗黑模式下那 16px 依旧米黄，反色只发生在里面的 .article-page 上，
     翻成黑的正文被一圈浅色描边框住，就是玩家看到的「刺眼白边」。

   治法：容器直接钉成纯黑，用 !important 压过所有 :has() 换底色规则
   （.cnn-news-page / .tabloid-news-page / .news-2004-page 那几条同理：
   它们靠负外边距自己铺满，本来不怎么露，一起钉住也没有副作用）。
   只在 body.theme-search-dark 下生效，正常态一个像素都不动。
   ============================================================ */

/* 让最外层的内容区域在反色状态下变成纯黑，消除缝隙白边 */
body.theme-search-dark .browser-content,
body.theme-search-dark #browser-content-area {
  background-color: #000000 !important;
}

/* 针对论坛长文页面，确保反色后的背景铺满（:has 版再钉一次，滚到底也不漏） */
body.theme-search-dark .browser-content:has(> .article-page) {
  background: #000000 !important;
}

/* 内容区滚动条：那条半透明浅灰滑块原本是给浅底配的，
   黑底上会变成右侧一条亮边，这里压暗成血色暗档。 */
body.theme-search-dark .browser-content::-webkit-scrollbar-thumb {
  background: rgba(255, 77, 77, 0.28);
}
body.theme-search-dark .browser-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 77, 77, 0.45);
}

/* ---------- 底部「返回搜索结果」 ----------
   先纠正选择器：lifePostPage / forum-thread 拼出来的是
   「.article-page」+「.global-page-back」两段**兄弟**结构，
   所以 .article-page .global-page-back .back-link 一条都匹配不到，
   必须用 ~ 兄弟选择器。

   更要紧的是反色：它是内容区的直接子元素，会自己单独吃一遍
   #browser-content-area > * 的 invert(1)。白色胶囊翻成黑胶囊，
   落到新刷的黑底上等于整颗消失；而照需求写 #111 / #fff，
   又会被这层反色再翻一次，变成白底黑字。所以先摘掉它自己的 filter，
   再按字面颜色画 —— 和 .page-star（UI 不是网页内容）同一个道理。 */
body.theme-search-dark #browser-content-area > .article-page ~ .global-page-back {
  filter: none !important;
}

body.theme-search-dark #browser-content-area > .article-page ~ .global-page-back .back-link {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #333333 !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1) !important;
}

/* 悬停：跟整站的暗黑皮肤对齐，红边红字，别在纯黑里闪回一块纯白 */
body.theme-search-dark #browser-content-area > .article-page ~ .global-page-back .back-link:hover {
  background: #1a0000 !important;
  color: #ff4d4d !important;
  border-color: #660000 !important;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.18) !important;
  text-decoration: none;
}

/* ============================================================
   暗黑模式 · 「验证嫌疑人真实姓名」界面（.unlock-interface）
   ------------------------------------------------------------
   这一屏本来就是设计好的黑底红框终端，可它和别的网页一样是
   #browser-content-area 的**直接子元素**，于是照样被
     #browser-content-area > *:not(.sr-page):not(.dn-page):not(.page-star)
   那条 invert(1) hue-rotate(180deg) 翻了负片：
   深底变浅灰纸、血红变粉、白字变黑字，整屏一片粉白。
   它是**界面**不是网页内容 —— 和 .sr-page / .dn-page / .page-star 同一类，
   所以给它一个专属类名，从反色里摘出来，颜色按设计稿字面生效。

   特异度提醒：
     · 反色规则是 (1,3,0)，光靠 (0,3,1) 压不住，必须 !important；
     · 底色 #0b0c0e 写在 #browser-content-area > .unlock-page (1,1,0) 上，
       想盖掉它也得以 ID 开头，所以下面几条都带着 #browser-content-area。
   ============================================================ */

/* 1. 这一屏在场时，内容区底色跟桌面同色（只在这一屏生效，
      不动上一轮给论坛长文页定的纯黑） */
body.theme-search-dark #browser-content-area:has(> .unlock-interface) {
  background-color: #050505 !important;
}

/* 2. 这个特定界面不参与反色！铺满 + 居中
   注意别在这里写 min-height: 100% —— 它的特异度 (1,2,1) 会压掉
   #browser-content-area > .unlock-page 那条 min-height: calc(100% + 32px)，
   页面底部立刻空出 32px、卡片整体上移 16px（底色一样，肉眼看不出来，
   但居中就偏了）。出血交给原规则，这里只管反色。 */
body.theme-search-dark #browser-content-area > .unlock-interface {
  filter: none !important;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3. 验证框的黑红设计 */
body.theme-search-dark .unlock-interface .unlock-box {
  width: 100%;
  max-width: 520px;
  background: #111111;
  border: 1px solid #cc0000;
  padding: 40px 50px;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(204, 0, 0, 0.2);
  font-family: ui-monospace, "Consolas", "SFMono-Regular", "PingFang SC", "Microsoft YaHei", monospace;
  text-align: center;
}

body.theme-search-dark .unlock-interface .unlock-tag {
  margin: 0;
  color: #cc0000;
  font-size: 14px;
  letter-spacing: 4px;
  line-height: 1.4;
}

body.theme-search-dark .unlock-interface .unlock-title {
  margin: 12px 0 24px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

body.theme-search-dark .unlock-interface .unlock-row {
  display: flex;
  gap: 12px;
  margin-top: 0;
}

body.theme-search-dark .unlock-interface .unlock-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  background: #000000;
  border: 1px solid #333333;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
body.theme-search-dark .unlock-interface .unlock-input::placeholder {
  color: #5a5a5a;
}
body.theme-search-dark .unlock-interface .unlock-input:focus {
  border-color: #cc0000;
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.18);
}

body.theme-search-dark .unlock-interface .unlock-btn {
  flex: none;
  height: 40px;
  padding: 0 20px;
  background: #cc0000;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.18s ease;
}
body.theme-search-dark .unlock-interface .unlock-btn:hover {
  background: #990000;
}

/* 失败提示：这一屏不再被反色，红字终于是红字 */
body.theme-search-dark .unlock-interface .unlock-error {
  color: #ff4d4d;
}

body.theme-search-dark .unlock-interface .unlock-back {
  margin-top: 24px;
}
body.theme-search-dark .unlock-interface .unlock-back .back-link {
  color: #666666;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
body.theme-search-dark .unlock-interface .unlock-back .back-link:hover {
  color: #cc0000;
  text-decoration: none;
}

/* ================================================================
   移动端适配补丁（横屏 / 竖屏 / 窄窗口）
   全部为追加规则，不改动上面任何既有声明。
   覆盖三类场景：
     · 手机横屏（orientation: landscape 且 height ≤ 500）
     · 手机竖屏（width ≤ 768，此时被 rotate-hint 遮挡，仅兜底）
     · 桌面把窗口拉成窄条（width ≤ 768 但没有触摸）
   ================================================================ */

/* ---------- F1. 竖屏遮罩只该拦手机，不能吃掉桌面窄窗口 ----------
   原判据是「竖屏 + 宽 ≤768」，纯 CSS 且没有任何关闭入口。
   桌面把窗口拉成 500×900 时整站被一块 z-index 99999 的黑板盖死，F5 也救不回来。
   判据换成 hover:hover 而不是 pointer:coarse —— 带触摸屏的笔记本也是 coarse，
   但那种尺寸根本不需要横屏提示。 */
@media (orientation: portrait) and (max-width: 768px) and (hover: hover) {
  .rotate-hint { display: none !important; }
}

/* ---------- F2. 左下角音符球压住「写稿」「时光机」两个导航图标 ----------
   实测 844×390 / 667×375 / 568×320 三档全部相交：球的 z-index 300 高于 #layout，
   图标靠左那半（约 17px）点下去是切歌。展开态更糟，整个图标被盖住。
   处理：球移到贴左下角一格里并取消「只露半边」，图标组整体上移 26px 让出这一格。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .bgm-dock {
    left: 6px !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;      /* 24px 的窄条本来就点不准，别再只露半边 */
    line-height: 0;
  }
  .bgm-dock.is-expanded { transform: none !important; }

  .bgm-btn { width: 44px !important; height: 44px !important; touch-action: manipulation; }
  .bgm-icon { left: 0 !important; font-size: 19px; }

  /* 图标组上移 26px（top 的 50% + translateY(-50%) 定位方式保持不变），
     按钮从 44 收到 40，6 个图标在 320 高的机器上也不溢出顶部 */
  .rail-center {
    top: calc(50% - 26px) !important;
    gap: 4px !important;
  }
  .rail-btn {
    width: 44px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }
  .rail-btn svg { width: 20px; height: 20px; }

  /* 安装徽标原来也在左下角，和球抢同一格，挪到轨道顶部 */
  .rail-foot {
    top: 6px !important;
    bottom: auto !important;
  }
}

/* 320 高的机器（iPhone SE 横屏）徽标会压到第一个图标，直接收掉 */
@media (orientation: landscape) and (max-height: 350px) {
  .rail-foot { display: none !important; }
}

/* ---------- F3. 三块全屏浮层跟着「可视区」，不跟 100vh ----------
   #login-screen / #modal / #ending-overlay 原先用 inset:0 + 布局视口高度。
   键盘弹起后卡片上半截在屏幕外，且 overflow 滚不动 —— 按钮既看不见也滚不到。 */
#login-screen,
#modal,
#ending-overlay {
  top: var(--app-vv-top, 0px);
  bottom: auto;
  height: var(--app-vh, 100vh);
}

/* 居中改由子元素的 margin:auto 完成：
   放得下 → 上下居中；放不下 → 贴顶、可滚到底，不会被裁掉上半截 */
#login-screen,
#modal {
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#login-screen .login-box,
#modal .modal-card {
  flex: none;
  margin: auto;
}

/* iOS 把可视区整体上推时，fixed 的整窗也要跟着下移 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #layout { top: var(--app-vv-top, 0px) !important; }
}

/* ---------- F4. 长英文 / 长网址被 overflow-x:hidden 静默裁掉 ----------
   .browser-content 是 overflow-x:hidden，正文容器全都没有折行兜底。
   实测塞入不可断长词：p.scrollWidth 2236 / clientWidth 734，右侧 1400px 直接消失。
   这游戏全靠读文字，被裁掉的可能就是线索句。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #browser-content-area .article-page .article-content p,
  #browser-content-area .article-page .ar-floor,
  #browser-content-area .cnn-news-page .cnn-content p,
  #browser-content-area .old-news-page .on-body p,
  #browser-content-area .tabloid-news-page .tb-content p,
  #browser-content-area .sr-title,
  #browser-content-area .sr-snippet,
  #browser-content-area .baike-page,
  #browser-content-area .dn-page,
  .mail-reader,
  .mail-reader p,
  .doc-body,
  .doc-body p,
  .msg {
    overflow-wrap: anywhere;   /* Chrome 80+ / Safari 15.4+ */
    word-break: break-word;    /* 老 Safari / X5 兜底 */
  }
  /* 崩坏态的全局反色层会自己开新的裁切上下文，同样补一次 */
  body.theme-search-dark #browser-content-area .article-page .article-content,
  body.theme-search-dark #browser-content-area .dn-page,
  body.theme-search-dark .mail-reader {
    overflow-x: hidden;
  }
}

/* ---------- S1. <16px 的输入框会让 iOS / 微信整页缩放 ----------
   缩放后所有点击坐标偏移，玩家会以为「点不动」。
   实测 #wbInput（时光机搜索）与 #unlockInput（验证真名）都是 14px。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #wbInput,
  #unlockInput,
  #login-pass,
  #browser-search-input,
  #contactSearch,
  #mail-to,
  #mail-subject,
  #mail-body { font-size: 16px !important; }
}

/* ---------- S2. 可收集关键词热区只有 21px 高，长按还弹系统菜单 ----------
   实测 .collectible-keyword 矩形 64×21，纵向远低于 44px。
   行内元素的纵向 padding 不改变行盒高度（行高 30.6px，上下各 6px 仍在行距内），
   所以正文排版零位移，只是把可点区域撑到 33px。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .collectible-keyword {
    position: relative;
    z-index: 1;
    padding: 6px 2px;
    margin: -6px -2px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
  }
}

/* ---------- S4. 写信页「发送」与写稿器「提交稿件」都在首屏之外 ----------
   实测 844×390：发送键 y 408…450（视口 390），提交键 y 570…614；
   667×375 更糟。textarea 的 min-height:180px 把操作行整条顶出屏幕。 */
@media (orientation: landscape) and (max-height: 500px) {
  .mail-field-body textarea { min-height: 96px; }

  .mail-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #ffffff;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }

  /* 纸面下沿吸底：滚到哪儿「提交稿件」都在 */
  .doc-page .w-foot {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(252, 251, 250, 0) 0%, #fcfbfa 24%);
    padding: 10px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .w-submit { min-height: 44px; }
}

/* ---------- S5. 结局字幕在小屏上挤成一条缝 ----------
   实测 390 高：17 行字幕塞进 64vh = 250px，内容 800px，一行占 1/7 屏。 */
@media (orientation: landscape) and (max-height: 500px) {
  #ending-text-container {
    max-height: 72vh;
    padding: 0 18px;
    font-size: 15.5px;
    line-height: 1.7;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #ending-text-container .ending-header { margin-top: 20px; margin-bottom: 10px; font-size: 15px; }
  #ending-text-container .ending-title  { margin-top: 18px; font-size: 24px; }
  #ending-text-container .ending-credit-text { font-size: 26px; letter-spacing: 3px; }
  #rewrite-btn { margin-top: 16px; min-height: 44px; padding: 10px 26px; }
}

/* ---------- S6. 底部安全区原先只照顾了聊天输入框 ----------
   iPhone 横屏有 21px 手势区，.chat-gate（真正的主操作）、.mail-foot、.doc-page
   的按钮下沿正好落在里面。padding-bottom 里保留各自原值再叠加安全区。 */
@media (orientation: landscape) and (max-height: 500px) {
  .chat-gate { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .mail-attach-body { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .doc-page { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- D1. 翻译提示条：死规则 top:20px + 入场动画把整条推出屏幕 ----------
   .browser-module.is-home .translate-tip / :not(.is-home) 是 (0,3,0)，
   压过移动端的 .translate-tip (0,1,0)，实测仍是 86px；
   同时 @keyframes ttDropIn 的终态是 translateX(-50%)，和贴边的 left/right 打架。 */
@media (orientation: landscape) and (max-height: 500px) {
  .browser-module .translate-tip,
  .browser-module.is-home .translate-tip,
  .browser-module:not(.is-home) .translate-tip {
    top: 60px;                 /* 地址栏 56px + 4px，别压正文标题 */
    left: 50%;
    right: auto;
    width: max-content;        /* 保持胶囊宽度，不要拉满整行 */
    max-width: calc(100% - 24px);
    transform: translateX(-50%);
    animation: none;           /* ttDropIn 终态是 -50%，配合 left:50% 反而会跳，直接关掉 */
  }
}

/* ---------- D2. .page-star 的移动端 top/right 被内联样式压住 ----------
   mountPageStar() 用内联样式写死了 top = browserArea.offsetTop + 8、right = 26px，
   移动端那两条 top:8px / right:6px 永远不生效（宽高生效、位置不生效）。
   要「靠边停」必须加 !important。 */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .page-star:not(.is-inline) {
    top: calc(env(safe-area-inset-top, 0px) + 62px) !important;
    right: calc(env(safe-area-inset-right, 0px) + 10px) !important;
    width: 40px !important;
    height: 40px !important;
  }
}

/* ---------- D3. 修完 F1 后，500–768 宽的窄窗口日历要补成 2 列 ----------
   .wbm-cal-grid 的 2 列规则只写在「横屏 ≤500 高」里，
   窄桌面窗口 4 列会把 7 格星期挤成 10px。 */
@media (max-width: 768px) {
  .wbm-cal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }
}

/* ============================================================
   移动端视口铺满（dvh 三级兜底）
   ------------------------------------------------------------
   手机 / 平板横屏时，浏览器顶部的地址栏、底部的标签栏会吃掉一条真实
   屏幕，而 100vh / height:100% 量的是「布局视口」—— 工具栏收起时的
   那个高度。于是工具栏一展开：
     · 窗口比可见区高，底部的「发送」「提交稿件」被压出屏幕；
     · 整页多出几十像素，能上下拖，拖出来是一片白底。
   这里把高度改成三级链路，任何一级都能撑住整屏：

     100vh                → 老浏览器（不认识 dvh，这一条生效）
     100dvh               → 支持动态视口的浏览器，工具栏收放时自动变
     var(--app-vh, …)     → JS 跟 visualViewport 实时算出的最准值

   顺序不能调换：后一条覆盖前一条。JS 一旦写上 --app-vh 就用它；
   脚本没跑 / 被拦时自动退到 dvh，再不行退到 vh。
   只作用于窄屏与横屏，PC 的居中悬浮窗一条都不碰。
   ============================================================ */
@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {

  /* 滚动条只能长在应用窗口内部，html / body 一律不准滚。
     overscroll-behavior 顺手把「下拉刷新 / 顶部回弹」也关掉 ——
     横屏游戏里误触下拉会把整页拽出半屏白底。 */
  html {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  #layout {
    /* 高度三级兜底 */
    height: 100vh !important;
    height: 100dvh !important;
    height: var(--app-vh, 100dvh) !important;

    max-height: 100vh !important;
    max-height: 100dvh !important;
    max-height: var(--app-vh, 100dvh) !important;

    /* 窗口自己不吃滚动传播，拖到边缘也不会把整页带下去 */
    overscroll-behavior: none;
  }
}

/* ------------------------------------------------------------
   触屏平板（含 iPad 横屏 1024×768）
   ------------------------------------------------------------
   这个尺寸走的是桌面那套居中悬浮窗，不进上面的窄屏规则；但 iOS Safari
   横屏的 100vh 同样是大视口，工具栏展开时窗口下沿会被顶出一点。
   所以只在「触屏设备」这层把 vh 换成 dvh 兜底，鼠标设备一条都不改，
   两个断点互不干扰。
   ------------------------------------------------------------ */
@media (hover: none) and (pointer: coarse) {
  #layout {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    height: calc(var(--app-vh, 100dvh) - 48px);

    max-height: 85vh;
    max-height: 85dvh;
    max-height: calc(var(--app-vh, 100dvh) * 0.85);
  }
}

/* ------------------------------------------------------------
   横屏首次进入的工具栏提示
   ------------------------------------------------------------
   只在「触屏 + 横屏 + 从没看过」时出现一次，5 秒后淡出，
   pointer-events:none 所以不挡任何点击；PC 端 display:none，永不出现。
   ------------------------------------------------------------ */
.fullscreen-tip { display: none; }

@media (max-width: 768px),
       (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  /* 放右上角，不去挤底部操作区：底部的「发送 / 提交稿件」正是玩家要点的
     东西，提示盖在上面哪怕不挡点击也会让人分心。右上角在三个模块里
     都是空白（聊天头部右侧、写稿器标题右侧、邮件发件人右侧）。 */
  .fullscreen-tip {
    display: block;
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 800;                      /* 高于 #layout(10)，低于登录屏(9000) */
    max-width: calc(100vw - 120px);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(10, 12, 16, 0.58);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11.5px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
  }
  .fullscreen-tip.is-on {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s ease, visibility 0s;
  }
}
/* ============================================================
   收藏夹（资料库）移动端修整
   ------------------------------------------------------------
   现象：手机横屏进「我的收藏夹」，卡片被压成又窄又高的长条，
   标题从中间硬断，角标「新手指南」在极窄的卡片里折成两行、
   压到缩略图中间的图标上。

   根因两处：
   1) 手机横屏档把网格写成了 minmax(150px, 1fr)。auto-fill 会尽量
      多塞列：844×390 分出 4 列（每列 181px）、568×320 分出 3 列
      （每列 154px）。150px 的下限是给「一排缩略图」定的，
      放「标题 + 来源」两行文字根本不够。
   2) .bm-badge 没有 white-space:nowrap，卡片越窄它越可能折行。

   对策：窄屏把列宽下限抬到 220px（PC 的 200px 一行不动），
   角标锁死单行并加省略号兜底，左侧留白按安全区补足。
   仅作用于「横屏 + 高度 ≤ 500px」的手机档。
   ============================================================ */

@media (orientation: landscape) and (max-height: 500px) {

  /* 左侧留白：轨道 50px 之外再留 16px，卡片不贴紫色导航；
     底部补安全区，iPhone 横屏的手势条不会切掉最后一行卡片的圆角 */
  .library-body {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  /* 列宽下限 150 → 220：844 出 3 列（243px）、667 出 2 列（284px）、
     568 出 2 列（235px）。!important 用来压过上面 7650 行那条
     minmax(150px, 1fr)。 */
  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 16px;
  }

  /* 卡片本体：允许列内收缩，避免长标题把网格撑破 */
  .bm-card { min-width: 0; }

  /* 卡片变宽了，缩略图相应压矮一点，一屏能看到下一行卡片的上沿 */
  .bm-thumb { height: 110px; }
  .bm-icon { font-size: 34px; }

  .bm-info { padding: 10px 12px 12px; }
  .bm-info b { font-size: 13.5px; line-height: 1.45; }

  /* 角标：单行 + 溢出省略。max-width 按住左右各 8px，
     就算以后换成更长的文案也不会顶出缩略图、更不会折行 */
  .bm-badge {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 9px;
    font-size: 12px;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* ============================================================
   移动端全屏按钮（原生 Fullscreen API）
   ------------------------------------------------------------
   横屏手机最浪费的是顶部那条地址栏加底部标签栏：390 高的屏，
   两条工具栏就吃掉 60~90px，正文只剩三百出头。
   这里给一个真能把它们收掉的按钮 —— 原生全屏：
   比「向下滑动隐藏工具栏」彻底得多（滑动只是临时收起，一碰屏幕就回来）。

   三层开关，互不重叠：
     · .mobile-fs 默认 display:none —— PC、平板、竖屏一律看不见；
     · 手机横屏档（与项目其余移动端规则同一个断点）才放出来；
     · html.no-element-fullscreen（js 探测到没有元素全屏 API，
       主要是 iOS Safari）整块收掉，改由 #fullscreenTip 的滑动提示兜底，
       免得放一个点了没反应的按钮。
   ============================================================ */

.mobile-fs { display: none; }

/* 不支持元素全屏的浏览器：按钮点了也是空转，干脆不出现 */
html.no-element-fullscreen .mobile-fs { display: none !important; }

@media (orientation: landscape) and (max-height: 500px) {

  .mobile-fs {
    display: block;
    position: fixed;
    top: calc(6px + env(safe-area-inset-top, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    /* 9100：高过登录屏(9000) —— 进门之前也能点；
       低于结局演出层(9999) —— 结局里不会漏出半个图标。 */
    z-index: 9100;
    /* 容器只管定位，不吃点击，免得 4px 的边距把底下的东西挡住 */
    pointer-events: none;
  }

  .mobile-fs-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 9px;
    background: rgba(12, 14, 20, 0.72);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, transform 0.12s ease;
  }
  .mobile-fs-btn:active {
    background: rgba(12, 14, 20, 0.86);
    transform: scale(0.94);
  }
  .mobile-fs-btn:focus-visible {
    outline: 2px solid #b9a8ea;
    outline-offset: 2px;
  }

  /* 右上角那颗「搜索」有两种落位：内容页在 .browser-bar 里，
     资讯首页在页面自己的 .nh-nav-inner 里（距右边缘只有 20px）。
     两处都留出同一条 52px 走廊（按键 38 + 右距 8 + 间隙 6），
     搜索键跟着左移，全屏键独占一格 —— 否则总有一个页面被压住。
     第二条必须带 .news-home：原有那条是 .news-home .nh-nav-inner，
     权重 (0,2,0)，只写 .nh-nav-inner 压不住它。 */
  html:not(.no-element-fullscreen) .browser-bar { padding-right: 52px; }
  html:not(.no-element-fullscreen) .news-home .nh-nav-inner { padding-right: 52px; }

  /* 时光机首页的导航条右端是「注册 / 登录」，原来距边缘 16~24px，
     「登录」两个字正好落在全屏键底下。同一条走廊，一并让出来。 */
  html:not(.no-element-fullscreen) .wbm-nav { padding-right: 52px; }

  /* 进入 / 退出两个图标：只有描边，颜色跟着按钮的 currentColor 走 */
  .fs-ico {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .fs-ico-exit { display: none; }
  html.is-fullscreen .fs-ico-enter { display: none; }
  html.is-fullscreen .fs-ico-exit { display: block; }

  /* 拒绝全屏时就地弹一句，3.6 秒自己收走；不占布局、不吃点击。
     width:max-content 是必需的：.mobile-fs 是个只有按钮宽的 fixed 容器，
     absolute 子元素默认按「包含块宽度 38px」做收缩，一句话会被挤成
     一字一行的竖条（实测宽度只剩 43px）；max-content 先按整句取宽，
     再由 max-width 压回去换行，右边缘仍贴住按钮右沿。 */
  .mobile-fs-hint {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    max-width: min(72vw, 320px);
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(12, 14, 20, 0.84);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11.5px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    white-space: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    pointer-events: none;
  }
  .mobile-fs-hint.is-on {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }
}

/* ------------------------------------------------------------
   全屏态：让 #layout 铺满真正的那块屏
   ------------------------------------------------------------
   工具栏已经让出去了，可视区就等于屏幕本身，不必再算别的。
   写在文件末尾，是为了压过前面那条「触屏平板 calc(vh - 48px)」——
   全屏里再减 48px 会在底部留一条黑边。
   三种写法并联：#layout 原本就是三级别 100vh / 100dvh / --app-vh，
   这里保持同一套顺序（后者覆盖前者）。
   ------------------------------------------------------------ */
html.is-fullscreen #layout,
html:fullscreen #layout,
html:-webkit-full-screen #layout {
  max-height: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  height: var(--app-vh, 100dvh) !important;
}

/* 全屏里不需要那条「向下滑动」的提示了（它已被按钮取代） */
html.is-fullscreen .fullscreen-tip { display: none !important; }

/* ------------------------------------------------------------
   视频封面（poster）兜底
   ------------------------------------------------------------
   三个播放器都带 poster="assets/image/poster-default.jpg"（暗色调
   SIGNAL LOST 雪花画面）。这里只加底色，【不改 object-fit】：
   object-fit 一旦改成 cover，播放时 4:3 / 非 16:9 的画面会被裁切，
   属于破坏既有播放行为。所以统一保持各播放器原本的 contain，
   封面比例不符时最多上下留黑边 —— 底色本来就是黑的，看不出来。
   ------------------------------------------------------------ */

/* 附件抽屉：播放画面等比不裁切（原行为），仅补黑色底，封面加载前不闪白 */
.attach-media-wrap video {
  background: #000000;
}

/* B 站舞台（16:9）：同上 */
.bili-stage video {
  background: #000000;
}

/* 奥普拉外壳：同上，保持原 contain，绝不 cover */
.video-oprah-wrap video {
  background: #000000;
}
