/* ==========================================================================
   Paperlog · Win2000 复古工业风主题
   --------------------------------------------------------------------------
   整站外观重做：首页 / 列表 / 文章页 / 导航 / 页脚
   与探针主题（monitor-theme-win2000 / CF-Server-Monitor-theme-win2000）共用
   同一套视觉语言：同一个 CSS 变量命名、同一套立体边框配方、同一套配色。

   设计原则
   1. 整个页面 = 桌面上的一个 Windows 2000 窗口：标题栏 / 菜单栏 / 工具栏 /
      客户区 / 状态栏，没有任务栏与开始菜单。
   2. 只在现有 DOM 上换皮，不改动数据、路由、Markdown 渲染或任何后台功能。
   3. 全部立体感用 CSS 实现（凸起 / 凹陷 / 蚀刻 / 抖动底纹），不引入图片素材。
   4. 颜色全部走 CSS 变量：默认（无 html.dark）= 经典标准配色，
      html.dark = 深色配色，结构完全一致，只换一套颜色。

   颜色与变量直接对齐探针主题的 win2000.css，因此博客与探针页是同一套视觉。
   ========================================================================== */

/* 主题作用域
   --------------------------------------------------------------------------
   所有组件规则都以 `body.w2k#top` 开头，原因有两个：
   1. `#top` 是模板里 <body> 上固定的锚点 id，加上它以后主题选择器的权重
      必然高过旧主题里那些 `!important` 的高权重规则（例如
      `.unified-filter .compact-filter-group[aria-label="排序"] .compact-pill`），
      不需要在每条声明后面堆 `!important` 去比拼权重。
   2. `w2k` 类用于把自己和后台页面的 app.css 区分开。
   因此本文件必须最后加载。 */

/* ==========================================================================
   1. 设计令牌
   ========================================================================== */

:root {
  /* 桌面与窗口表面 */
  --desktop: #3a6ea5;
  --face: #d4d0c8;
  --hilight: #ffffff;
  --light: #d4d0c8;
  --shadow: #808080;
  --dkshadow: #404040;
  --window: #ffffff;
  --window-alt: #f4f4f4;
  --text: #000000;
  --text-muted: #404040;
  --gray-text: #808080;
  --gray-text-shadow: #ffffff;

  /* 标题栏 */
  --title-a: #0a246a;
  --title-b: #a6caf0;
  --title-text: #ffffff;
  --title-off-a: #808080;
  --title-off-b: #c0c0c0;
  --title-off-text: #d4d0c8;

  /* 选中、控件 */
  --select-bg: #0a246a;
  --select-text: #ffffff;
  --bar: #000080;
  --bar-hot: #a04000;
  --trough: #eceae6;
  --online: #00b000;
  --offline: #c00000;
  --tip-bg: #ffffe1;
  --tip-text: #000000;
  --link: #0000ff;
  --link-hover: #ff0000;
  --row-line: #e8e8e8;
  --dither-a: #ffffff;
  --dither-b: #d4d0c8;
  --overlay: rgba(0, 0, 0, .15);

  /* 图表 / 任务管理器配色（探针图表同款） */
  --graph-bg: #000000;
  --graph-grid: #008040;
  --graph-axis: #404040;

  /* 语义色 */
  --accent-green: #007a00;
  --accent-blue: #0a246a;
  --accent-yellow: #a06a00;
  --accent-red: #c00000;
  --accent-cyan: #007878;
  --accent-purple: #6a2a9a;

  /* 版式 */
  --w2k-font: Tahoma, "SimSun", "宋体", "Microsoft YaHei", "PingFang SC", sans-serif;
  --w2k-mono: "Lucida Console", "Courier New", Consolas, "JetBrains Mono", monospace;

  /* 接管旧主题的字体变量，避免残留的 !important 规则回退到 Inter */
  --font-ui: var(--w2k-font);
  --font-mono: var(--w2k-mono);

  /* 尺寸 */
  --w2k-window-max: 1400px;
  --w2k-read-max: 780px;
  --w2k-radius: 0px;
}

html.dark {
  --desktop: #1b2b40;
  --face: #3c3c3c;
  --hilight: #6a6a6a;
  --light: #3c3c3c;
  --shadow: #202020;
  --dkshadow: #0e0e0e;
  --window: #1e1e1e;
  --window-alt: #252525;
  --text: #e8e8e8;
  --text-muted: #b4b4b4;
  --gray-text: #808080;
  --gray-text-shadow: transparent;

  --title-a: #0a246a;
  --title-b: #3a6ea5;
  --title-text: #ffffff;
  --title-off-a: #2a2a2a;
  --title-off-b: #505050;
  --title-off-text: #a8a8a8;

  --select-bg: #0a246a;
  --select-text: #ffffff;
  --bar: #4a6fa5;
  --bar-hot: #e07030;
  --trough: #242424;
  --online: #3ccb5a;
  --offline: #ff5a5a;
  --tip-bg: #ffffe1;
  --tip-text: #000000;
  --link: #8ab4ff;
  --link-hover: #ffb0b0;
  --row-line: #2c2c2c;
  --dither-a: #4a4a4a;
  --dither-b: #3c3c3c;
  --overlay: rgba(0, 0, 0, .45);

  --graph-bg: #000000;
  --graph-grid: #008040;
  --graph-axis: #9fd9a8;

  --accent-green: #3ccb5a;
  --accent-blue: #6fa8ff;
  --accent-yellow: #e0b040;
  --accent-red: #ff5a5a;
  --accent-cyan: #40d0d0;
  --accent-purple: #c090ff;

  --font-ui: var(--w2k-font);
  --font-mono: var(--w2k-mono);
}

/* ==========================================================================
   2. 页面基调：桌面色 + 经典字体
   ========================================================================== */

html {
  background-color: var(--desktop) !important;
  color-scheme: light;
}

html.dark {
  background-color: var(--desktop) !important;
  color-scheme: dark;
}

html,
body {
  scroll-behavior: auto;
}

/* 旧主题用 `html.dark, html.dark body { background-color: … !important }` 这类
   分组选择器锁死了页面底色；这里用同权重或更高权重的选择器接管，
   保证桌面底色永远由主题令牌决定。 */
html body.w2k#top,
body.w2k#top {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  background: var(--desktop) !important;
  background-image: none !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
  text-rendering: optimizeSpeed;
}

html.dark body.w2k#top {
  background: var(--desktop) !important;
  background-image: none !important;
  color: var(--text) !important;
}

body.w2k#top h1,
body.w2k#top h2,
body.w2k#top h3,
body.w2k#top h4,
body.w2k#top h5,
body.w2k#top h6 {
  font-family: var(--w2k-font) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  color: inherit;
}

body.w2k#top code,
body.w2k#top pre,
body.w2k#top kbd,
body.w2k#top samp,
body.w2k#top .font-mono,
body.w2k#top .font-code {
  font-family: var(--w2k-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* 旧主题里少数元素把等宽字体写死在声明里，这里统一拉回经典 UI 字体 */
body.w2k#top .front-page-count,
body.w2k#top .front-count,
body.w2k#top .compact-filter-count,
body.w2k#top .compact-filter-count b,
body.w2k#top .compact-option small,
body.w2k#top .taxonomy-tile small,
body.w2k#top .w2k-card-state,
body.w2k#top .download-head small,
body.w2k#top .hide-lock-status,
body.w2k#top .paper-audio-credits,
body.w2k#top .paper-audio-track-artist,
body.w2k#top .front-eyebrow {
  font-family: var(--w2k-font) !important;
}

body.w2k#top a {
  color: var(--link);
  text-decoration: none;
}

body.w2k#top a:hover {
  color: var(--link-hover);
}

body.w2k#top img {
  max-width: 100%;
  border: 0;
}

/* 除选项卡的上角外，整站不使用圆角。
   旧主题在按钮、卡片、图标上留下大量圆角声明（部分还是 !important），
   与其逐条覆盖，不如在这里一次性清零；选项卡 .reading-pill / .tab 例外。 */
body.w2k#top *:not(.reading-pill):not(.tab) {
  border-radius: 0 !important;
}

/* 键盘焦点：经典点状焦点框 */body.w2k#top a:focus-visible,
body.w2k#top button:focus-visible,
body.w2k#top input:focus-visible,
body.w2k#top select:focus-visible,
body.w2k#top summary:focus-visible,
body.w2k#top [tabindex]:focus-visible {
  outline: 1px dotted var(--text);
  outline-offset: 1px;
}

/* x-cloak 在 Alpine 接管前隐藏；沿用 app.css 的既有约定 */
[x-cloak] {
  display: none !important;
}

/* `hidden` 属性必须永远生效：相册分页、歌词行、封面回退都靠它，
   而主题里给这些元素写了 display，所以这里用 :not() 抬一档权重确保关闭。 */
body.w2k#top [hidden]:not(.w2k-never-hidden) {
  display: none !important;
}

/* ==========================================================================
   3. 立体边框原语
   ========================================================================== */

/* 凸起：按钮、窗口、分组框表面 */
.w2k-raised,
body.w2k#top .w2k-raised {
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
}

/* 凹陷：文本域、表格、列表、进度条槽 */
.w2k-sunken {
  background: var(--window);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
}

/* 细凹陷 / 细凸起：单像素边，无内阴影 */
.w2k-thin-sunken {
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
}

.w2k-thin-raised {
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
}

/* 蚀刻线：分组框用的 #808080 + 白投影 */
.w2k-etched,
body.w2k#top .magazine-section,
body.w2k#top .reading-related,
body.w2k#top .reading-meta-group {
  border: 1px solid var(--shadow);
  box-shadow: inset 1px 1px var(--hilight), 1px 1px var(--hilight);
}

/* ==========================================================================
   4. 桌面与窗口外壳
   ========================================================================== */

.w2k-desktop {
  min-height: 100vh;
  padding: 18px 18px 46px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.w2k-window {
  width: min(100%, var(--w2k-window-max));
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 3px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow:
    inset 1px 1px var(--hilight),
    inset -1px -1px var(--shadow),
    5px 5px 0 rgba(0, 0, 0, .22);
}

/* ---------- 标题栏 ---------- */

.w2k-titlebar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0 2px 0 3px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: var(--title-text);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
  view-transition-name: w2k-titlebar;
}

.w2k-titlebar-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.w2k-titlebar-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.w2k-titlebar-sep {
  opacity: .75;
  padding: 0 1px;
}

.w2k-titlebar-buttons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

/* 标题栏按钮：14px 高的小立体按钮（探针主题同款） */
.w2k-tbtn {
  height: 16px;
  min-width: 18px;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  color: var(--text);
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  cursor: pointer;
  text-decoration: none;
}

.w2k-tbtn svg {
  display: block;
}

.w2k-tbtn:active {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
  padding: 1px 2px 0 4px;
}

/* 明暗图标用 CSS 切换，避免 Alpine 接管前的双图标闪烁 */
html:not(.dark) .w2k-ico-moon {
  display: none;
}

html.dark .w2k-ico-sun {
  display: none;
}

.w2k-ico-sun,
.w2k-ico-moon {
  display: inline-flex;
  align-items: center;
}

/* ---------- 菜单栏 ---------- */

.w2k-menubar {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: 21px;
  padding: 1px 0 0;
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px var(--hilight);
}

.w2k-menu {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.w2k-menu::-webkit-scrollbar {
  display: none;
}

.w2k-menu a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 11px;
  color: var(--text) !important;
  font-size: 12px;
  white-space: nowrap;
}

.w2k-menu a u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.w2k-menu a:hover {
  background: var(--select-bg);
  color: var(--select-text) !important;
}

.w2k-menu a.is-active {
  background: var(--select-bg);
  color: var(--select-text) !important;
  font-weight: 700;
}

.w2k-menubar-tail {
  display: block;
  flex: 0 0 auto;
  width: 12px;
}

/* ---------- 工具栏：地址栏 + 搜索 ---------- */

.w2k-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 3px 4px;
  background: var(--face);
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px var(--hilight);
}

.w2k-tool-label {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}

.w2k-address {
  flex: 1 1 220px;
  min-width: 0;
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--window);
  color: var(--text);
  font-size: 12px;
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
}

.w2k-tool-sep {
  flex: 0 0 auto;
  width: 2px;
  align-self: stretch;
  margin: 1px 3px;
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--hilight);
}

.w2k-search {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 1 330px;
  min-width: 0;
}

.w2k-search-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--text);
  margin-right: -20px;
  padding-left: 4px;
  z-index: 1;
  pointer-events: none;
}

.w2k-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  padding: 0 4px 0 20px;
  background: var(--window);
  color: var(--text);
  font-family: var(--w2k-font);
  font-size: 12px;
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
  border-radius: 0;
  outline: none;
}

.w2k-input::placeholder {
  color: var(--gray-text);
}

/* 经典按钮：最小宽 75px 的可点控件（探针主题同款配方） */
.w2k-btn {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 21px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--face);
  color: var(--text);
  font-family: var(--w2k-font);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  border-radius: 0;
  cursor: pointer;
}

.w2k-btn:hover {
  color: var(--text);
}

.w2k-btn:active {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
  padding: 1px 9px 0 11px;
}

.w2k-btn.is-disabled,
.w2k-btn:disabled {
  color: var(--gray-text) !important;
  text-shadow: 1px 1px var(--gray-text-shadow);
  cursor: default;
}

.w2k-btn-search {
  height: 21px;
}

/* ---------- 客户区 ---------- */

.w2k-client {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 60vh;
  padding: 10px;
  background: var(--face);
  color: var(--text);
}

/* ---------- 状态栏 ---------- */

.w2k-statusbar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex: 0 0 auto;
  margin-top: 3px;
  min-height: 21px;
  font-size: 11px;
  view-transition-name: w2k-statusbar;
}

.w2k-status-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 1px 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
}

.w2k-status-field.w2k-status-grow {
  flex: 1 1 auto;
}

.w2k-status-clock {
  font-variant-numeric: tabular-nums;
  min-width: 78px;
  justify-content: center;
}

.w2k-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid #000;
  background: var(--offline);
}

.w2k-led.is-on {
  background: var(--online);
}

/* ==========================================================================
   5. 滚动条：经典灰色带箭头
   ========================================================================== */

body.w2k#top ::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

body.w2k#top ::-webkit-scrollbar-track {
  background: repeating-conic-gradient(var(--dither-a) 0 25%, var(--dither-b) 0 50%) 0 0 / 2px 2px;
}

body.w2k#top ::-webkit-scrollbar-thumb {
  background: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow);
}

body.w2k#top ::-webkit-scrollbar-corner {
  background: var(--face);
}

body.w2k#top ::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow);
  background-repeat: no-repeat;
  background-position: center;
}

body.w2k#top ::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M3.5 0L7 4H0z' fill='%23000'/%3E%3C/svg%3E");
}

body.w2k#top ::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7L3.5 4z' fill='%23000'/%3E%3C/svg%3E");
}

body.w2k#top ::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 3.5L4 0v7z' fill='%23000'/%3E%3C/svg%3E");
}

body.w2k#top ::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 0l4 3.5L0 7z' fill='%23000'/%3E%3C/svg%3E");
}

@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-color: var(--face) var(--dither-a);
  }
}

/* ==========================================================================
   6. 迷你窗口卡片（首页楼层 / 列表 / 相关文章共用）
   ========================================================================== */

body.w2k#top .w2k-card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  padding: 3px !important;
  overflow: hidden !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

/* 卡片标题栏：旗帜位（图标）+ 分类名 + 状态灯，与探针的服务器卡片同构 */
body.w2k#top .w2k-card-bar {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  height: 18px !important;
  margin: 0 0 3px !important;
  padding: 0 3px !important;
  background: linear-gradient(90deg, var(--title-a), var(--title-b)) !important;
  color: var(--title-text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  overflow: hidden;
}

body.w2k#top .w2k-card-ico {
  flex: 0 0 auto;
  width: 12px;
  height: 13px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='13' shape-rendering='crispEdges'%3E%3Crect width='12' height='13' fill='%23ffffff'/%3E%3Crect x='11' width='1' height='13' fill='%23808080'/%3E%3Crect y='12' width='12' height='1' fill='%23808080'/%3E%3Crect x='2' y='3' width='7' height='1' fill='%230a246a'/%3E%3Crect x='2' y='6' width='8' height='1' fill='%23808080'/%3E%3Crect x='2' y='8' width='6' height='1' fill='%23808080'/%3E%3Crect x='2' y='10' width='8' height='1' fill='%23808080'/%3E%3C/svg%3E");
}

body.w2k#top .w2k-card-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

body.w2k#top .w2k-card-state {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  opacity: .92;
}

body.w2k#top .w2k-card-state .w2k-led {
  width: 7px;
  height: 7px;
  border-color: #000;
}

/* 卡片内的凹陷内容框（封面 / 正文） */
body.w2k#top .w2k-card-media,
body.w2k#top .post-card-media,
body.w2k#top .magazine-post-media,
body.w2k#top .poster-media,
body.w2k#top .magazine-poster-media {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .post-card-media,
body.w2k#top .magazine-post-media {
  aspect-ratio: 16 / 10 !important;
}

body.w2k#top .poster-media,
body.w2k#top .magazine-poster-media {
  aspect-ratio: 3 / 4 !important;
}

/* 封面图：经典风格只保留一张清晰裁切图，去掉柔光衬底 */
body.w2k#top .post-card-media .cover-backdrop,
body.w2k#top .magazine-post-media .cover-backdrop {
  display: none !important;
}

body.w2k#top .post-card-media img,
body.w2k#top .magazine-post-media img,
body.w2k#top .poster-media img,
body.w2k#top .magazine-poster-media img,
body.w2k#top .reading-related-media img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

/* 缺图占位：白底 + 经典文档图标 */
body.w2k#top .post-card-placeholder,
body.w2k#top .magazine-placeholder,
body.w2k#top .poster-placeholder {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: var(--window) !important;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--shadow) 12%, transparent) 6px 7px) !important;
  color: var(--gray-text) !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}

body.w2k#top .post-card-placeholder b,
body.w2k#top .magazine-placeholder b,
body.w2k#top .poster-placeholder span {
  font-weight: 700 !important;
  font-size: 10px !important;
  color: var(--gray-text) !important;
}

body.w2k#top .post-card-placeholder i,
body.w2k#top .magazine-placeholder i,
body.w2k#top .poster-placeholder i {
  display: block !important;
  width: 32px !important;
  height: 38px !important;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='38' shape-rendering='crispEdges'%3E%3Crect width='32' height='38' fill='%23ffffff'/%3E%3Crect x='31' width='1' height='38' fill='%23808080'/%3E%3Crect y='37' width='32' height='1' fill='%23808080'/%3E%3Crect x='4' y='5' width='20' height='2' fill='%230a246a'/%3E%3Crect x='4' y='11' width='22' height='2' fill='%23c0c0c0'/%3E%3Crect x='4' y='16' width='16' height='2' fill='%23c0c0c0'/%3E%3Crect x='4' y='21' width='22' height='2' fill='%23c0c0c0'/%3E%3Crect x='4' y='26' width='12' height='2' fill='%23c0c0c0'/%3E%3C/svg%3E");
  opacity: .85;
}

/* 卡片文案区 */
body.w2k#top .post-card-body,
body.w2k#top .magazine-post-copy,
body.w2k#top .poster-copy,
body.w2k#top .magazine-poster-copy {
  display: block !important;
  margin: 0 !important;
  padding: 5px 4px 3px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.w2k#top .post-card-body > *,
body.w2k#top .magazine-post-copy > *,
body.w2k#top .poster-copy > *,
body.w2k#top .magazine-poster-copy > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.w2k#top .post-card-title,
body.w2k#top .magazine-post-copy h3,
body.w2k#top .poster-copy h2,
body.w2k#top .magazine-poster-copy h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  color: var(--text) !important;
  margin: 0 0 3px !important;
}

body.w2k#top .post-card-title a,
body.w2k#top .magazine-post-copy h3 a,
body.w2k#top .poster-copy h2 a,
body.w2k#top .magazine-poster-copy h3 a {
  color: var(--link) !important;
  display: block !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body.w2k#top .post-card-title a:hover,
body.w2k#top .magazine-post-copy h3 a:hover,
body.w2k#top .poster-copy h2 a:hover,
body.w2k#top .magazine-poster-copy h3 a:hover {
  color: var(--link-hover) !important;
  text-decoration: underline !important;
}

body.w2k#top .post-card-meta-row,
body.w2k#top .magazine-post-meta,
body.w2k#top .poster-meta,
body.w2k#top .magazine-poster-copy > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  padding: 2px 0 0 !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  border-top: 1px solid var(--row-line) !important;
  margin-top: 4px !important;
}

body.w2k#top .post-category {
  flex: 0 0 auto;
  padding: 0 4px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
  font-size: 10px;
  line-height: 14px;
  color: var(--text) !important;
}

/* ==========================================================================
   7. 首页：模块化内容流
   ========================================================================== */

body.w2k#top .magazine-feed {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  margin: 0 !important;
}

/* 每个楼层 = 一个分组框，标题压在蚀刻边框上 */
body.w2k#top .magazine-section {
  position: relative !important;
  margin: 0 !important;
  padding: 20px 10px 10px !important;
  background: transparent !important;
  border: 1px solid var(--shadow) !important;
  box-shadow: inset 1px 1px var(--hilight), 1px 1px var(--hilight) !important;
  border-radius: 0 !important;
}

body.w2k#top .magazine-section-head {
  position: absolute !important;
  top: -9px !important;
  left: 6px !important;
  right: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.w2k#top .magazine-section-title {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 18px !important;
  min-width: 0 !important;
  padding: 0 6px !important;
  background: var(--face) !important;
}

body.w2k#top .magazine-section-icon {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: 16px !important;
  height: 16px !important;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='1' y='4' width='13' height='10' fill='%23ffd000'/%3E%3Crect x='1' y='3' width='13' height='1' fill='%23000'/%3E%3Crect x='1' y='14' width='13' height='1' fill='%23000'/%3E%3Crect y='4' width='1' height='10' fill='%23000'/%3E%3Crect x='14' y='4' width='1' height='10' fill='%23000'/%3E%3Crect x='1' y='4' width='13' height='2' fill='%23a08000'/%3E%3Crect x='3' y='2' width='9' height='2' fill='%23ffd000'/%3E%3Crect x='3' y='2' width='9' height='1' fill='%23000'/%3E%3C/svg%3E");
}

body.w2k#top .magazine-section-icon svg {
  display: none !important;
}

body.w2k#top .magazine-section-title h2 {
  display: inline !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--text) !important;
}

body.w2k#top .magazine-section-title p {
  display: none !important;
}

body.w2k#top .magazine-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
  height: 18px !important;
  padding: 0 6px !important;
  background: var(--face) !important;
  font-size: 11px !important;
  color: var(--link) !important;
}

body.w2k#top .magazine-more:hover {
  color: var(--link-hover) !important;
  text-decoration: underline !important;
}

body.w2k#top .magazine-featured-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

/* 首页楼层列数按后端取数对齐：
   landscape 每层 6 篇 → 3 列 2 行；portrait 每层 8 篇 → 4 列 2 行；
   分类页 landscape 每页 9 篇 → 3 列 3 行；portrait 每页 20 篇 → 4 列 5 行。 */
body.w2k#top .magazine-poster-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

/* 分组框里不留空列：末行不足时按列数收窄，避免出现大片灰底 */
body.w2k#top .magazine-section > .magazine-poster-grid,
body.w2k#top .magazine-section > .magazine-featured-grid {
  justify-content: start !important;
}

body.w2k#top .magazine-note-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

/* ==========================================================================
   8. 文章列表：横图 / 竖图 / 文字卡片三视图
   ========================================================================== */

body.w2k#top .post-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.w2k#top .portrait-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.w2k#top .post-grid > *,
body.w2k#top .portrait-grid > *,
body.w2k#top .magazine-featured-grid > *,
body.w2k#top .magazine-poster-grid > * {
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
}

body.w2k#top .post-card,
body.w2k#top .magazine-post-card,
body.w2k#top .poster-card,
body.w2k#top .magazine-poster {
  height: 100% !important;
}

/* 文字卡片视图 = 经典列表控件 */
body.w2k#top .text-card-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .text-card-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--row-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .text-card-item:last-child {
  border-bottom: 0 !important;
}

body.w2k#top .text-card-item:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .text-card-item:hover .text-card-title,
body.w2k#top .text-card-item:hover .text-card-meta,
body.w2k#top .text-card-item:hover .text-card-category,
body.w2k#top .text-card-item:hover time,
body.w2k#top .text-card-item:hover .text-card-arrow {
  color: var(--select-text) !important;
}

body.w2k#top .text-card-main {
  flex: 1 1 auto;
  min-width: 0;
}

body.w2k#top .text-card-heading {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0;
}

body.w2k#top .text-card-title {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: var(--text) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .text-card-meta {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin: 2px 0 0 !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .text-card-category {
  padding: 0 4px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
  color: var(--text);
  font-size: 10px;
  line-height: 14px;
}

body.w2k#top .text-card-pin {
  flex: 0 0 auto;
  height: 15px !important;
  min-height: 0 !important;
  padding: 0 4px;
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  line-height: 13px !important;
  font-weight: 700;
}

body.w2k#top .text-card-arrow {
  flex: 0 0 auto !important;
  width: 14px !important;
  height: 14px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .magazine-note-list .text-card-item:last-child {
  border-bottom: 0 !important;
}

/* 空状态 */
body.w2k#top .post-empty,
body.w2k#top .archive-empty {
  padding: 26px 14px !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  color: var(--text-muted) !important;
  font-size: 12px !important;
  text-align: center !important;
}

/* ==========================================================================
   9. 过滤工具栏（排序 / 分类 / 标签）
   ========================================================================== */

body.w2k#top .article-region {
  min-width: 0;
}

body.w2k#top .compact-filter {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin: 0 0 10px !important;
  padding: 3px 4px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  position: static !important;
}

body.w2k#top .compact-filter-main {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body.w2k#top .compact-filter-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

body.w2k#top .compact-filter-label {
  padding: 0 3px 0 1px !important;
  font-size: 12px !important;
  color: var(--text) !important;
}

/* 排序胶囊 = 工具栏按钮，选中 = 凹陷 + 抖动底纹 */
body.w2k#top .compact-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 21px !important;
  padding: 0 9px !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.w2k#top .compact-pill:hover {
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight) !important;
  color: var(--text) !important;
}

body.w2k#top .compact-pill.is-active {
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  background-image: repeating-conic-gradient(var(--dither-a) 0 25%, var(--dither-b) 0 50%) !important;
  background-size: 2px 2px !important;
  font-weight: 700 !important;
}

/* 下拉触发器 */
body.w2k#top .filter-dropdown {
  position: relative !important;
}

body.w2k#top .filter-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 21px !important;
  padding: 0 6px 0 9px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .filter-trigger.is-selected {
  font-weight: 700 !important;
}

body.w2k#top .filter-trigger svg {
  width: 10px !important;
  height: 10px !important;
  flex: 0 0 auto !important;
}

/* 下拉面板 = 经典弹出菜单 */
body.w2k#top .filter-popover {
  position: absolute !important;
  top: calc(100% + 2px) !important;
  left: 0 !important;
  z-index: 60 !important;
  min-width: 180px !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  padding: 2px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow), 3px 3px 0 rgba(0, 0, 0, .22) !important;
  border-radius: 0 !important;
  transform: none !important;
  opacity: 1 !important;
}

body.w2k#top .compact-option {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-content: space-between !important;
  padding: 2px 8px 2px 20px !important;
  position: relative !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.w2k#top .compact-option span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .compact-option small {
  flex: 0 0 auto;
  color: var(--gray-text) !important;
  font-size: 11px !important;
}

body.w2k#top .compact-option:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .compact-option:hover small {
  color: var(--select-text) !important;
}

/* 当前项：经典菜单的勾选标记 */
body.w2k#top .compact-option.is-active {
  font-weight: 700 !important;
}

body.w2k#top .compact-option.is-active::before {
  content: "✓";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text);
}

body.w2k#top .compact-option.is-active:hover::before {
  color: var(--select-text);
}

body.w2k#top .compact-clear {
  display: inline-flex !important;
  align-items: center !important;
  height: 21px !important;
  padding: 0 9px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .compact-filter-count {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  line-height: 19px;
}

body.w2k#top .compact-filter-count b {
  color: var(--text) !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   10. 分页
   ========================================================================== */

body.w2k#top .front-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 14px 0 0 !important;
}

body.w2k#top .front-page-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 62px !important;
  height: 21px !important;
  padding: 0 10px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .front-page-btn:hover {
  color: var(--text) !important;
}

body.w2k#top .front-page-btn.is-disabled {
  color: var(--gray-text) !important;
  text-shadow: 1px 1px var(--gray-text-shadow) !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.w2k#top .front-page-count {
  padding: 1px 8px !important;
  font-size: 11px !important;
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

/* ==========================================================================
   11. 公开页：分类 / 标签 / 归档 / 关于
   ========================================================================== */

/* 单标签页的文章列表 = 经典列表控件 */
body.w2k#top .archive-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .archive-item {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  margin: 0 !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--row-line) !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .archive-item:last-child {
  border-bottom: 0 !important;
}

body.w2k#top .archive-item:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .archive-item:hover * {
  color: var(--select-text) !important;
}

body.w2k#top .archive-item time {
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-variant-numeric: tabular-nums;
}

body.w2k#top .archive-item strong {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--text) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .archive-item > span {
  flex: 0 0 auto;
  color: var(--text-muted) !important;
}

body.w2k#top .public-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin: 0 0 12px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--shadow) !important;
  box-shadow: 0 1px var(--hilight) !important;
}

body.w2k#top .public-head h1 {
  margin: 0 0 3px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--text) !important;
}

body.w2k#top .public-head p {
  margin: 0 !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .front-eyebrow {
  margin: 0 0 3px !important;
  font-family: var(--w2k-font) !important;
  font-size: 10px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: var(--gray-text) !important;
}

body.w2k#top .front-count {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  padding: 2px 8px !important;
  background: var(--window) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .front-count b {
  color: var(--text) !important;
  font-size: 13px !important;
}

/* 分类 / 标签磁贴 = 图标 + 名称的资源管理器条目 */
body.w2k#top .taxonomy-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  gap: 8px !important;
}

body.w2k#top .taxonomy-tile {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
  padding: 7px 9px 7px 34px !important;
  position: relative !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .taxonomy-tile::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='1' y='4' width='13' height='10' fill='%23ffd000'/%3E%3Crect x='1' y='3' width='13' height='1' fill='%23000'/%3E%3Crect x='1' y='14' width='13' height='1' fill='%23000'/%3E%3Crect y='4' width='1' height='10' fill='%23000'/%3E%3Crect x='14' y='4' width='1' height='10' fill='%23000'/%3E%3Crect x='1' y='4' width='13' height='2' fill='%23a08000'/%3E%3Crect x='3' y='2' width='9' height='2' fill='%23ffd000'/%3E%3Crect x='3' y='2' width='9' height='1' fill='%23000'/%3E%3C/svg%3E");
}

body.w2k#top .taxonomy-tile:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .taxonomy-tile strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: inherit !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .taxonomy-tile small {
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .taxonomy-tile:hover small {
  color: var(--select-text) !important;
}

body.w2k#top .taxonomy-name {
  color: inherit !important;
}

/* 归档时间轴 = 分组框 + 列表控件 */
body.w2k#top .archive-timeline {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
}

body.w2k#top .archive-year {
  position: relative !important;
  margin: 0 !important;
  padding: 20px 10px 10px !important;
  border: 1px solid var(--shadow) !important;
  box-shadow: inset 1px 1px var(--hilight), 1px 1px var(--hilight) !important;
}

body.w2k#top .archive-year-head {
  position: absolute !important;
  top: -9px !important;
  left: 6px !important;
  right: 6px !important;
  display: flex !important;
  align-items: center !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.w2k#top .archive-year-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 18px !important;
  padding: 0 6px !important;
  background: var(--face) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .archive-year-title strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
}

body.w2k#top .archive-year-ring {
  display: none !important;
}

body.w2k#top .archive-year-list {
  display: flex !important;
  flex-direction: column !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .archive-timeline-item {
  display: grid !important;
  grid-template-columns: 54px auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 8px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--row-line) !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .archive-timeline-item:last-child {
  border-bottom: 0 !important;
}

body.w2k#top .archive-timeline-item:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .archive-timeline-item:hover * {
  color: var(--select-text) !important;
}

body.w2k#top .archive-timeline-item time {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-variant-numeric: tabular-nums;
}

body.w2k#top .archive-timeline-item strong {
  grid-column: 3;
  grid-row: 1;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--text) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .archive-dot {
  display: none !important;
}

body.w2k#top .archive-category {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  padding: 0 4px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
  font-size: 10px;
  line-height: 14px;
  color: var(--text);
}

body.w2k#top .archive-pagination,
body.w2k#top .archive-timeline-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
}

body.w2k#top .archive-pagination a,
body.w2k#top .archive-pagination span.is-disabled,
body.w2k#top .archive-pages a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 21px !important;
  padding: 0 8px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
}

body.w2k#top .archive-pagination span.is-disabled {
  color: var(--gray-text) !important;
  text-shadow: 1px 1px var(--gray-text-shadow) !important;
}

body.w2k#top .archive-pages {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

body.w2k#top .archive-pages a.is-active {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow) !important;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light) !important;
  font-weight: 700 !important;
}

/* 关于页 = 文档窗口里的纸张 */
body.w2k#top .about-card {
  padding: 12px 14px !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   12. 文章页：文档窗口
   ========================================================================== */

/* 客户区内的次级工具栏（返回列表 / 首页 / 文章统计） */
body.w2k#top .w2k-clientbar {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  max-width: 860px !important;
  margin: 0 auto 8px !important;
  padding: 3px 4px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
}

body.w2k#top .w2k-clientbar-spacer {
  flex: 1 1 auto;
}

body.w2k#top .w2k-clientbar-info {
  flex: 0 1 auto;
  padding: 0 6px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.w2k#top .reading-article,
body.w2k#top .reading-article-single {
  display: block !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* 文章头：标题 + 分类标签 + 元信息 */
body.w2k#top .reading-head,
body.w2k#top .reading-head-single {
  display: block !important;
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .reading-kicker {
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
  margin: 0 0 8px !important;
  padding: 0 0 0 4px !important;
  border-bottom: 1px solid var(--shadow) !important;
}

/* 分类 / 标签胶囊 = 经典选项卡 */
body.w2k#top .reading-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 20px !important;
  margin: 0 0 -1px !important;
  padding: 0 9px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) transparent var(--hilight) !important;
  box-shadow: inset -1px 0 var(--shadow) !important;
  border-radius: 3px 3px 0 0 !important;
  transform: none !important;
}

body.w2k#top .reading-pill:hover {
  color: var(--link-hover) !important;
  text-decoration: underline !important;
}

body.w2k#top .reading-title {
  margin: 0 0 8px !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  color: var(--text) !important;
}

body.w2k#top .reading-meta {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin: 0 !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .reading-meta > [aria-hidden="true"] {
  display: none !important;
}

body.w2k#top .reading-meta > time,
body.w2k#top .reading-meta > span {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 6px !important;
  line-height: 18px !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

body.w2k#top .reading-meta > time {
  font-family: var(--w2k-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* 正文 = 文档纸张（凹陷白底） */
body.w2k#top .reading-content,
body.w2k#top .prose-paper {
  max-width: none !important;
  margin: 0 !important;
  padding: 16px 18px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  font-family: var(--w2k-font) !important;
  font-size: 14.5px !important;
  line-height: 1.85 !important;
  letter-spacing: 0 !important;
  word-break: break-word;
}

/* 文章底部的操作栏 */
body.w2k#top .reading-actions,
body.w2k#top .reading-actions-single {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 10px 0 0 !important;
  padding: 6px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .reading-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: 96px !important;
  min-height: 23px !important;
  padding: 0 10px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .reading-action:active {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow) !important;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light) !important;
  padding: 1px 9px 0 11px !important;
}

/* 相关文章 = 分组框 + 迷你窗口卡片 */
body.w2k#top .reading-related {
  position: relative !important;
  margin: 22px 0 0 !important;
  padding: 20px 10px 10px !important;
  background: transparent !important;
  border-radius: 0 !important;
}

body.w2k#top .reading-related-head {
  position: absolute !important;
  top: -9px !important;
  left: 6px !important;
  right: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.w2k#top .reading-related-head > div {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 18px !important;
  padding: 0 6px !important;
  background: var(--face) !important;
}

body.w2k#top .reading-related-head span {
  display: none !important;
}

body.w2k#top .reading-related-head h2 {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

body.w2k#top .reading-related-head > a {
  display: inline-flex !important;
  align-items: center !important;
  height: 18px !important;
  padding: 0 6px !important;
  background: var(--face) !important;
  font-size: 11px !important;
}

body.w2k#top .reading-related-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.w2k#top .reading-related-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 3px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .reading-related-media {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .reading-related-media.is-placeholder i {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' shape-rendering='crispEdges'%3E%3Crect width='24' height='28' fill='%23ffffff'/%3E%3Crect x='23' width='1' height='28' fill='%23808080'/%3E%3Crect y='27' width='24' height='1' fill='%23808080'/%3E%3Crect x='3' y='4' width='14' height='2' fill='%230a246a'/%3E%3Crect x='3' y='9' width='17' height='2' fill='%23c0c0c0'/%3E%3Crect x='3' y='13' width='11' height='2' fill='%23c0c0c0'/%3E%3Crect x='3' y='17' width='17' height='2' fill='%23c0c0c0'/%3E%3C/svg%3E");
  opacity: .8;
}

body.w2k#top .reading-related-copy {
  display: block !important;
  padding: 0 2px 2px !important;
  min-width: 0 !important;
}

body.w2k#top .reading-related-copy strong {
  display: block !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: var(--link) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .reading-related-card:hover .reading-related-copy strong {
  color: var(--link-hover) !important;
  text-decoration: underline !important;
}

body.w2k#top .reading-related-copy time {
  display: block !important;
  margin-top: 2px !important;
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

/* ==========================================================================
   13. 正文内部：标题 / 段落 / 列表 / 表格 / 引用 / 代码
   ========================================================================== */

body.w2k#top .prose-paper > :first-child {
  margin-top: 0 !important;
}

body.w2k#top .prose-paper > :last-child {
  margin-bottom: 0 !important;
}

body.w2k#top .prose-paper p {
  margin: 0 0 1em !important;
  font-family: var(--w2k-font) !important;
  font-size: 14.5px !important;
  line-height: 1.85 !important;
  color: var(--text) !important;
}

body.w2k#top .prose-paper h1,
body.w2k#top .prose-paper h2,
body.w2k#top .prose-paper h3,
body.w2k#top .prose-paper h4 {
  position: static !important;
  padding: 0 0 4px !important;
  margin: 1.6em 0 .7em !important;
  font-family: var(--w2k-font) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--row-line) !important;
}

body.w2k#top .prose-paper h1::after,
body.w2k#top .prose-paper h2::after,
body.w2k#top .prose-paper h3::after,
body.w2k#top .prose-paper h4::after,
body.w2k#top .prose-paper h1::before,
body.w2k#top .prose-paper h2::before {
  display: none !important;
  content: none !important;
}

body.w2k#top .prose-paper h1 {
  font-size: 20px !important;
}

body.w2k#top .prose-paper h2 {
  font-size: 17px !important;
}

body.w2k#top .prose-paper h3 {
  font-size: 15px !important;
}

body.w2k#top .prose-paper h4 {
  font-size: 14px !important;
}

body.w2k#top .prose-paper a {
  color: var(--link) !important;
  text-decoration: underline !important;
  text-decoration-style: solid !important;
  text-underline-offset: 2px !important;
}

body.w2k#top .prose-paper a:hover {
  color: var(--link-hover) !important;
}

body.w2k#top .prose-paper strong {
  color: var(--text) !important;
  font-weight: 700 !important;
}

body.w2k#top .prose-paper ul,
body.w2k#top .prose-paper ol {
  margin: 0 0 1em !important;
  padding-left: 1.7em !important;
}

body.w2k#top .prose-paper ul {
  list-style: disc outside !important;
}

body.w2k#top .prose-paper ol {
  list-style: decimal outside !important;
}

body.w2k#top .prose-paper li {
  margin: .25em 0 !important;
  font-size: 14.5px !important;
  line-height: 1.8 !important;
}

body.w2k#top .prose-paper li::marker {
  color: var(--text-muted) !important;
}

body.w2k#top .prose-paper hr {
  height: 0 !important;
  margin: 1.6em 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--shadow) !important;
  box-shadow: 0 1px var(--hilight) !important;
  background: transparent !important;
}

body.w2k#top .prose-paper blockquote {
  position: static !important;
  margin: 1.2em 0 !important;
  padding: 8px 12px !important;
  background: var(--window-alt) !important;
  color: var(--text-muted) !important;
  font-family: var(--w2k-font) !important;
  font-style: normal !important;
  border: 0 !important;
  border-left: 3px solid var(--shadow) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.w2k#top .prose-paper blockquote::before,
body.w2k#top .prose-paper blockquote::after {
  display: none !important;
  content: none !important;
}

body.w2k#top .prose-paper blockquote > :last-child {
  margin-bottom: 0 !important;
}

body.w2k#top .prose-paper img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 1.2em auto !important;
  padding: 3px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

/* 行内代码与代码块 */
body.w2k#top .prose-paper :not(pre) > code {
  padding: 0 4px !important;
  background: var(--window-alt) !important;
  color: var(--accent-red) !important;
  font-family: var(--w2k-mono) !important;
  font-size: 12.5px !important;
  border: 1px solid var(--row-line) !important;
  border-radius: 0 !important;
}

body.w2k#top .code-block-wrapper {
  margin: 1.2em 0 !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

body.w2k#top .code-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 20px !important;
  padding: 0 3px 0 6px !important;
  background: linear-gradient(90deg, var(--title-a), var(--title-b)) !important;
  color: var(--title-text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body.w2k#top .code-language {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--w2k-mono) !important;
  letter-spacing: .06em;
}

body.w2k#top .code-tools {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex: 0 0 auto !important;
}

body.w2k#top .code-tools button,
body.w2k#top .copy-code,
body.w2k#top .collapse-code {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 16px !important;
  padding: 0 !important;
  background: var(--face) !important;
  color: var(--text) !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .code-tools button svg {
  width: 11px !important;
  height: 11px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

body.w2k#top .code-tools button.is-copied {
  color: var(--accent-green) !important;
}

body.w2k#top .prose-paper .code-block-wrapper pre.code-body,
body.w2k#top .prose-paper pre.code-body {
  margin: 0 !important;
  padding: 8px 0 10px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  font-family: var(--w2k-mono) !important;
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto !important;
  counter-reset: code-line;
}

body.w2k#top .code-line {
  display: block !important;
  padding: 0 10px 0 44px !important;
  position: relative !important;
  white-space: pre !important;
  min-height: 1.6em;
}

body.w2k#top .code-line::before {
  counter-increment: code-line;
  content: counter(code-line);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  padding-right: 6px;
  text-align: right;
  color: var(--gray-text);
  background: var(--face);
  border-right: 1px solid var(--shadow);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

body.w2k#top .code-block-wrapper.is-single-line .code-line {
  padding-left: 44px !important;
}

body.w2k#top .code-block-wrapper.is-collapsed pre.code-body {
  display: none !important;
}

/* 表格 = 经典列表控件 */
body.w2k#top .table-scroll {
  margin: 1.2em 0 !important;
  overflow-x: auto !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
}

body.w2k#top .prose-paper table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: var(--window) !important;
  color: var(--text) !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  font-size: 13px !important;
}

body.w2k#top .prose-paper th {
  padding: 3px 8px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-align: left !important;
  border: 0 !important;
  border-right: 1px solid var(--shadow) !important;
  border-bottom: 1px solid var(--shadow) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--light) !important;
  white-space: nowrap;
}

body.w2k#top .prose-paper td {
  padding: 4px 8px !important;
  background: transparent !important;
  color: var(--text) !important;
  border: 0 !important;
  border-right: 1px solid var(--row-line) !important;
  border-bottom: 1px solid var(--row-line) !important;
  font-size: 13px !important;
}

body.w2k#top .prose-paper tr > *:last-child {
  border-right: 0 !important;
}

body.w2k#top .prose-paper tr:last-child > td {
  border-bottom: 0 !important;
}

body.w2k#top .prose-paper tbody tr:hover td {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .prose-paper tbody tr:hover td a {
  color: var(--select-text) !important;
}

/* 代码高亮：浅色主题保持 github 亮色，深色主题换成经典控制台配色 */
html.dark body.w2k#top .prose-paper .code-block-wrapper pre.code-body,
html.dark body.w2k#top .prose-paper pre.code-body {
  background: var(--window) !important;
  color: #e8e8e8 !important;
}

html.dark body.w2k#top .hljs,
html.dark body.w2k#top .hljs-subst {
  color: #e8e8e8 !important;
}

html.dark body.w2k#top .hljs-comment,
html.dark body.w2k#top .hljs-quote {
  color: #808080 !important;
  font-style: italic;
}

html.dark body.w2k#top .hljs-keyword,
html.dark body.w2k#top .hljs-selector-tag,
html.dark body.w2k#top .hljs-literal,
html.dark body.w2k#top .hljs-doctag,
html.dark body.w2k#top .hljs-formula,
html.dark body.w2k#top .hljs-name {
  color: #6fa8ff !important;
  font-weight: 700;
}

html.dark body.w2k#top .hljs-string,
html.dark body.w2k#top .hljs-regexp,
html.dark body.w2k#top .hljs-addition,
html.dark body.w2k#top .hljs-attribute,
html.dark body.w2k#top .hljs-meta .hljs-string {
  color: #3ccb5a !important;
}

html.dark body.w2k#top .hljs-number,
html.dark body.w2k#top .hljs-variable,
html.dark body.w2k#top .hljs-template-variable,
html.dark body.w2k#top .hljs-type,
html.dark body.w2k#top .hljs-selector-attr,
html.dark body.w2k#top .hljs-selector-pseudo {
  color: #e0b040 !important;
}

html.dark body.w2k#top .hljs-title,
html.dark body.w2k#top .hljs-section,
html.dark body.w2k#top .hljs-title.class_,
html.dark body.w2k#top .hljs-title.function_ {
  color: #40d0d0 !important;
  font-weight: 700;
}

html.dark body.w2k#top .hljs-attr,
html.dark body.w2k#top .hljs-symbol,
html.dark body.w2k#top .hljs-bullet,
html.dark body.w2k#top .hljs-link,
html.dark body.w2k#top .hljs-selector-id,
html.dark body.w2k#top .hljs-selector-class {
  color: #c090ff !important;
}

html.dark body.w2k#top .hljs-built_in,
html.dark body.w2k#top .hljs-builtin-name,
html.dark body.w2k#top .hljs-params {
  color: #b4b4b4 !important;
}

html.dark body.w2k#top .hljs-deletion {
  color: #ff5a5a !important;
}

html.dark body.w2k#top .hljs-meta,
html.dark body.w2k#top .hljs-tag {
  color: #808080 !important;
}

html.dark body.w2k#top .hljs-emphasis {
  font-style: italic;
}

html.dark body.w2k#top .hljs-strong {
  font-weight: 700;
}

html.dark body.w2k#top .prose-paper :not(pre) > code {
  background: var(--window-alt) !important;
  color: #ff8a8a !important;
  border-color: var(--row-line) !important;
}

/* ==========================================================================
   14. 正文内的自定义块：提示框 / 相册 / 下载卡 / 密码隐藏
   ========================================================================== */

/* 提示框 = 经典信息面板 */
body.w2k#top .prose-paper .paper-callout {
  display: block !important;
  margin: 1.2em 0 !important;
  padding: 8px 12px 8px 12px !important;
  background: var(--window-alt) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  border-left: 3px solid var(--accent-blue) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
}

body.w2k#top .prose-paper .paper-callout p,
body.w2k#top .prose-paper .paper-callout .callout-body {
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: var(--text) !important;
}

body.w2k#top .prose-paper .paper-callout .callout-title,
body.w2k#top .prose-paper details.paper-callout > summary .callout-title {
  color: var(--text) !important;
  font-weight: 700 !important;
}

body.w2k#top .prose-paper details.paper-callout {
  padding: 0 !important;
  overflow: hidden !important;
}

body.w2k#top .prose-paper details.paper-callout > summary {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 12px !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  cursor: pointer;
}

body.w2k#top .prose-paper details.paper-callout > .callout-body {
  padding: 0 12px 8px !important;
}

body.w2k#top .prose-paper .callout-chevron {
  color: var(--text-muted) !important;
  margin-left: auto;
}

body.w2k#top .prose-paper .callout-icon {
  display: none !important;
}

body.w2k#top .prose-paper .callout-default {
  border-left-color: var(--shadow) !important;
}

body.w2k#top .prose-paper .callout-primary,
body.w2k#top .prose-paper .callout-info {
  border-left-color: var(--accent-blue) !important;
}

body.w2k#top .prose-paper .callout-success {
  border-left-color: var(--accent-green) !important;
}

body.w2k#top .prose-paper .callout-warning {
  border-left-color: var(--accent-yellow) !important;
}

body.w2k#top .prose-paper .callout-danger,
body.w2k#top .prose-paper .callout-error {
  border-left-color: var(--accent-red) !important;
}

/* 相册 = 凹陷照片框墙 */
body.w2k#top .paper-gallery,
body.w2k#top .prose-paper .paper-gallery,
body.w2k#top .paper-gallery[data-gallery] {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 1.3em 0 !important;
  padding: 3px !important;
  column-count: initial !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .paper-gallery-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 20px !important;
  margin: 0 0 3px !important;
  padding: 0 4px !important;
  background: linear-gradient(90deg, var(--title-a), var(--title-b)) !important;
  color: var(--title-text) !important;
}

body.w2k#top .paper-gallery-title,
body.w2k#top .paper-gallery[data-gallery] .paper-gallery-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  color: var(--title-text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

body.w2k#top .paper-gallery-title span,
body.w2k#top .paper-gallery[data-gallery] .paper-gallery-title span {
  color: var(--title-text) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.w2k#top .paper-gallery-switcher {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex: 0 0 auto !important;
}

body.w2k#top .paper-gallery-switcher button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 16px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  background: var(--face) !important;
  color: var(--text) !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

body.w2k#top .paper-gallery-layout-icon {
  width: 12px !important;
  height: 12px !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

body.w2k#top .paper-gallery-switcher button.is-active {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow) !important;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .paper-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 3px !important;
  column-count: initial !important;
}

body.w2k#top .paper-gallery.is-layout-single .paper-gallery-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.w2k#top .paper-gallery.is-layout-double .paper-gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.w2k#top .paper-gallery.is-layout-three .paper-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.w2k#top .paper-photo-card,
body.w2k#top .prose-paper .paper-photo-card {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 1px !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  break-inside: auto !important;
  transform: none !important;
  transition: none !important;
}

body.w2k#top .paper-photo-link {
  display: block !important;
  position: relative !important;
  line-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.w2k#top .paper-photo-image,
body.w2k#top .prose-paper .paper-photo-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

body.w2k#top .paper-photo-zoom {
  color: #fff !important;
  text-shadow: 1px 1px 0 #000;
}

body.w2k#top .paper-gallery-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  margin: 3px 0 0 !important;
  padding: 3px !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

body.w2k#top .paper-gallery-prev,
body.w2k#top .paper-gallery-next,
body.w2k#top .paper-gallery-pages {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 19px !important;
  padding: 0 8px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

/* 下载卡 = 经典分组框 */
body.w2k#top .paper-download-card {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 1.3em 0 !important;
  padding: 8px 10px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .download-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 1 260px !important;
  min-width: 0 !important;
}

body.w2k#top .download-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body.w2k#top .download-filetype {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  background: var(--window) !important;
  color: var(--accent-blue) !important;
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .download-head strong {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .download-head small {
  display: block !important;
  margin-top: 2px !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

body.w2k#top .download-codes {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  flex: 0 1 auto !important;
}

body.w2k#top .download-code {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 21px !important;
  padding: 0 6px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 11px !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .download-code b {
  font-family: var(--w2k-mono) !important;
  font-weight: 700 !important;
  color: var(--accent-red) !important;
  letter-spacing: .06em;
}

body.w2k#top .download-code em {
  font-style: normal !important;
  color: var(--link) !important;
}

body.w2k#top .download-action {
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

body.w2k#top .download-main {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: 96px !important;
  min-height: 23px !important;
  padding: 0 12px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
}

/* 密码隐藏 = 经典登录框 */
body.w2k#top .paper-hide-lock,
body.w2k#top .prose-paper .paper-hide-lock {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  max-width: 460px !important;
  margin: 1.3em auto !important;
  padding: 12px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .hide-lock-form {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
}

body.w2k#top .hide-lock-badge {
  flex: 0 0 auto !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

body.w2k#top .hide-lock-form input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 21px !important;
  padding: 0 6px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  outline: none !important;
}

body.w2k#top .hide-lock-form button {
  flex: 0 0 auto !important;
  min-width: 76px !important;
  height: 21px !important;
  padding: 0 10px !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .hide-lock-status {
  min-height: 14px !important;
  font-size: 11px !important;
  color: var(--accent-red) !important;
}

body.w2k#top .paper-hide-revealed {
  margin: 1.2em 0 !important;
}

body.w2k#top .paper-hide-lock.is-shake {
  animation: w2k-shake .3s steps(2, end) 2;
}

@keyframes w2k-shake {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* 悬浮提示 = 黄底黑字工具提示 */
body.w2k#top .paper-toast {
  position: fixed !important;
  left: 50% !important;
  bottom: 26px !important;
  z-index: 90 !important;
  min-width: 120px !important;
  max-width: 320px !important;
  padding: 3px 10px !important;
  transform: translateX(-50%) !important;
  background: var(--tip-bg) !important;
  color: var(--tip-text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  text-align: center !important;
  border: 1px solid #000 !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35) !important;
  border-radius: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .12s linear !important;
}

body.w2k#top .paper-toast.is-visible {
  opacity: 1 !important;
}

/* ==========================================================================
   15. 音频 / 视频播放器
   ========================================================================== */

body.w2k#top .paper-audio-player {
  margin: 0 0 12px !important;
  padding: 3px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .paper-audio-main {
  display: flex !important;
  align-items: stretch !important;
  gap: 4px !important;
  padding: 4px !important;
}

body.w2k#top .paper-audio-cover {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 92px !important;
  height: 92px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .paper-audio-cover img,
body.w2k#top .paper-audio-cover-fallback {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.w2k#top .paper-audio-cover-fallback {
  display: grid !important;
  place-items: center !important;
  background: var(--window-alt) !important;
  color: var(--gray-text) !important;
  font-size: 30px !important;
}

body.w2k#top #paper-audio-play-icon {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 26px !important;
  height: 22px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  transform: translate(-50%, -50%) !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-style: normal !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
}

body.w2k#top .paper-audio-control {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 4px 2px !important;
}

body.w2k#top .paper-audio-info-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.w2k#top .paper-audio-title-line {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  min-width: 0 !important;
  font-family: var(--w2k-font) !important;
}

body.w2k#top .paper-audio-title-line strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .paper-audio-title-line span,
body.w2k#top .paper-audio-credits {
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-family: var(--w2k-font) !important;
}

body.w2k#top .paper-audio-credits {
  margin-top: 2px !important;
}

body.w2k#top .paper-audio-time {
  flex: 0 0 auto !important;
  padding: 0 5px !important;
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

body.w2k#top .paper-audio-control-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.w2k#top .paper-audio-progress {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
}

body.w2k#top .paper-audio-progress::-webkit-slider-runnable-track {
  height: 12px;
  background: var(--trough);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
}

body.w2k#top .paper-audio-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 20px;
  margin-top: -5px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
}

body.w2k#top .paper-audio-progress::-moz-range-track {
  height: 12px;
  background: var(--trough);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
}

body.w2k#top .paper-audio-progress::-moz-range-thumb {
  width: 9px;
  height: 18px;
  border-radius: 0;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
}

body.w2k#top .paper-audio-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
}

body.w2k#top .paper-audio-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 21px !important;
  padding: 0 !important;
  background: var(--face) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border: 1px solid !important;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight) !important;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .paper-audio-lyric {
  margin-top: 4px !important;
  padding: 3px 6px !important;
  background: var(--window) !important;
  color: var(--accent-blue) !important;
  font-size: 12px !important;
  text-align: center !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

/* 播放列表 = 列表控件 */
body.w2k#top .paper-audio-playlist {
  display: flex !important;
  flex-direction: column !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  margin: 0 !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light) !important;
}

body.w2k#top .paper-audio-playlist.is-collapsed {
  display: none !important;
}

body.w2k#top .paper-audio-track {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 8px !important;
  min-height: 22px !important;
  background: var(--window) !important;
  color: var(--text) !important;
  font-family: var(--w2k-font) !important;
  font-size: 12px !important;
  text-align: left !important;
  border: 0 !important;
  border-bottom: 1px solid var(--row-line) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

body.w2k#top .paper-audio-track:last-child {
  border-bottom: 0 !important;
}

body.w2k#top .paper-audio-track:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
}

body.w2k#top .paper-audio-track:hover * {
  color: var(--select-text) !important;
}

body.w2k#top .paper-audio-track.is-active {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
  font-weight: 700 !important;
}

body.w2k#top .paper-audio-track.is-active * {
  color: var(--select-text) !important;
}

body.w2k#top .paper-audio-index {
  font-family: var(--w2k-mono) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-variant-numeric: tabular-nums;
}

body.w2k#top .paper-audio-track-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .paper-audio-track-artist {
  font-size: 11px !important;
  color: var(--text-muted) !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 视频 = 凹陷黑底播放区 */
body.w2k#top .paper-video-shell,
body.w2k#top .reading-stage {
  width: 100% !important;
  margin: 0 0 12px !important;
  padding: 3px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .paper-video-player {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: #000 !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.w2k#top .paper-video-player .art-video-player,
body.w2k#top .paper-video-player video {
  border-radius: 0 !important;
  background: #000 !important;
}

body.w2k#top .paper-video-player .art-progress-played {
  background: var(--bar) !important;
}

/* ==========================================================================
   16. 目录（保留旧结构的最小样式）
   ========================================================================== */

body.w2k#top .toc-card {
  padding: 3px !important;
  background: var(--face) !important;
  border: 1px solid !important;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light) !important;
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow) !important;
  border-radius: 0 !important;
}

body.w2k#top .toc-list {
  max-height: 320px !important;
  overflow-y: auto !important;
  background: var(--window) !important;
  border: 1px solid !important;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow) !important;
}

body.w2k#top .toc-link {
  display: block !important;
  padding: 2px 8px !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 12px !important;
  border-radius: 0 !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.w2k#top .toc-link::before {
  display: none !important;
  content: none !important;
}

body.w2k#top .toc-link:hover {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
  transform: none !important;
}

body.w2k#top .toc-link.is-active {
  background: var(--select-bg) !important;
  color: var(--select-text) !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   17. 经典对话框（404 等）
   ========================================================================== */

body.w2k#top .w2k-dialog-overlay {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: var(--desktop);
}

body.w2k#top .w2k-dialog {
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  padding: 3px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow), 4px 4px 0 rgba(0, 0, 0, .22);
}

body.w2k#top .w2k-dialog .w2k-titlebar-buttons {
  display: inline-flex;
}

body.w2k#top .w2k-dialog-body {
  display: flex;
  gap: 14px;
  padding: 16px 16px 12px;
}

body.w2k#top .w2k-dialog-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
}

body.w2k#top .w2k-dialog-message {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
}

body.w2k#top .w2k-dialog-message b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

body.w2k#top .w2k-dialog-message p {
  margin: 0 0 6px;
  color: var(--text-muted);
}

body.w2k#top .w2k-dialog-message code {
  font-family: var(--w2k-mono);
  font-size: 12px;
  color: var(--accent-red);
}

body.w2k#top .w2k-dialog-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 12px 12px;
}

body.w2k#top .w2k-dialog-buttons .w2k-btn {
  min-width: 88px;
  min-height: 23px;
}

body.w2k#top .w2k-btn-default {
  outline: 1px solid var(--dkshadow);
  outline-offset: 0;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light), 0 0 0 1px var(--dkshadow);
}

/* ==========================================================================
   18. 响应式
   ========================================================================== */

/* 中等屏幕：三列降为两列 */
@media (max-width: 1200px) {
  body.w2k#top .magazine-poster-grid,
  body.w2k#top .portrait-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  body.w2k#top .post-grid,
  body.w2k#top .magazine-featured-grid,
  body.w2k#top .reading-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.w2k#top .magazine-poster-grid,
  body.w2k#top .portrait-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .w2k-desktop {
    padding: 12px 12px 34px;
  }

  body.w2k#top .w2k-tool-label {
    display: none !important;
  }

  body.w2k#top .w2k-address {
    flex: 1 1 40% !important;
  }
}

/* 手机：窗口铺满，去掉四周边距与内层按钮投影 */
@media (max-width: 767px) {
  .w2k-desktop {
    padding: 0;
  }

  .w2k-window {
    width: 100%;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  .w2k-titlebar {
    height: 24px;
    padding-right: 3px;
  }

  .w2k-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }

  body.w2k#top .w2k-tool-label,
  body.w2k#top .w2k-tool-sep,
  body.w2k#top .w2k-address {
    display: none !important;
  }

  .w2k-search {
    flex: 1 1 100% !important;
  }

  .w2k-client {
    padding: 8px 6px;
  }

  body.w2k#top .post-grid,
  body.w2k#top .magazine-featured-grid,
  body.w2k#top .portrait-grid,
  body.w2k#top .magazine-poster-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.w2k#top .reading-related-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.w2k#top .reading-article-single {
    max-width: 100% !important;
  }

  body.w2k#top .reading-content,
  body.w2k#top .prose-paper {
    padding: 12px 11px !important;
    font-size: 14px !important;
  }

  body.w2k#top .reading-title {
    font-size: 18px !important;
  }

  body.w2k#top .reading-head,
  body.w2k#top .reading-head-single {
    padding: 9px !important;
  }

  body.w2k#top .magazine-section,
  body.w2k#top .archive-year,
  body.w2k#top .reading-related {
    padding: 18px 7px 7px !important;
  }

  body.w2k#top .archive-timeline-item {
    grid-template-columns: 46px auto minmax(0, 1fr) !important;
  }

  body.w2k#top .archive-timeline-item strong {
    white-space: normal !important;
  }

  body.w2k#top .archive-category {
    display: none !important;
  }

  body.w2k#top .paper-audio-cover {
    width: 72px !important;
    height: 72px !important;
  }

  body.w2k#top .w2k-status-field.w2k-status-brand {
    display: none !important;
  }

  body.w2k#top .taxonomy-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 480px) {
  body.w2k#top .compact-filter {
    align-items: stretch !important;
  }

  body.w2k#top .compact-filter-group {
    flex-wrap: wrap !important;
  }

  body.w2k#top .w2k-status-field:not(.w2k-status-grow):not(.w2k-status-clock) {
    display: none !important;
  }
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  body.w2k#top *,
  body.w2k#top *::before,
  body.w2k#top *::after {
    animation: none !important;
    transition: none !important;
  }
}

