/* ============================================================
   NaviHub Theme - 导航 + 合集站
   共用样式：ZBlog 主题 与 静态预览 都引用这一份
   修改本文件，两边同时生效
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --text: #1c1e28;
  --text-soft: #5a5f72;
  --text-mute: #9096a8;
  --line: #e7e9f0;
  --brand: #5b5bd6;
  --brand-2: #7c6cf0;
  --brand-soft: #eeeefe;
  --shadow: 0 4px 24px rgba(28, 30, 40, .06);
  --shadow-hover: 0 12px 32px rgba(91, 91, 214, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1200px;
  --header-h: 64px;
}

html[data-theme="dark"] {
  --bg: #12131a;
  --bg-soft: #1a1c26;
  --surface: #1c1e29;
  --surface-2: #242634;
  --text: #eef0f6;
  --text-soft: #b3b8c9;
  --text-mute: #7d8396;
  --line: #2c2f3e;
  --brand: #8b8bf0;
  --brand-2: #a89bff;
  --brand-soft: #2a2a45;
  --shadow: 0 4px 24px rgba(0, 0, 0, .28);
  --shadow-hover: 0 12px 32px rgba(139, 139, 240, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }
::selection { background: var(--brand); color: #fff; }

/* ---------- 布局容器 ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%; display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: .2px; flex-shrink: 0; white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 91, 214, .35);
}
.brand-name { color: var(--text); font-weight: 800; font-size: 19px; }
.brand-sub { color: var(--text-mute); font-weight: 400; font-size: 12.5px; letter-spacing: 0; }
.brand-logo { height: 32px; width: 32px; object-fit: contain; flex-shrink: 0; }
.cn-red { color: #e02020 !important; font-weight: 900 !important; }
[data-theme="dark"] .cn-red { color: #ff5a5a !important; }
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-links a {
  padding: 7px 13px; border-radius: 8px; color: var(--text-soft);
  font-weight: 500; transition: .18s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { background: var(--brand-soft); color: var(--brand); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  display: grid; place-items: center; transition: .18s; flex-shrink: 0;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }
.mobile-toggle { display: none; }
/* 投稿按钮（醒目红色） */
.submit-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #f0453f, #d92f36);
  box-shadow: 0 4px 12px rgba(224, 68, 62, .3); text-decoration: none; transition: .18s;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(224, 68, 62, .42); color: #fff; }
.submit-btn svg { width: 15px; height: 15px; }

.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---------- Hero ---------- */
/* ---------- 首页动态涂鸦 Hero ---------- */
.hero-art {
  position: relative; overflow: hidden; text-align: center;
  padding: 46px 0 40px; margin-bottom: 8px;
  background: linear-gradient(125deg, #6a5cff 0%, #8a5cf6 30%, #d95fa8 62%, #ff8a5b 100%);
  background-size: 220% 220%;
  animation: heroFlow 12s ease-in-out infinite;
}
html[data-theme="dark"] .hero-art {
  background: linear-gradient(125deg, #3b2a7a 0%, #5b2d8e 32%, #8e3568 64%, #a85438 100%);
  background-size: 220% 220%;
}
@keyframes heroFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* 漂浮光斑 */
.hero-art .blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(6px); opacity: .5; mix-blend-mode: screen;
}
.blob-1 { width: 260px; height: 260px; left: 6%; top: -70px; background: radial-gradient(circle, #7ef9ff, transparent 68%); animation: float1 9s ease-in-out infinite; }
.blob-2 { width: 220px; height: 220px; right: 8%; bottom: -60px; background: radial-gradient(circle, #ffe27e, transparent 68%); animation: float2 11s ease-in-out infinite; }
.blob-3 { width: 180px; height: 180px; right: 26%; top: -40px; background: radial-gradient(circle, #ff9ecd, transparent 68%); animation: float1 13s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(26px,20px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-22px,-18px); } }

.hero-inner { position: relative; z-index: 2; }

/* 涂鸦标题：错位贴纸 + 马克笔涂鸦，现代街头风 */
.doodle-title {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 0; padding: 12px 14px 20px; isolation: isolate; margin: 0; font-size: inherit; font-weight: inherit;
}
.doodle {
  position: relative; display: inline-block; margin: 0 -6px;
  font-family: "Arial Black", "Impact", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 66px; font-weight: 900; line-height: 1; letter-spacing: -4px;
  color: #fff;
  -webkit-text-stroke: 2.5px rgba(22, 14, 48, .9);
  paint-order: stroke fill;
  text-shadow:
    0 2px 0 var(--sticker, #ff3d7f),
    4px 5px 0 rgba(22, 14, 48, .55),
    0 14px 22px rgba(22, 10, 48, .28);
  z-index: 2;
}
.doodle::before {
  content: ""; position: absolute; z-index: -1; inset: 4px -7px 0 -7px;
  background: var(--sticker, #ff3d7f);
  border-radius: 38% 62% 55% 45% / 52% 42% 58% 48%;
  transform: rotate(var(--rot, -6deg)) scale(1.02);
  opacity: .92;
  box-shadow: 0 7px 16px rgba(20, 10, 50, .24);
}
.doodle::after {
  content: ""; position: absolute; z-index: 3; top: -6px; right: -10px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px var(--sticker, #ff3d7f);
  opacity: .85;
}
.d1 { --sticker: #ff3d7f; --rot: -9deg; transform: rotate(-9deg) translateY(5px); }
.d2 { --sticker: #ffc93c; --rot: 6deg;  transform: rotate(6deg) translateY(-8px); }
.d3 { --sticker: #25d0c2; --rot: -6deg; transform: rotate(-6deg) translateY(3px); }
.d4 { --sticker: #8b5cf6; --rot: 10deg; transform: rotate(10deg) translateY(-5px); }
.doodle-line {
  position: absolute; left: 2%; right: 2%; bottom: -2px; width: 96%; height: 24px;
  color: #fff; opacity: .95; z-index: 4; overflow: visible;
}
.doodle-spark { position: absolute; z-index: 1; font-size: 22px; line-height: 1; color: #fff; opacity: .9; }
.doodle-spark.s1 { top: 0; left: -6px; transform: rotate(-18deg); }
.doodle-spark.s2 { bottom: 6px; right: -10px; transform: rotate(14deg); font-size: 15px; color: #ffd93d; }
.hero-tagline { margin: 30px 0 4px; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .5px; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.hero-domain { margin: 0 0 4px; color: rgba(255,255,255,.82); font-size: 13px; letter-spacing: 2px; }
.hero-search { max-width: 560px; margin: 20px auto 0; background: rgba(255,255,255,.96); border-color: transparent; }
html[data-theme="dark"] .hero-search { background: rgba(28,30,41,.94); }
.hero-art .hot-words a { background: rgba(255,255,255,.2); color: #fff; }
.hero-art .hot-words a:hover { background: rgba(255,255,255,.34); }
.hero-art .hot-words span { color: rgba(255,255,255,.9); }

@media (max-width: 780px) {
  .doodle { font-size: 48px; -webkit-text-stroke-width: 2px; margin: 0 -4px; letter-spacing: -3px; }
  .hero-art { padding: 38px 0 32px; }
  .hero-tagline { font-size: 14px; }
  .doodle-spark.s1 { left: 0; } .doodle-spark.s2 { right: 0; }
}
@media (max-width: 420px) { .doodle { font-size: 38px; } .doodle::before { inset: 3px -4px 0 -4px; } }

.hero { padding: 54px 0 30px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600; margin-bottom: 18px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero h1 { margin: 0 0 10px; font-size: 36px; line-height: 1.25; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--text-soft); font-size: 15px; }

.search-box {
  max-width: 620px; margin: 26px auto 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 7px 8px 7px 18px;
  box-shadow: var(--shadow); transition: .2s;
}
.search-box:focus-within { border-color: var(--brand); box-shadow: var(--shadow-hover); }
.search-box svg { width: 19px; height: 19px; color: var(--text-mute); flex-shrink: 0; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 15px; padding: 6px 0;
}
.search-box input::placeholder { color: var(--text-mute); }
.search-btn {
  border: 0; border-radius: 9px; padding: 9px 20px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.hot-words { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.hot-words span { color: var(--text-mute); font-size: 12px; }
.hot-words a { color: var(--text-soft); font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); }
.hot-words a:hover { color: var(--brand); }

/* ---------- 分类胶囊 ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 30px 0 8px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-soft); font-size: 13px; font-weight: 500; transition: .18s;
}
.cat-pill:hover { transform: translateY(-2px); border-color: var(--brand); }
.cat-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 5px 14px rgba(91,91,214,.28); }
.cat-pill .ico { font-size: 15px; }
.cat-pill .num { font-size: 11px; opacity: .7; }

/* ---------- 二级细分筛选（默认收起，点「细分筛选」展开） ---------- */
.sub-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 14px; margin-top: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.sub-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sub-group + .sub-group { padding-left: 12px; border-left: 1px solid var(--line); }
.sub-group-name { font-size: 11px; color: var(--text-mute); font-weight: 600; margin-right: 2px; white-space: nowrap; }
.sub-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-soft);
  font-size: 11.5px; transition: .18s; white-space: nowrap;
}
.sub-chip:hover { color: var(--brand); border-color: var(--brand); }
.sub-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sub-chip i { font-style: normal; font-size: 10px; opacity: .65; }
/* 细分展开 / 收起按钮 */
.sub-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 7px; cursor: pointer;
  border: 1px dashed var(--brand); background: transparent; color: var(--brand);
  font-size: 11.5px; font-weight: 600; transition: .18s; white-space: nowrap;
}
.sub-toggle:hover { background: var(--brand-soft); }
.sub-toggle-arrow { display: inline-block; transition: transform .2s; font-size: 13px; line-height: 1; }
.sub-toggle.open .sub-toggle-arrow { transform: rotate(180deg); }
/* 细分内容：收起时整块隐藏，展开时独立成一行 */
.sub-fold { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex-basis: 100%; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; font-size: 18px; font-weight: 600; }
.toolbar h2 small { color: var(--text-mute); font-weight: 400; font-size: 13px; margin-left: 6px; }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sort-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; transition: .18s;
}
.sort-btn:hover, .sort-btn.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
/* ---------- 卡片网格（默认统一网格，无视图切换） ---------- */
.grid { display: grid; grid-template-columns: repeat(var(--grid-cols, 5), 1fr); gap: 12px; align-items: stretch; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; cursor: pointer;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px;
  background: var(--cat-color, var(--brand)); opacity: 0; transition: .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
  background: var(--cat-soft, var(--brand-soft)); color: var(--cat-color, var(--brand)); overflow: hidden;
}
.card-icon img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.card-title {
  font-size: 13px; font-weight: 600; margin: 0 0 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px;
}
.card-title a { color: inherit; text-decoration: none; transition: color .18s; }
.card-title a:hover { color: var(--brand); }
.card-meta { font-size: 10px; color: var(--text-mute); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-meta .plat {
  background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text-soft);
}
.card-meta .sub-tag {
  background: var(--cat-soft, var(--brand-soft)); color: var(--cat-color, var(--brand));
  padding: 1px 5px; border-radius: 4px; font-weight: 600;
}
.card-meta .card-date { margin-left: auto; opacity: .75; font-variant-numeric: tabular-nums; }
.card-desc {
  color: var(--text-soft); font-size: 11.5px; line-height: 1.6; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
  min-height: 55px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-soft); text-decoration: none; transition: .18s; }
a.tag:hover { color: var(--brand); background: var(--brand-soft); }
.card-foot { display: flex; align-items: center; gap: 5px; padding-top: 9px; margin-top: auto; border-top: 1px solid var(--line); }
.card-foot .stat { font-size: 10px; color: var(--text-mute); display: flex; align-items: center; gap: 3px; }
.card-foot .stat svg { width: 12px; height: 12px; }
/* 点赞按钮靠右，其余操作跟随 */
.card-foot .like-btn { margin-left: auto; }
.card-foot .go-btn { margin-left: 0; }
.fav-btn {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-mute);
  cursor: pointer; display: grid; place-items: center; transition: .18s;
}
.fav-btn:hover, .fav-btn.on { color: #e0507a; border-color: #e0507a; background: #fdeef3; }
html[data-theme="dark"] .fav-btn.on { background: #3a2230; }
.fav-btn svg { width: 13px; height: 13px; }
.fav-btn.on svg { fill: currentColor; }
/* 点赞按钮 */
.like-btn {
  width: auto; min-width: 36px; height: 26px; padding: 0 6px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-mute);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 3px;
  transition: .18s;
}
.like-btn:hover, .like-btn.on { color: #e0742f; border-color: #e0742f; background: #fdf1e6; }
html[data-theme="dark"] .like-btn.on { background: #3a2c20; }
.like-btn svg { width: 13px; height: 13px; }
.like-btn.on svg { fill: currentColor; }
.like-count { font-size: 10px; font-weight: 600; }

.go-btn {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; transition: .18s;
}
.go-btn:hover { background: var(--brand); color: #fff; }
.go-btn svg { width: 13px; height: 13px; }
.card-meta .badge-hot {
  font-size: 9px; font-weight: 700; letter-spacing: .3px;
  padding: 1px 5px; border-radius: 4px; background: #ffe9e2; color: #e2603d;
  line-height: 1.5; flex-shrink: 0;
}
html[data-theme="dark"] .card-meta .badge-hot { background: #3a2620; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-mute); }
.empty .big { font-size: 46px; margin-bottom: 14px; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-mute); margin-bottom: 20px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty-btn { display: inline-flex; align-items: center; padding: 9px 20px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); cursor: pointer; transition: .18s; }
.empty-btn:hover { border-color: var(--brand); color: var(--brand); }
.empty-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.empty-btn.primary:hover { opacity: .9; color: #fff; }

/* ---------- 分区（首页板块） ---------- */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 19px; }
.section-head .line { flex: 1; height: 1px; background: var(--line); }
.section-head a { font-size: 12px; color: var(--brand); }

/* ---------- 侧栏统计 ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 30px; }
.stat-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; display: flex; align-items: center; gap: 13px;
}
.stat-box .si { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--brand-soft); }
.stat-box .sv { font-size: 21px; font-weight: 700; line-height: 1.1; }
.stat-box .sl { font-size: 11px; color: var(--text-mute); }

/* ---------- 详情弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 18, 28, .55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--surface); border-radius: 18px; width: min(560px, 100%);
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 70px rgba(0,0,0,.3);
  animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { padding: 26px 26px 0; display: flex; gap: 15px; }
.modal-head .card-icon { width: 56px; height: 56px; font-size: 27px; border-radius: 14px; }
.modal-head h3 { margin: 2px 0 5px; font-size: 20px; }
.modal-body { padding: 18px 26px 26px; }
.modal-body .desc { color: var(--text-soft); line-height: 1.75; margin: 0 0 18px; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.info-item { background: var(--surface-2); border-radius: 9px; padding: 10px 12px; }
.info-item .k { font-size: 11px; color: var(--text-mute); }
.info-item .v { font-size: 13px; font-weight: 600; margin-top: 2px; }
.modal-actions { display: flex; gap: 10px; }
.btn {
  flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600;
  font-size: 13px; text-align: center; transition: .18s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; }
.btn.primary:hover { opacity: .9; color: #fff; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 8px; border: 0; background: var(--surface-2); color: var(--text-soft);
  font-size: 19px; cursor: pointer; display: grid; place-items: center;
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 42px; height: 42px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  color: var(--brand); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 40;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 19px; height: 19px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 50px; padding: 30px 0;
  text-align: center; color: var(--text-mute); font-size: 12px;
}
.site-footer a { color: var(--text-soft); margin: 0 8px; }
.site-footer a:hover { color: var(--brand); }

/* ---------- 文章页（ZBlog single） ---------- */
.crumb { font-size: 12px; color: var(--text-mute); margin: 22px 0; }
.crumb a:hover { color: var(--brand); }
.post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 26px; align-items: start; }
.post-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.post-title { font-size: 27px; margin: 0 0 12px; line-height: 1.35; }
.post-meta { color: var(--text-mute); font-size: 12px; display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.post-meta .meta-cat { background: var(--brand-soft); color: var(--brand); font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.post-meta .meta-chip { background: var(--surface-2); padding: 2px 9px; border-radius: 20px; }
.post-hero {
  display: flex; gap: 16px; align-items: center; padding: 18px;
  background: var(--surface-2); border-radius: 12px; margin-bottom: 22px;
}
.post-hero .card-icon { width: 62px; height: 62px; font-size: 30px; }
.post-hero h2 { margin: 0 0 4px; font-size: 18px; }
.post-hero p { margin: 0; color: var(--text-soft); font-size: 13px; }
.download-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.download-bar .btn { flex: 0 1 auto; padding: 12px 26px; }
/* 微信小程序码主体区 */
.qr-feature {
  display: flex; gap: 26px; align-items: center; margin: 4px 0 24px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 30px;
}
.qr-feature-img {
  flex: 0 0 auto; background: #fff; border-radius: 18px; padding: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.10); line-height: 0;
}
.qr-feature-img img { width: 168px; height: 168px; object-fit: contain; display: block; }
.qr-feature-text h3 { margin: 0 0 10px; font-size: 19px; }
.qr-feature-text p { margin: 0 0 10px; font-size: 14px; color: var(--text-soft); line-height: 1.8; }
.qr-hint {
  display: inline-block; font-size: 12px; color: var(--brand);
  background: var(--brand-soft); border-radius: 20px; padding: 5px 14px;
}
@media (max-width: 600px) {
  .qr-feature { flex-direction: column; text-align: center; padding: 22px; }
  .qr-feature-img img { width: 150px; height: 150px; }
}
.post-content { line-height: 1.85; color: var(--text); font-size: 15px; }
.post-content img { border-radius: 10px; margin: 14px 0; }
.post-content h2, .post-content h3 { margin: 26px 0 10px; }
.post-content pre { background: var(--surface-2); padding: 14px; border-radius: 9px; overflow: auto; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.side-box h3 { margin: 0 0 14px; font-size: 15px; }
.rank-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rank-item:last-child { border: 0; }
.rank-no { width: 20px; font-weight: 700; color: var(--text-mute); font-size: 13px; }
.rank-item:nth-child(-n+3) .rank-no { color: var(--brand); }
.rank-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.rank-title:hover { color: var(--brand); }
.rank-ico { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-size: 14px; overflow: hidden; }
.rank-ico img { width: 100%; height: 100%; object-fit: contain; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--text-soft); }
.tag-cloud a:hover { background: var(--brand); color: #fff; }

/* ---------- 网站作品：简洁导航落地页 ---------- */
.nav-landing { max-width: 1000px; margin: 0 auto 60px; }
.nl-hero {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 34px; box-shadow: 0 10px 40px rgba(40,40,90,.06);
}
.nl-icon { width: 92px; height: 92px; flex-shrink: 0; border-radius: 22px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 44px; overflow: hidden; }
.nl-icon img { width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; }
.nl-info { flex: 1 1 380px; min-width: 0; }
.nl-cat { font-size: 12px; color: var(--brand); font-weight: 700; margin-bottom: 7px; }
.nl-info h1 { font-size: 28px; margin: 0 0 9px; line-height: 1.3; }
.nl-desc { font-size: 14.5px; color: var(--text-soft); line-height: 1.75; margin: 0 0 10px; }
.nl-tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-mute); }
.nl-tags span, .nl-tags a { background: var(--surface-2); border-radius: 16px; padding: 3px 10px; text-decoration: none; color: var(--text-mute); transition: .18s; }
.nl-tags a:hover { color: var(--brand); background: var(--brand-soft); }
.nl-visit {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 16px; padding: 15px 26px; border-radius: 13px;
  box-shadow: 0 6px 18px rgba(92,92,214,.28); transition: transform .18s, box-shadow .18s;
}
.nl-visit:hover { transform: translateY(-2px); box-shadow: 0 9px 26px rgba(92,92,214,.36); color: #fff; }
.nl-visit svg { width: 20px; height: 20px; }
.nl-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; margin-top: 18px; line-height: 1.85; }
.nl-related { margin-top: 30px; }
.nl-related h2 { font-size: 17px; margin: 0 0 14px; }
.nl-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nl-rel { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--text); transition: border-color .18s, transform .18s; }
.nl-rel:hover { border-color: var(--brand); transform: translateY(-2px); }
.nl-rel-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 19px; overflow: hidden; }
.nl-rel-ico img { width: 100%; height: 100%; object-fit: contain; }
.nl-rel-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 软件 / 游戏：下载验证区 ---------- */
.dl-gate { margin: 22px 0; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.dl-gate-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dl-gate-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; }
.dl-gate-ico svg { width: 24px; height: 24px; }
.dl-gate-head h3 { margin: 0 0 4px; font-size: 17px; }
.dl-gate-head p { margin: 0; font-size: 12.5px; color: var(--text-soft); line-height: 1.6; }
.dl-steps { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-soft);
  background: var(--surface); border-radius: 10px; padding: 11px 14px; flex: 1; min-width: 0; }
.dl-steps b { color: var(--brand); }
.dl-wx-row { display: flex; align-items: stretch; gap: 14px; margin-bottom: 12px; }
.dl-wxqr { width: 116px; height: 116px; object-fit: contain; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 5px; display: block; flex-shrink: 0; }
.dl-copy { margin-left: 4px; padding: 1px 7px; font-size: 11px; cursor: pointer; color: var(--brand);
  background: var(--brand-soft); border: 1px solid transparent; border-radius: 5px; transition: .15s; }
.dl-copy:hover { border-color: var(--brand); }
.dl-input-row { display: flex; gap: 10px; }
.dl-input-row input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; }
.dl-submit { padding: 12px 22px; border: 0; border-radius: 10px; cursor: pointer; color: #fff; font-weight: 700;
  font-size: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); white-space: nowrap; }
.dl-submit:hover { opacity: .9; }
.dl-verified { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 12px; }
.dl-verified .dl-ok-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: #e3f7ee; color: #137a52; font-size: 20px; font-weight: 800; }
.dl-verified b { font-size: 15px; }
.dl-verified p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-soft); }
.dl-verified .dl-submit { margin-left: auto; text-decoration: none; display: inline-block; }
.dl-direct { display: inline-block; padding: 13px 28px; border-radius: 10px; text-decoration: none; color: #fff;
  font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.dl-alert { background: #fff5f4; border: 1px solid #f4c7c4; color: #a52a25; border-radius: 9px;
  padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; line-height: 1.6; }
.dl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.post-official { font-size: 12.5px; color: var(--text-soft); margin: 10px 0; word-break: break-all; }
.post-official a { color: var(--brand); text-decoration: none; }
.post-actions { display: flex; gap: 10px; margin-top: 24px; }
/* ---------- 作品工具条：分享 / 举报 / 收藏 / 上一条下一条 ---------- */
.post-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.pt-actions, .pt-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-btn { padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 12.5px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); transition: .18s; }
.pt-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
/* 详情页收藏按钮：覆盖卡片 .fav-btn 的 26px 固定宽高，避免「☆ 收藏」竖排错位 */
.pt-btn.fav-btn { width: auto; height: auto; display: inline-flex; align-items: center; gap: 4px; padding: 7px 13px; min-width: 0; }
.pt-btn.fav-btn.on { color: #e0507a; border-color: #e0507a; background: #fdeef3; }
.pt-nav a { padding: 6px 10px; border-radius: 7px; font-size: 12px; color: var(--text-mute); transition: .18s; }
.pt-nav a:hover { color: var(--brand); background: var(--surface-2); }
/* 轻量提示条 */
.nh-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); z-index: 9999;
  background: #1c1e28; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: .25s; max-width: 88vw; text-align: center; }
.nh-toast.show { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="dark"] .nh-toast { background: #f0f0f5; color: #1c1e28; }

@media (max-width: 780px) {
  .nl-hero { padding: 24px 20px; gap: 16px; }
  .nl-icon { width: 68px; height: 68px; font-size: 32px; }
  .nl-info h1 { font-size: 22px; }
  .nl-visit { width: 100%; justify-content: center; }
  .nl-rel-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-input-row { flex-direction: column; }
  .dl-submit { width: 100%; }
}

/* ---------- 抖音测评视频 ---------- */
.nh-video { margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.nh-video-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.nh-video-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #fe2c55; }
.nh-video-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fe2c55; box-shadow: 0 0 0 4px rgba(254,44,85,.14); }
.nh-video-src { font-size: 11.5px; color: var(--text-mute); text-decoration: none; }
.nh-video-src:hover { color: var(--brand); }
.nh-video-stage { position: relative; aspect-ratio: 16 / 9; background: #0e0e14; }
.nh-video-cover { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, #2a2a4a, #12121c 70%) center/cover no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.nh-video-play { width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer; background: #fe2c55; display: grid; place-items: center; box-shadow: 0 6px 22px rgba(254,44,85,.5); transition: transform .18s; }
.nh-video-play:hover { transform: scale(1.08); }
.nh-play-tri { display: block; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.nh-video-tip { font-size: 12px; color: rgba(255,255,255,.82); background: rgba(0,0,0,.4); padding: 5px 12px; border-radius: 20px; }
.nh-video-frame { position: absolute; inset: 0; }
.nh-video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.nh-video-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; }
.nh-video-close:hover { background: rgba(0,0,0,.85); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .post-layout { grid-template-columns: 1fr; } }
@media (max-width: 780px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-soft); flex-direction: column; padding: 12px 20px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: grid; }
  .submit-btn { padding: 7px 10px; font-size: 12px; }
  .hero h1 { font-size: 27px; }
  .hero { padding: 36px 0 20px; }
  .info-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .search-box { padding-left: 13px; }
  .search-btn { padding: 9px 13px; }
  .brand-sub { display: none; }
}

/* ============================================================
   多平台一键搜索（Hero 区）
   ============================================================ */
.multi-search { max-width: 760px; margin: 0 auto; }
/* 平台栏 + 搜索框共用同一个外框，上下吸附成一体 */
.search-shell {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px 12px; box-shadow: var(--shadow);
  transition: .2s;
}
.search-shell:focus-within { border-color: var(--brand); box-shadow: var(--shadow-hover); }
.multi-search .search-box {
  max-width: none; margin: 12px 0 0; padding: 6px 6px 6px 16px;
  background: transparent; border: 0; border-top: 1px solid var(--line);
  border-radius: 0; box-shadow: none;
}
.multi-search .search-box:focus-within { box-shadow: none; }
.multi-search .search-btn { display: inline-flex; align-items: center; gap: 6px; }
.multi-search .search-btn svg { width: 15px; height: 15px; color: #fff; }

.ms-tools { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ms-tools button {
  border: 0; background: transparent; color: var(--text-soft); cursor: pointer;
  font-size: 12px; padding: 4px 10px; border-radius: 6px; transition: .15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.ms-tools button:hover { background: var(--surface-2); color: var(--brand); }
.ms-tools button.hl { color: var(--brand); }

.platform-bar {
  background: transparent; border: 0; border-radius: 0;
  padding: 0; text-align: left; box-shadow: none;
}
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.pb-hint { font-size: 11.5px; color: var(--text-mute); }
.edit-plat-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-soft);
  cursor: pointer; padding: 4px 11px; border-radius: 7px; font-size: 12px; transition: .16s; white-space: nowrap;
}
.edit-plat-btn:hover { border-color: var(--brand); color: var(--brand); }
.edit-plat-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.edit-tools { display: flex; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.edit-tools button {
  border: 1px dashed var(--line); background: transparent; color: var(--text-soft);
  cursor: pointer; padding: 5px 11px; border-radius: 7px; font-size: 12px; transition: .16s;
}
.edit-tools button:hover { border-color: var(--brand); color: var(--brand); }

.plat-edit-form {
  margin-top: 11px; padding: 12px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
}
.pef-title { font-size: 12px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.plat-edit-form input {
  width: 100%; box-sizing: border-box; display: block; margin-bottom: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 8px 10px; border-radius: 7px; font-size: 12.5px; outline: none; font-family: inherit;
}
.plat-edit-form input:focus { border-color: var(--brand); }
.pef-btns { display: flex; gap: 8px; }
.pef-btns button { border: 0; cursor: pointer; padding: 6px 16px; border-radius: 7px; font-size: 12px; }
.pef-btns button:first-child { background: var(--brand); color: #fff; }
.pef-btns button:last-child { background: var(--surface); color: var(--text-soft); border: 1px solid var(--line); }

.mh-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg-soft); padding: 11px 20px; border-radius: 10px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow);
  max-width: 90vw; text-align: center;
}
.mh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hist-panel {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-hover); padding: 8px; max-height: 300px; overflow: auto; z-index: 60;
}
.hist-item {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  border: 0; background: transparent; color: var(--text); cursor: pointer;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; text-align: left;
}
.hist-item:hover { background: var(--surface-2); }
.hist-item small { color: var(--text-mute); font-size: 11px; }
.hist-empty { padding: 18px; text-align: center; color: var(--text-mute); font-size: 12px; }
.hist-wrap { position: relative; }

@media (max-width: 780px) {
  .platform-bar { padding: 12px; }
  .multi-search .search-btn { padding: 9px 14px; }
  .pb-hint { font-size: 11px; }
}

/* ============================================================
   平台选择（单选 + 拖拽编辑）
   ============================================================ */
.popts { display: flex; flex-wrap: wrap; gap: 8px; }
.popt {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-soft);
  padding: 7px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  transition: .16s; position: relative;
}
.popt:hover { border-color: var(--brand); color: var(--brand); }
.popt.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 3px 10px rgba(91,91,214,.24); font-weight: 600;
}
.popt.active::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 5px solid transparent;
  border-right: 5px solid transparent; border-top: 6px solid var(--brand);
}

/* 编辑态：拖拽手柄 + 改名/删除 */
.popt.edit-mode {
  display: inline-flex; align-items: center; gap: 7px; cursor: grab;
  background: var(--surface); border-style: dashed;
}
/* 编辑态下选中的芯片保留品牌色，名字才看得见；小三角在编辑态隐藏 */
.popt.edit-mode.active {
  background: var(--brand); color: #fff; border-style: solid;
  border-color: var(--brand); font-weight: 600;
}
.popt.edit-mode.active::after { display: none; }
.popt.edit-mode:active { cursor: grabbing; }
.popt.edit-mode .drag-handle { color: var(--text-mute); font-size: 15px; line-height: 1; user-select: none; }
.popt.edit-mode .popt-actions { display: inline-flex; gap: 6px; margin-left: 2px; }
.popt.edit-mode .popt-edit,
.popt.edit-mode .popt-del {
  font-size: 12px; width: 18px; height: 18px; line-height: 17px; text-align: center;
  border-radius: 5px; cursor: pointer; color: var(--text-soft); user-select: none;
}
.popt.edit-mode .popt-edit:hover { background: var(--brand-soft); color: var(--brand); }
.popt.edit-mode .popt-del:hover { background: #ffe9e9; color: #d7443e; }
.popt.dragging { opacity: .4; }
.popt.drag-over { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

@media (max-width: 780px) {
  .popt { padding: 6px 10px; font-size: 12px; }
  .popt.edit-mode { gap: 5px; padding: 5px 8px; }
}

/* ============================================================
   手机 / 平板整体适配（最后声明，覆盖前面规则）
   ============================================================ */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
.wrap { padding-left: 16px; padding-right: 16px; }

/* 平板 1024：间距收紧，避免卡片过窄 */
@media (max-width: 1024px) {
  .header-inner { gap: 14px; }
  .post-main { padding: 22px; }
  .post-title { font-size: 24px; }
  .dl-gate { padding: 18px 20px; }
}

/* 手机 780：导航抽屉、按钮与卡片留白 */
@media (max-width: 780px) {
  .header-inner { gap: 10px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand-name { font-size: 17px; }
  .brand-logo { height: 28px; width: 28px; }
  .submit-btn { margin-left: auto; padding: 7px 11px; font-size: 12px; }
  .nav-links { margin-left: 0; }
  .nav-links a { padding: 10px 14px; font-size: 14px; }
  .toolbar { gap: 8px; }
  .toolbar h2 { font-size: 16px; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .section { margin: 24px 0; }
  .section-head h2 { font-size: 17px; }
  .card { padding: 12px; }
  .card-icon { width: 46px; height: 46px; font-size: 25px; }
  .card-desc { min-height: 0; }
  .post-main { padding: 18px; }
  .post-title { font-size: 21px; }
  .post-content { font-size: 14px; }
  .post-hero { padding: 14px; gap: 12px; }
  .post-hero .card-icon { width: 52px; height: 52px; font-size: 25px; }
  .post-hero h2 { font-size: 16px; }
  .info-list { grid-template-columns: 1fr; }
  .dl-gate { padding: 16px; }
  .dl-wx-row { flex-direction: column; align-items: flex-start; }
  .dl-wxqr { align-self: center; }
  .dl-verified .dl-submit { margin-left: 0; width: 100%; text-align: center; }
  .nl-hero { padding: 20px; }
  .nl-body { padding: 18px; }
  .nl-rel-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding: 24px 0; margin-top: 36px; }
  .site-footer a { display: inline-block; margin: 3px 7px; }
  .to-top { right: 14px; bottom: 14px; }
}

/* 小屏手机 520：单列、隐藏次要信息、避免溢出 */
@media (max-width: 520px) {
  .wrap { padding-left: 13px; padding-right: 13px; }
  .header-inner { gap: 8px; }
  .brand-sub { display: none; }
  .brand { font-size: 16px; }
  .brand-name { font-size: 16px; }
  .brand-logo { height: 26px; width: 26px; }
  .submit-btn { padding: 6px 9px; font-size: 11.5px; }
  .submit-btn svg { width: 13px; height: 13px; }
  .icon-btn { width: 33px; height: 33px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 13px; }
  .search-box { padding: 6px 6px 6px 12px; }
  .search-box input { font-size: 14px; }
  .search-btn { padding: 8px 12px; font-size: 13px; }
  .stats-row { gap: 9px; }
  .stat-box { padding: 12px; gap: 9px; }
  .stat-box .si { width: 34px; height: 34px; font-size: 16px; }
  .stat-box .sv { font-size: 18px; }
  .stat-box .sl { font-size: 10px; }
  .cat-pill { padding: 7px 12px; font-size: 12px; }
  .sub-bar { padding: 10px; }
  .sub-group + .sub-group { padding-left: 0; border-left: 0; }
  .card-title { font-size: 12.5px; min-height: 0; }
  .card-desc { font-size: 11px; }
  .modal-head { padding: 20px 18px 0; }
  .modal-body { padding: 14px 18px 20px; }
  .modal-actions { flex-direction: column; }
  .post-meta { gap: 6px; font-size: 11px; }
  .post-toolbar { gap: 10px; }
  .pt-actions, .pt-nav { width: 100%; }
  .pt-btn { flex: 1; text-align: center; justify-content: center; }
  .qr-feature-img img { width: 140px; height: 140px; }
  .dl-input-row { flex-direction: column; }
  .dl-submit { width: 100%; }
  .nl-info h1 { font-size: 20px; }
  .nl-rel-grid { grid-template-columns: 1fr; }
  .nh-video-head { padding: 9px 12px; }
  .nh-video-play { width: 54px; height: 54px; }
}

/* 超窄屏 380：进一步压缩 */
@media (max-width: 380px) {
  .brand-name { font-size: 15px; }
  .submit-btn { font-size: 11px; padding: 6px 8px; }
  .submit-btn svg { display: none; }
  .card-top { gap: 9px; }
  .card-icon { width: 42px; height: 42px; font-size: 23px; }
}
