/* GM0000 公开站 · 手写样式（无框架）
   主题：:root = 亮色；[data-theme=dark] 或系统暗色时切换变量。
   HTML 输出与主题无关，首帧由 base.html 里的 nonce 脚本设置 data-theme。 */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg2: #ffffff;
  --card: #ffffff;
  --line: #e5e8ee;
  --line2: #eef0f4;
  --fg: #1a2030;
  --fg2: #3d4759;
  --muted: #6b7280;
  --acc: #1f6feb;
  --acc-weak: #eaf1fe;
  --ok: #15803d;
  --ok-weak: #e9f7ee;
  --warn: #b45309;
  --warn-weak: #fff5e6;
  --bad: #d1242f;
  --bad-weak: #fdecec;
  --chip: #f1f4f9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .04);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d11;
  --bg2: #12151c;
  --card: #151a22;
  --line: #232a36;
  --line2: #1b212c;
  --fg: #e6e9ef;
  --fg2: #c2c9d6;
  --muted: #8b93a3;
  --acc: #4f9dff;
  --acc-weak: #16283f;
  --ok: #35c07f;
  --ok-weak: #12271d;
  --warn: #e0a02f;
  --warn-weak: #2b2213;
  --bad: #e2564a;
  --bad-weak: #33191a;
  --chip: #1b212c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d11;
    --bg2: #12151c;
    --card: #151a22;
    --line: #232a36;
    --line2: #1b212c;
    --fg: #e6e9ef;
    --fg2: #c2c9d6;
    --muted: #8b93a3;
    --acc: #4f9dff;
    --acc-weak: #16283f;
    --ok: #35c07f;
    --ok-weak: #12271d;
    --warn: #e0a02f;
    --warn-weak: #2b2213;
    --bad: #e2564a;
    --bad-weak: #33191a;
    --chip: #1b212c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 56px; }

/* ---------------- 顶栏 ---------------- */
.hdr {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 10px;
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #2f8bff, #6d5bff);
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center; letter-spacing: .5px;
}
.logo-text { font-weight: 700; font-size: 16px; white-space: nowrap; }

.search { display: flex; flex: 1 1 320px; min-width: 200px; }
.search input {
  flex: 1; min-width: 0;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--card); color: var(--fg); font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--acc); }
.search button {
  height: 38px; padding: 0 16px; border: 1px solid var(--acc); border-radius: 0 10px 10px 0;
  background: var(--acc); color: #fff; font-size: 14px; cursor: pointer;
}
.search.big { margin: 18px 0; max-width: 520px; }

.theme-btn {
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--fg2); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.theme-btn:hover { border-color: var(--acc); color: var(--acc); }

.userbar { display: flex; gap: 8px; align-items: center; }
.userbar .who { font-size: 13px; color: var(--fg2); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbar .coin { font-size: 13px; color: var(--warn); background: var(--warn-weak); padding: 2px 8px; border-radius: 999px; }

/* ---------------- 分类导航（筛选条） ---------------- */
.catnav {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 4px 0 12px;
}
.catnav a {
  flex: none; padding: 6px 12px; border-radius: 999px;
  color: var(--fg2); font-size: 13px; background: var(--card);
  border: 1px solid var(--line); white-space: nowrap;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.catnav a:hover { color: var(--acc); border-color: var(--acc); text-decoration: none; }
.catnav a.on { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; }
.catnav a.on:hover { color: #fff; }
.catnav .catnav-all {
  margin-left: auto; padding: 6px 4px;
  border-color: transparent; background: transparent;
  color: var(--muted); font-size: 12.5px;
}
.catnav .catnav-all:hover { color: var(--acc); background: transparent; border-color: transparent; }

/* ---------------- 通用元件 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--acc); background: var(--acc); color: #fff;
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--fg2); border-color: var(--line); }
.btn.ghost:hover { color: var(--acc); border-color: var(--acc); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .6; cursor: default; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--line); color: var(--fg2); background: var(--chip);
  white-space: nowrap;
}
.badge.type { color: var(--acc); background: var(--acc-weak); border-color: transparent; }
.badge.genre { color: var(--warn); background: var(--warn-weak); border-color: transparent; }
.badge.engine { color: var(--ok); background: var(--ok-weak); border-color: transparent; }
.badge.ver { font-family: var(--mono); font-size: 11px; }

.pill { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--fg2); }
.pill.ok { color: var(--ok); background: var(--ok-weak); }
.pill.dim { color: var(--muted); }

.dim { color: var(--muted); }
.ok { color: var(--ok); }
.lead { color: var(--fg2); margin-top: 8px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.more { font-size: 13px; }

/* ---------------- 面包屑 ---------------- */
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 2px 12px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--acc); }
.crumbs .sep { color: var(--line); }
.crumbs .cur { color: var(--fg2); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 首页 hero ---------------- */
.hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px; }
.hero h1 { font-size: 24px; }
.hero-main { flex: 1 1 480px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(80px, 1fr)); gap: 12px 18px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 12px; color: var(--muted); }

.block { margin: 22px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.block-head h2 { font-size: 17px; }

.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.term {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--fg);
}
.term:hover { border-color: var(--acc); text-decoration: none; }
.term b { font-size: 14px; }
.term span { font-size: 12px; color: var(--muted); }

/* ---------------- 列表（list view） ---------------- */
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.list-head h1 { font-size: 22px; }
.list-side { display: flex; gap: 20px; }
.list-side .stat { display: flex; flex-direction: column; align-items: flex-end; }
.list-side b { font-size: 20px; font-variant-numeric: tabular-nums; }
.list-side span { font-size: 12px; color: var(--muted); }

.sortbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 2px 2px 12px; font-size: 13px; }
.sortbar a { padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; color: var(--fg2); }
.sortbar a:hover { border-color: var(--line); text-decoration: none; }
.sortbar a.on { background: var(--acc-weak); color: var(--acc); border-color: transparent; }
.sortbar .sortbar-sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }

.rows { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: grid; grid-template-columns: 168px 1fr auto; gap: 14px;
  align-items: center; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.row:hover { border-color: var(--acc); box-shadow: var(--shadow); }
.row-thumb {
  width: 168px; height: 105px; border-radius: 8px; overflow: hidden;
  background: var(--chip); display: block;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-thumb-empty { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.row-title { font-size: 15px; font-weight: 650; line-height: 1.4; }
.row-title a {
  color: var(--fg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-title a:hover { color: var(--acc); text-decoration: none; }
.row-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.row-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 22px 0 4px; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--card); color: var(--fg2); font-size: 13px;
}
.pager a:hover { border-color: var(--acc); color: var(--acc); text-decoration: none; }
.pager a.on { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 700; }
.pager .gap { border: 0; background: transparent; color: var(--muted); }
.pager-info { border: 0; background: transparent; color: var(--muted); font-size: 12px; }

/* ---------------- 详情页 ---------------- */
.detail-head { padding: 18px 20px; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.detail h1 { font-size: 22px; line-height: 1.4; }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }
.detail-meta .tid { font-family: var(--mono); }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 16px; }

.links { display: flex; flex-direction: column; gap: 8px; }
.link-item {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid var(--line2); background: var(--bg2); border-radius: 9px;
  font-size: 13.5px;
}
.link-item .host {
  font-size: 11.5px; color: var(--acc); background: var(--acc-weak);
  padding: 1px 7px; border-radius: 6px; white-space: nowrap;
}
.link-item .host.dead { color: var(--bad); background: var(--bad-weak); text-decoration: line-through; }
.link-item .lbl { color: var(--muted); font-size: 12.5px; }
.link-url { word-break: break-all; }
.masked { color: var(--muted); letter-spacing: 2px; font-family: var(--mono); }
.copy {
  margin-left: auto; border: 1px solid var(--line); background: var(--warn-weak); color: var(--warn);
  border-radius: 7px; padding: 2px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.copy:hover { border-color: var(--warn); }

.paywall {
  margin-top: 14px; padding: 14px 16px; border-radius: 10px;
  background: var(--warn-weak); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.paywall-txt { font-size: 14px; color: var(--fg); }
.paywall .hint { flex-basis: 100%; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.shot { padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--chip); cursor: zoom-in; }
.shot:hover { border-color: var(--acc); }
.shot img { width: 100%; height: 100px; object-fit: cover; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th, .kv td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.kv th { width: 132px; color: var(--muted); font-weight: 500; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

.body { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; max-height: 520px; overflow: auto; }
.body pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font: 13.5px/1.8 var(--mono); color: var(--fg2);
}

.rel { display: flex; flex-direction: column; gap: 6px; }
.rel li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line2); }
.rel li:last-child { border-bottom: 0; }
.rel a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-meta { flex: none; font-size: 12px; color: var(--muted); }

.prevnext { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13.5px; }

.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 8, 12, .93);
  display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  user-select: none; -webkit-user-drag: none; }

.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 22, 28, .55); color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 26px; line-height: 1; cursor: pointer;
  padding: 0 0 4px;
  transition: background .15s ease, border-color .15s ease;
}
.lb-nav:hover { background: rgba(60, 64, 74, .85); border-color: rgba(255, 255, 255, .55); }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }
.lb-nav[hidden] { display: none; }

.lb-x {
  position: fixed; top: 16px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 22, 28, .55); color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 15px; cursor: pointer;
}
.lb-x:hover { background: rgba(60, 64, 74, .85); }

.lb-count {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: rgba(255, 255, 255, .82); font-size: 13px;
  font-variant-numeric: tabular-nums; letter-spacing: .5px;
  background: rgba(20, 22, 28, .5); padding: 3px 12px; border-radius: 999px;
}

/* ---------------- 静态页 / 404 ---------------- */
.prose h1 { font-size: 22px; margin-bottom: 10px; }
.prose h2 { font-size: 16px; margin: 20px 0 8px; }
.prose p, .prose li { color: var(--fg2); font-size: 14px; margin: 6px 0; }
.prose ul { list-style: disc; padding-left: 20px; }

.notfound { text-align: center; padding: 40px 20px; }
.notfound h1 { font-size: 26px; }
.notfound .nf-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.notfound .search.big { margin: 18px auto; }

/* ---------------- 页脚 ---------------- */
.ftr { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.ftr h4 { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; font-weight: 600; letter-spacing: .4px; }
.ftr h4.mt { margin-top: 18px; }

.ftr-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 32px;
  padding-bottom: 22px;
}
.ftr-brand .logo { padding: 0; }
.ftr-brand p { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.ftr-stats { display: flex; gap: 16px; margin-top: 12px; }
.ftr-stats span { color: var(--muted); font-size: 11.5px; display: flex; align-items: baseline; gap: 4px; }
.ftr-stats b { font-size: 15px; color: var(--fg2); font-variant-numeric: tabular-nums; }

.ftr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ftr-chips a {
  padding: 2px 9px; border-radius: 999px; line-height: 1.9;
  background: var(--chip); color: var(--fg2); font-size: 12px;
}
.ftr-chips a b { margin-left: 5px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.ftr-chips a:hover { background: var(--acc-weak); color: var(--acc); text-decoration: none; }
.ftr-chips a:hover b { color: var(--acc); }

.ftr-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ftr-links a { color: var(--fg2); font-size: 12.5px; }
.ftr-links a:hover { color: var(--acc); }
.ftr-about p { color: var(--muted); font-size: 12.5px; line-height: 1.8; margin: 0; }

.ftr-cloud { padding: 18px 0; border-top: 1px solid var(--line2); }
.ftr-cloud-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ftr-cloud-head span { color: var(--muted); font-size: 11.5px; }
.cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cloud a {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 3px 10px; border-radius: 8px;
  border: 1px solid var(--line2); color: var(--fg2); font-size: 12.5px;
}
.cloud a b { color: var(--muted); font-weight: 400; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cloud a:hover { border-color: var(--acc); color: var(--acc); text-decoration: none; }

.ftr-bar {
  padding-top: 14px; border-top: 1px solid var(--line2);
  color: var(--muted); font-size: 11.5px; text-align: center;
}

@media (max-width: 1000px) {
  .ftr-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ftr-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ftr-top { grid-template-columns: 1fr; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
}

@media (max-width: 860px) {
  .hero { padding: 18px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 12px 40px; }
  .logo-text { display: none; }
  .hdr { gap: 8px; }
  .search { order: 3; flex-basis: 100%; }
  .theme-btn { margin-left: auto; }
  .userbar .who, .userbar .coin { display: none; }
  .row { grid-template-columns: 96px 1fr; gap: 10px; padding: 9px; }
  .row-thumb { width: 96px; height: 62px; }
  .row-side { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; }
  .row-meta { gap: 8px; font-size: 11.5px; }
  .detail h1 { font-size: 18px; }
  .list-side { display: none; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hero-stats b { font-size: 16px; }
  .body { max-height: 380px; }
  .kv th { width: 96px; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .hdr, .catnav, .ftr, .sortbar, .pager, .paywall, .prevnext, .theme-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* ---------------- 轻提示 ---------------- */
.toast-box {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 120; pointer-events: none;
}
.toast {
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px;
  background: var(--fg); color: var(--bg); box-shadow: var(--shadow);
  opacity: 1; transition: opacity .35s ease, transform .35s ease;
}
.toast.ok { background: var(--ok); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ================= 小屏适配（放在最后，确保覆盖前面的同优先级规则） ================= */
@media (max-width: 900px) {
  /* 筛选条：横向滚动 + 右侧渐隐，避免被硬切 */
  .catnav {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-right: 26px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  .catnav::-webkit-scrollbar { display: none; }
  .catnav .catnav-all { margin-left: 0; }
}

@media (max-width: 640px) {
  /* 排序条：一行滚动，别折成两行；"排序"标签在小屏是多余的字 */
  .sortbar {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    padding-right: 22px;
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  }
  .sortbar::-webkit-scrollbar { display: none; }
  .sortbar > * { flex: none; }
  .sortbar > .dim { display: none; }
  .sortbar .sortbar-sep { display: none; }

  /* 灯箱按钮缩小贴边 */
  .lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .lb-nav.prev { left: 10px; }
  .lb-nav.next { right: 10px; }
  .lb-x { top: 12px; right: 12px; width: 32px; height: 32px; }
  .lb-count { bottom: 16px; }
}
