/* ============================================================
   paper 主题 —— 牛皮纸复古文艺风（借鉴森木志）
   三套配色：纸色(默认) / 松绿 / 暗色
   字体：宋体/衬线
   ============================================================ */

/* ---- 配色变量（三套） ---- */
:root,
[data-palette="paper"] {
  --bg: #d9cfb9;
  --surface: #e1d8c6;
  --surface-elevated: #e5ddcc;
  --surface-tint: #ddd2bc;
  --line: #b7aa92;
  --soft: #cec2aa;
  --text: #474137;
  --heading: #3a342b;
  --muted: #5e574a;
  --subtle: #5e574a;
  --link: #6d4f32;
  --link-hover: #563d27;
  --accent: #6d4f32;
  --accent-hover: #563d27;
  --button-bg: #6d533a;
  --button-text: #f4eddf;
  --code-bg: #3a342b;
  --code-text: #e8dfc8;
  --field-bg: #ded3bd;
  --heading-rule: #79634b;
  --card-shadow: 0 1px 3px rgba(61, 52, 38, 0.08);
}

[data-palette="pine"] {
  --bg: #c7cdbf;
  --surface: #d3d9c9;
  --surface-elevated: #d9dfce;
  --surface-tint: #cdd3c1;
  --line: #a6af9c;
  --soft: #b7c0aa;
  --text: #3d473c;
  --heading: #2e3a30;
  --muted: #576354;
  --subtle: #576354;
  --link: #36543b;
  --link-hover: #27402c;
  --accent: #36543b;
  --accent-hover: #27402c;
  --button-bg: #3c5741;
  --button-text: #eef2e6;
  --code-bg: #2e3a30;
  --code-text: #dce6d2;
  --field-bg: #cbd1c0;
  --heading-rule: #4f6349;
  --card-shadow: 0 1px 3px rgba(46, 58, 48, 0.08);
}

[data-palette="dark"] {
  --bg: #30332f;
  --surface: #373a35;
  --surface-elevated: #3d403b;
  --surface-tint: #33362f;
  --line: #596151;
  --soft: #4a4f45;
  --text: #cccbbf;
  --heading: #dcd9cc;
  --muted: #9a9b8f;
  --subtle: #9a9b8f;
  --link: #bccb9e;
  --link-hover: #d3dfb6;
  --accent: #bccb9e;
  --accent-hover: #d3dfb6;
  --button-bg: #4a523f;
  --button-text: #e6e8d8;
  --code-bg: #1f211e;
  --code-text: #d8d9c8;
  --field-bg: #40443d;
  --heading-rule: #7a8470;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

[data-palette="rouge"] {
  --bg: #cbb4a6;
  --surface: #d4bfb2;
  --surface-elevated: #dac6ba;
  --surface-tint: #d0baac;
  --line: #a8897a;
  --soft: #bfa595;
  --text: #4d3a33;
  --heading: #3d2c26;
  --muted: #6b574d;
  --subtle: #6b574d;
  --link: #7c3f3a;
  --link-hover: #642f2b;
  --accent: #7c3f3a;
  --accent-hover: #642f2b;
  --button-bg: #85463f;
  --button-text: #f6ece4;
  --code-bg: #3d2c26;
  --code-text: #ecdcd2;
  --field-bg: #cfb7a9;
  --heading-rule: #9a6b5c;
  --card-shadow: 0 1px 3px rgba(61, 44, 38, 0.08);
}

[data-palette="indigo"] {
  --bg: #b7bfc9;
  --surface: #c2cad3;
  --surface-elevated: #c8d0d8;
  --surface-tint: #bdc5cf;
  --line: #98a3b1;
  --soft: #a8b3c1;
  --text: #39434f;
  --heading: #2c3642;
  --muted: #55616f;
  --subtle: #55616f;
  --link: #33506b;
  --link-hover: #253e55;
  --accent: #33506b;
  --accent-hover: #253e55;
  --button-bg: #3a536c;
  --button-text: #eaf0f5;
  --code-bg: #2c3642;
  --code-text: #d6e0ea;
  --field-bg: #b9c2cc;
  --heading-rule: #52677d;
  --card-shadow: 0 1px 3px rgba(44, 54, 66, 0.08);
}

[data-palette="cocoa"] {
  --bg: #b7a08b;
  --surface: #c2ac98;
  --surface-elevated: #c8b3a0;
  --surface-tint: #bda792;
  --line: #8f7a66;
  --soft: #a8937d;
  --text: #453a30;
  --heading: #372e26;
  --muted: #61544a;
  --subtle: #61544a;
  --link: #5a4028;
  --link-hover: #46311d;
  --accent: #5a4028;
  --accent-hover: #46311d;
  --button-bg: #61472e;
  --button-text: #f3ece2;
  --code-bg: #372e26;
  --code-text: #e6dac9;
  --field-bg: #b59f89;
  --heading-rule: #7d664e;
  --card-shadow: 0 1px 3px rgba(55, 46, 38, 0.08);
}

/* ---- 基础重置 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "OldSong", "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  font-size: 16px;
  line-height: 1.75;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; border: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---- 容器与布局 ---- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; margin: 28px 0; }
.main-col { min-width: 0; }
.side-col { min-width: 0; }

/* ---- 头部 ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo {
  font-size: 20px; font-weight: 700; letter-spacing: 1px;
  color: var(--heading); white-space: nowrap;
}
.nav { display: flex; gap: 22px; }
.nav a {
  position: relative; color: var(--muted); font-size: 15px;
  padding: 4px 2px; text-decoration: none;
  transition: color .2s ease;
}
/* 悬停下划线：从中间向两侧展开 */
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); border-radius: 1px;
  transform: scaleX(0); transform-origin: center;
  transition: transform .25s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { color: var(--accent); }
.nav a.active::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.search-form { display: flex; align-items: center; background: var(--field-bg); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; }
.search-form input { border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; width: 130px; }
.search-form input::placeholder { color: var(--subtle); }
.search-form button { border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; }

.palette-btn { border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; padding: 4px; border-radius: 6px; }
.palette-btn:hover { color: var(--accent); }

/* 汉堡按钮（移动端） */
.nav-toggle { display: none; flex-direction: column; gap: 4px; border: 0; background: transparent; padding: 6px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 1px; }

/* ---- 配色切换面板 ---- */
.palette-mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 200; opacity: 0; visibility: hidden; transition: .2s; }
.palette-mask.show { opacity: 1; visibility: visible; }
.palette-dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9);
  background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 12px;
  z-index: 201; width: 320px; max-width: 90vw; padding: 20px;
  opacity: 0; visibility: hidden; transition: .2s;
}
.palette-dialog.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.palette-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-weight: 600; color: var(--heading); }
.palette-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.palette-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.palette-opt { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }
.palette-opt:hover { border-color: var(--accent); }
.palette-swatch { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); }

/* ---- 侧滑抽屉（移动端） ---- */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300; opacity: 0; visibility: hidden; transition: .25s; }
.drawer-mask.show { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px; max-width: 80vw;
  background: var(--surface); z-index: 301; transform: translateX(-100%); transition: .25s;
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.drawer-title { font-weight: 700; color: var(--heading); }
.drawer-close { border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.drawer-search { padding: 14px 16px; }
.drawer-search form { display: flex; gap: 8px; }
.drawer-search input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); background: var(--field-bg); border-radius: 6px; padding: 8px 10px; color: var(--text); font-size: 14px; outline: none; }
.drawer-search button { flex: 0 0 auto; border: 0; background: var(--button-bg); color: var(--button-text); border-radius: 6px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav a { padding: 12px 20px; color: var(--text); font-size: 15px; border-bottom: 1px solid var(--soft); }
.drawer-nav a:hover { color: var(--accent); background: var(--surface-tint); }

/* ---- 面包屑 ---- */
.crumb { font-size: 13px; color: var(--subtle); margin: 18px 0 0; padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

/* ---- 区块标题 ---- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid var(--heading-rule); padding-bottom: 8px; }
.section-title .title { font-size: 18px; font-weight: 700; color: var(--heading); letter-spacing: 1px; }
.section-title .more { font-size: 13px; color: var(--muted); }
.section-title .more:hover { color: var(--accent); }

/* ---- 文章列表卡片（保留缩略图） ---- */
.list-flow { display: flex; flex-direction: column; gap: 18px; }
.list-card {
  display: flex; gap: 18px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--card-shadow);
  transition: border-color .2s, transform .2s;
}
.list-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.list-card .thumb { flex: 0 0 170px; height: 110px; overflow: hidden; border-radius: 6px; align-self: center; }
.list-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-card .heading { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.list-card .heading a { color: var(--heading); overflow-wrap: break-word; word-break: break-word; }
.list-card .heading a:hover { color: var(--accent); }
.list-card .desc {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 10px; overflow-wrap: break-word; word-break: break-word;
}
.list-card .meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--subtle); margin-top: auto; overflow-wrap: break-word; }
.list-card .meta .tag { color: var(--accent); border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; }
.list-card .meta .tag:hover { background: var(--surface-tint); }

/* ---- 分页 ---- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 8px; }
.pagination a,
.pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  font-size: 14px; line-height: 1;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
  box-sizing: border-box;
}
.pagination a:hover { color: var(--accent); border-color: var(--accent); background: var(--surface-elevated); transform: translateY(-1px); }
.pagination span.active { color: var(--button-text); background: var(--accent); border-color: var(--accent); font-weight: 600; cursor: default; }
.pagination a[href=""] { pointer-events: none; opacity: .45; }

/* ---- 封面占位（无图时的文字封面） ---- */
.cover { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--surface-tint); color: var(--muted); overflow: hidden; padding: 8px; }
.cover .cover-icon { font-size: 26px; font-weight: 700; color: var(--accent); }
.cover .cover-name { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 侧栏 ---- */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 20px; box-shadow: var(--card-shadow); }
.widget-hd { border-bottom: 1px solid var(--heading-rule); padding-bottom: 8px; margin-bottom: 12px; }
.widget-hd h3 { font-size: 15px; font-weight: 700; color: var(--heading); letter-spacing: 1px; }
.site-info { display: flex; flex-direction: column; gap: 9px; }
.site-info .site-owner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 3px; border-bottom: 1px dashed var(--line); }
.site-owner .si-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); box-shadow: var(--card-shadow); }
.site-owner .si-slogan { font-size: 13px; color: var(--muted); text-align: center; letter-spacing: 1px; }
.site-info-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.site-info-row .si-label { color: var(--muted); flex: 0 0 auto; }
.site-info-row .si-value { color: var(--text); font-weight: 600; text-align: right; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.rank-item .num { flex: 0 0 20px; text-align: center; font-style: italic; color: var(--accent); font-weight: 700; }
.rank-item a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: break-word; }
.rank-item a:hover { color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 10px; }
.tag-cloud a:hover { color: var(--accent); border-color: var(--accent); }

/* 标签云（全部标签页）：字号按文章数分档 */
.tag-cloud-all { align-items: center; padding: 8px 0; }
.tag-cloud-all a { position: relative; display: inline-flex; align-items: center; gap: 4px; transition: color .15s, border-color .15s; }
.tag-cloud-all a em {
  font-style: normal; font-size: 11px; color: var(--subtle);
  background: var(--surface-tint); border-radius: 8px; padding: 0 5px; line-height: 1.4;
}
.tag-cloud-all a:hover em { color: var(--accent); }
/* 五档字号：lv1 最小，lv5 最大 */
.tag-cloud-all a.tag-lv1 { font-size: 12px; }
.tag-cloud-all a.tag-lv2 { font-size: 13px; }
.tag-cloud-all a.tag-lv3 { font-size: 15px; }
.tag-cloud-all a.tag-lv4 { font-size: 17px; }
.tag-cloud-all a.tag-lv5 { font-size: 19px; font-weight: 600; }

/* ---- 分页 ---- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0; }
.pager a, .pager span { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 14px; background: var(--surface); }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: var(--button-bg); color: var(--button-text); border-color: var(--button-bg); }

/* ---- 文章内容页 ---- */
.article-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; box-shadow: var(--card-shadow); margin-bottom: 18px; }
.article-body .title { font-size: 26px; font-weight: 700; color: var(--heading); line-height: 1.4; margin-bottom: 14px; }
.article-body .info { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--subtle); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.article-body .content { font-size: 16px; line-height: 2; color: var(--text); overflow-wrap: break-word; word-break: break-word; }
.article-body .content * { white-space: normal !important; text-wrap-mode: wrap !important; }
.article-body .content p { margin: 0 0 16px; }
.article-body .content h2, .article-body .content h3, .article-body .content h4 { color: var(--heading); margin: 24px 0 12px; line-height: 1.5; }
.article-body .content img { border-radius: 6px; display: block; margin: 12px auto; }
.article-body .content a { color: var(--link); border-bottom: 1px solid var(--soft); }
.article-body .content blockquote { border-left: 3px solid var(--accent); padding: 6px 16px; margin: 16px 0; color: var(--muted); background: var(--surface-tint); border-radius: 0 6px 6px 0; }
.article-body .content ul, .article-body .content ol { margin: 0 0 16px 24px; }
.article-body .content table { border-collapse: collapse; margin: 16px 0; width: 100%; }
.article-body .content th, .article-body .content td { border: 1px solid var(--line); padding: 8px 12px; }

/* 行内代码 */
.article-body .content code { font-family: Consolas, Monaco, monospace; font-size: 0.9em; background: var(--surface-tint); color: var(--accent); padding: 2px 6px; border-radius: 4px; }

/* 代码块（macOS 深色风格） */
.code-block { margin: 18px 0; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.code-bar { display: flex; align-items: center; height: 38px; padding: 0 14px; background: #2d2d3a; position: relative; }
.code-dots { display: flex; gap: 6px; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.r { background: #ff5f56; }
.code-dot.y { background: #ffbd2e; }
.code-dot.g { background: #27c93f; }
.cb-lang { position: absolute; left: 50%; transform: translateX(-50%); color: #9a9ab0; font-size: 12px; font-family: Consolas, Monaco, monospace; letter-spacing: 1px; }
.code-copy {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,.18); background: transparent;
  color: #9a9ab0; border-radius: 6px; padding: 3px 10px;
  font-size: 12px; line-height: 1.5; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.code-copy:hover { color: #e8e8f0; border-color: rgba(255,255,255,.4); }
.code-copy.copied { color: #27c93f; border-color: #27c93f; }
.code-body { margin: 0; }
.code-body pre { margin: 0; padding: 16px 18px; background: #1e1e2a; color: #e8e8f0; font-family: Consolas, Monaco, "Courier New", monospace; font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: pre !important; text-wrap-mode: nowrap !important; }
.code-body pre::-webkit-scrollbar { height: 8px; }
.code-body pre::-webkit-scrollbar-thumb { background: #3a3a4a; border-radius: 4px; }
.code-body pre::-webkit-scrollbar-track { background: #1e1e2a; }

/* ---- 点赞/分享 ---- */
.action-box { text-align: center; }
.action-tip { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.action-btns { display: flex; justify-content: center; gap: 16px; }
.act-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-elevated); color: var(--text); border-radius: 20px; padding: 8px 20px; font-size: 15px; transition: .15s; }
.act-btn:hover { border-color: var(--accent); color: var(--accent); }
.act-btn.liked { color: var(--accent); border-color: var(--accent); }
.act-num { font-size: 14px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.action-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-elevated); color: var(--text); border-radius: 20px; padding: 7px 16px; font-size: 14px; transition: .15s; }
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn .count { font-size: 13px; }
.action-btn.liked { color: var(--accent); border-color: var(--accent); }

/* ---- 上一篇/下一篇 ---- */
.prevnext { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; margin-top: 18px; }
.prevnext > span { flex: 1; min-width: 0; display: flex; }
.prevnext > span.next { justify-content: flex-end; }
.prevnext a { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; color: var(--text); overflow-wrap: break-word; word-break: break-word; }
.prevnext a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- 软件页 ---- */
.soft-head { display: flex; gap: 18px; align-items: flex-start; }
.soft-icon { flex: 0 0 72px; height: 72px; border-radius: 12px; background: var(--surface-tint); display: flex; align-items: center; justify-content: center; font-size: 36px; border: 1px solid var(--line); }
.soft-meta { flex: 1; min-width: 0; }
.soft-meta h1 { font-size: 22px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.soft-meta .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.soft-meta .tags span { font-size: 12px; color: var(--accent); border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; }
.soft-meta .desc { font-size: 14px; color: var(--muted); line-height: 1.7; overflow-wrap: break-word; }
.soft-attr { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.soft-attr .attr { font-size: 14px; }
.soft-attr .attr b { display: block; font-weight: 600; color: var(--heading); margin-bottom: 2px; }
.soft-attr .attr span { color: var(--muted); }
.dl-wrap { padding: 0 0 8px; }
.dl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); }
.dl-item:last-child { border-bottom: 0; }
.dl-name { font-size: 14px; color: var(--text); overflow-wrap: break-word; }
.dl-btn { flex-shrink: 0; background: var(--button-bg); color: var(--button-text); border-radius: 6px; padding: 6px 16px; font-size: 14px; }
.dl-btn:hover { background: var(--accent-hover); color: var(--button-text); }
.soft-list { display: flex; flex-direction: column; gap: 18px; }
.soft-card { display: flex; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--card-shadow); }
.soft-card .thumb { flex: 0 0 120px; height: 90px; overflow: hidden; border-radius: 6px; }
.soft-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.soft-card .info { flex: 1; min-width: 0; }
.soft-card .heading { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.soft-card .heading a { color: var(--heading); }
.soft-card .heading a:hover { color: var(--accent); }
.soft-card .desc { font-size: 14px; color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; overflow-wrap: break-word; }
.soft-card .meta { font-size: 12.5px; color: var(--subtle); }

/* 下载按钮 */
.download-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--button-bg); color: var(--button-text); border-radius: 6px; padding: 10px 22px; font-size: 15px; font-weight: 600; margin-top: 14px; }
.download-btn:hover { background: var(--accent-hover); color: var(--button-text); }
.download-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.download-links a { border: 1px solid var(--line); background: var(--surface-elevated); border-radius: 6px; padding: 8px 16px; font-size: 14px; color: var(--text); }
.download-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 页脚 ---- */
.footer { margin-top: 40px; padding: 30px 0 36px; background: var(--surface-tint); border-top: 1px solid var(--line); text-align: center; }
.footer-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: 14px; padding: 0 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-links .dot { color: var(--line); }
.copyright { font-size: 13px; color: var(--subtle); }
.copyright a { color: var(--subtle); }
.copyright a:hover { color: var(--accent); }
.disclaimer { font-size: 12px; color: var(--subtle); margin-top: 8px; opacity: .8; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side-col { display: none; }
  .nav { display: none; }
  .search-form { display: none; }
  .nav-toggle { display: flex; }
  .logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .header-actions { margin-left: auto; }
  .article-box { padding: 20px; }
  .article-title { font-size: 22px; }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .list-card { gap: 12px; padding: 14px; }
  .list-card .thumb { flex: 0 0 110px; height: 78px; align-self: center; }
  .list-card .heading { font-size: 15px; }
  .list-card .desc { font-size: 13px; -webkit-line-clamp: 2; }
  .list-card .meta { gap: 10px; font-size: 12px; }
  .soft-card .thumb { flex: 0 0 90px; height: 70px; }
  .article-box { padding: 16px; }
  .article-title { font-size: 20px; }
  .article-body .content { font-size: 15px; }
  .prevnext { flex-direction: column; }
  .pagination { gap: 5px; margin: 18px 0 6px; }
  .pagination a,
  .pagination span {
    min-width: 30px; height: 30px; padding: 0 8px;
    font-size: 13px; border-radius: 5px;
  }
  /* 手机端翻页按钮改用短符号，避免"上一页/下一页"文字过宽导致换行错位 */
  .pagination a:first-child,
  .pagination a:last-child {
    min-width: 30px; width: 30px; padding: 0;
    font-size: 0; overflow: hidden;
  }
  .pagination a:first-child::before { content: "‹"; font-size: 18px; line-height: 1; }
  .pagination a:last-child::before { content: "›"; font-size: 18px; line-height: 1; }
}

/* ===== 会员用户入口 ===== */
.user-entry { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 4px; }
.user-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--heading); border: 1px solid var(--line); white-space: nowrap; transition: .2s; }
.user-btn:hover { border-color: var(--accent); color: var(--accent); }
.user-reg { background: var(--accent); color: #fff; border-color: var(--accent); }
.user-reg:hover { color: #fff; opacity: .88; }
.user-loggedin { color: var(--accent); border-color: var(--accent); }

/* ===== 付费下载区样式 ===== */
.download-section { display: none; }
.download-section:not(:empty) { display: block; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff !important; border-radius: 24px; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: .2s; }
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.18); color: #fff !important; }

.download-box { margin: 4px 0 0; padding: 20px 22px; background: var(--surface-tint); border: 1px solid var(--line); border-radius: 12px; }
.download-hd { font-size: 16px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.download-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.download-item:last-of-type { border-bottom: none; }
.dl-label { flex-shrink: 0; color: var(--muted); min-width: 72px; }
.dl-link { color: var(--accent); word-break: break-all; font-weight: 600; }
.dl-pwd { color: var(--heading); font-weight: 700; letter-spacing: 1px; }
.dl-vip-tip { margin-top: 12px; font-size: 12px; color: var(--muted); background: var(--bg); padding: 8px 12px; border-radius: 8px; }
.dl-vip-tip b { color: var(--accent); }
.dl-message { font-size: 14px; color: var(--heading); line-height: 1.7; margin-bottom: 14px; }
.dl-message b { color: var(--accent); }
.dl-error { font-size: 13px; color: #c62828; margin-bottom: 12px; }
.dl-login { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-login input { flex: 1; min-width: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--text); }
.dl-login button { padding: 10px 22px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.dl-login button:hover { background: var(--accent-hover); }
.dl-links { margin-top: 12px; font-size: 14px; }
.dl-links a { color: var(--accent); text-decoration: none; }
.dl-upgrade { display: inline-block; padding: 9px 22px; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff !important; border-radius: 20px; font-weight: 600; }
@media (max-width: 600px) {
  .user-entry .user-btn { font-size: 12px; padding: 5px 10px; }
  /* 登录后用户胶囊整体缩小，避免挤占导航栏 */
  .user-entry .user-menu .user-loggedin { font-size: 12px; padding: 4px 9px; gap: 3px; border-radius: 14px; }
  .user-entry .user-rank { font-size: 9px; padding: 2px 4px; }
  .user-entry .user-caret { font-size: 9px; }
  .user-dropdown { min-width: 140px; }
}

/* ===== 用户等级徽章 ===== */
.user-rank { display: inline-block; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 4px; font-weight: 700; vertical-align: middle; }
.rank-vip { background: #f6c344; color: #6b4a00; }
.user-btn { cursor: pointer; }

/* ===== 登录后用户下拉菜单 ===== */
.user-menu { position: relative; }
.user-menu .user-loggedin { cursor: pointer; background: transparent; }
.user-caret { font-size: 10px; margin-left: 2px; opacity: .7; transition: transform .2s; }
.user-menu.open .user-caret { transform: rotate(180deg); }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16); z-index: 9999; overflow: hidden;
}
.user-menu.open .user-dropdown { display: block; }
.ud-head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-tint); }
.ud-head b { display: block; font-size: 14px; color: var(--heading); }
.ud-head span { display: inline-block; margin-top: 3px; font-size: 11px; color: var(--accent); background: var(--bg); padding: 2px 7px; border-radius: 4px; }
.ud-item { display: block; padding: 10px 16px; font-size: 13px; color: var(--heading); text-decoration: none; transition: .15s; }
.ud-item:hover { background: var(--surface-tint); color: var(--accent); }
.ud-item.ud-logout { color: #c62828; }
.ud-item.ud-logout:hover { color: #c62828; }

/* ===== 登录/注册弹窗 ===== */
.auth-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10000; opacity: 0; transition: opacity .2s; }
.auth-mask.show { opacity: 1; }
.auth-dialog {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -48%) scale(.96);
  width: 380px; max-width: 92vw; max-height: 86vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 26px; z-index: 10001; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.auth-dialog.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.auth-close { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.auth-close:hover { color: var(--heading); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 10px 0; font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: .2s; }
.auth-tab.active { color: var(--heading); border-bottom-color: var(--accent); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.auth-field input { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--text); outline: none; transition: border-color .2s; }
.auth-field input:focus { border-color: var(--accent); }
.auth-opt { font-size: 12px; color: var(--subtle); }
.auth-wechat { margin: -4px 0 14px; padding: 9px 12px; background: #f0f7eb; border: 1px solid #d3e6c8; border-radius: 8px; font-size: 13px; color: #2f6b1f; }
.auth-wechat b { font-weight: 700; color: #1b5e20; }
.auth-submit { display: block; width: 100%; padding: 12px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; }
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-err { display: none; background: #fdecea; color: #c62828; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.auth-page-card { max-width: 420px; margin: 40px auto; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.auth-page-hd { margin: 0 0 6px; font-size: 22px; color: var(--heading); }
.auth-page-sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.auth-page-switch { margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-page-switch a { color: var(--accent); font-weight: 600; }

/* ===== 会员中心 ===== */
.member-page { max-width: 640px; margin: 32px auto; padding: 0 16px; }
.member-center { display: flex; flex-direction: column; gap: 16px; }
.mcard { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.mcard-info-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.m-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-basic { flex: 1; min-width: 0; }
.m-name { font-size: 18px; font-weight: 700; color: var(--heading); }
.m-user { font-size: 13px; color: var(--muted); margin-top: 4px; }
.m-rank { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 14px; flex-shrink: 0; }
.m-rank.rank-normal { background: var(--surface-tint); color: var(--muted); }
.m-rank.rank-vip { background: #f6c344; color: #6b4a00; }
.m-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.m-meta-item { display: flex; flex-direction: column; gap: 4px; }
.m-meta-item .k { font-size: 12px; color: var(--subtle); }
.m-meta-item .v { font-size: 14px; color: var(--heading); font-weight: 600; }
.mcard-hd { margin: 0 0 16px; font-size: 16px; color: var(--heading); }
.mpwd-form .mpwd-row { margin-bottom: 12px; }
.mpwd-row { margin-bottom: 14px; }
.mpwd-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mpwd-row input { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--text); outline: none; }
.mpwd-row input:focus { border-color: var(--accent); }
.m-ok { background: #e6f4ea; color: #1e7e34; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.m-err { background: #fdecea; color: #c62828; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.m-perm-deny { color: #c62828; font-weight: 700; }
.mcard-actions .btn-outline { display: block; width: 100%; box-sizing: border-box; padding: 11px; text-align: center; border: 1px solid var(--line); border-radius: 8px; color: var(--heading); font-size: 14px; font-weight: 600; transition: .2s; }
.mcard-actions .btn-outline:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) {
  .m-meta { grid-template-columns: 1fr; }
  .auth-dialog { padding: 22px 18px; }
}

/* ===== 会员升级页 ===== */
.upgrade-page { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }
.up-head { text-align: center; margin-bottom: 24px; padding-top: 12px; }
.up-title { margin: 0 0 6px; font-size: 24px; color: var(--heading); }
.up-sub { margin: 0; font-size: 14px; color: var(--muted); }
.up-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.up-card {
  position: relative; background: var(--surface-elevated); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 22px; transition: transform .2s, box-shadow .2s;
}
.up-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.up-card-hot { border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.10); }
.up-hot-ribbon {
  position: absolute; top: -11px; right: 18px; background: linear-gradient(135deg, #e2504c, #c0392b);
  color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 12px; letter-spacing: 1px;
}
.up-card-tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  background: var(--accent); color: #fff; letter-spacing: 1px; margin-bottom: 10px;
}
.up-tag-vip { background: #f6c344; color: #6b4a00; }
.up-card-name { font-size: 17px; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.up-card-price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 16px; }
.up-rmb { font-size: 18px; font-weight: 700; color: var(--heading); }
.up-num { font-size: 42px; font-weight: 800; color: var(--heading); line-height: 1; }
.up-unit { font-size: 13px; color: var(--muted); margin-left: 4px; }
.up-perks { list-style: none; margin: 0; padding: 0; }
.up-perks li { position: relative; padding-left: 20px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.up-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.up-card-hot .up-perks li::before { color: #e2504c; }

.up-pay { background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; margin-bottom: 20px; text-align: center; }
.up-pay-hd { font-size: 17px; font-weight: 700; color: var(--heading); }
.up-pay-sub { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.up-qr-wrap { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.up-qr-item { text-align: center; }
.up-qr-img { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: block; object-fit: cover; }
.up-qr-miss { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; background: var(--bg); }
.up-qr-label { margin-top: 10px; font-size: 13px; color: var(--heading); }
.up-qr-label b { display: block; font-size: 14px; }
.up-qr-label span { font-size: 13px; color: var(--accent); font-weight: 700; }

.up-note { background: var(--surface-tint); border: 1px dashed var(--line); border-radius: 14px; padding: 20px 22px; }
.up-note-hd { font-size: 15px; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.up-steps { margin: 0; padding-left: 20px; }
.up-steps li { font-size: 13px; color: var(--text); line-height: 1.9; margin-bottom: 6px; }
.up-steps b { color: var(--heading); }
.up-mail { color: var(--accent); font-weight: 700; }
@media (max-width: 600px) {
  .up-cards { grid-template-columns: 1fr; }
  .up-qr-wrap { gap: 24px; }
  .up-qr-img { width: 150px; height: 150px; }
}

/* ===== 下载区美化（覆盖旧样式）===== */
/* 静态页里的下载 CTA 按钮 */
.download-cta { text-align: center; padding: 26px 20px; }
.dl-cta-tip { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 32px; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff !important; border-radius: 26px; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.16); transition: transform .2s, box-shadow .2s;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); color: #fff !important; }
.dl-btn-icon { font-size: 18px; }

/* ===== 下载卡片（动态下载页专用，精致版）===== */
.download-card {
  margin: 0; background: var(--surface-elevated);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(0,0,0,.10);
}
.dc-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
}
.dc-badge {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.dc-head-txt { flex: 1; min-width: 0; }
.dc-title { font-size: 17px; font-weight: 700; color: var(--heading); line-height: 1.3; }
.dc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tag {
  flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 14px; letter-spacing: .5px;
}
.dc-tag-ok { background: #2e7d32; color: #fff; }
.dc-body { padding: 18px 22px 22px; }
.dc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.dc-row:last-of-type { border-bottom: none; }
.dc-label {
  flex-shrink: 0; color: var(--muted); min-width: 72px; font-size: 13px;
  padding-top: 6px; display: flex; align-items: center; gap: 5px;
}
.dc-value { flex: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.dc-link {
  flex: 1; color: var(--accent); word-break: break-word; overflow-wrap: anywhere; font-weight: 600;
  font-size: 14px; line-height: 1.5; text-decoration: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dc-link:hover { text-decoration: underline; }
.dc-pwd {
  flex: 1; color: var(--heading); font-weight: 700; letter-spacing: 1px; font-size: 15px;
  line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg); padding: 6px 12px; border-radius: 8px; border: 1px dashed var(--line);
}
.dl-copy {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg);
  color: var(--muted); cursor: pointer; transition: .2s;
}
.dl-copy:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-tint); }
.dl-copy.copied { border-color: var(--accent); color: #fff; background: var(--accent); }
.dc-go {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 18px; padding: 13px; font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff !important; border-radius: 24px; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.16); transition: transform .2s, box-shadow .2s;
}
.dc-go:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); color: #fff !important; }
.dc-quota, .dl-quota { margin-top: 16px; background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.dc-quota-label, .dl-quota-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.dc-quota-label span, .dl-quota-label span { font-weight: 700; color: var(--accent); }
.dc-quota-bar, .dl-quota-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.dc-quota-bar i, .dl-quota-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 3px; transition: width .4s; }

/* 未登录 / 需升级 / 额度用完 的锁定态卡片 */
.download-card-lock { text-align: center; padding: 36px 24px 32px; }
.dc-lock-icon {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--surface-tint); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 34px;
}
.dc-center { text-align: center; }
.dc-lock-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 10px auto 22px; max-width: 360px; }
.dc-lock-desc b { color: var(--accent); }
.dc-lock-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.dc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 28px; font-size: 15px; font-weight: 700; border-radius: 24px;
  text-decoration: none; cursor: pointer; transition: .2s;
}
.dc-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; border: none; box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.dc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); color: #fff; }
.dc-btn-ghost {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.dc-btn-ghost:hover { background: var(--surface-tint); }
.dc-lock-note { margin-top: 20px; font-size: 12px; color: var(--muted); opacity: .8; }

/* ===== 专用下载页（view_download.htm）===== */
.download-only-page { max-width: 860px; margin: 0 auto; padding: 8px 0 40px; }
.dop-head { text-align: center; margin-bottom: 20px; padding: 20px 16px 16px; }
.dop-title { font-size: 22px; font-weight: 700; color: var(--heading); margin: 0 0 8px; line-height: 1.4; }
.dop-sub { font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.dop-back { text-align: center; margin-top: 22px; }
.dop-back a { color: var(--muted); font-size: 14px; text-decoration: none; transition: .2s; }
.dop-back a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .dc-row { flex-direction: column; gap: 8px; }
  .dc-label { padding-top: 0; }
  .dc-value { width: 100%; }
  .dc-go { font-size: 14px; }
}

/* ===== 主流软件图标（侧栏顶部）===== */
.soft-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 10px; justify-items: center; }
.soft-item { display: flex; justify-content: center; text-decoration: none; }
.soft-ico {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  width: 40px; height: 40px; max-width: 40px; max-height: 40px;
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  line-height: 1; text-align: center;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.soft-item:hover .soft-ico { transform: translateY(-2px) scale(1.06); box-shadow: 0 5px 12px rgba(0,0,0,.2); }
