/* =========================================================
   极客刻度 · 3C 测评博客样式表
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef1f6;
  --border: #e6e9ef;
  --border-strong: #d6dbe4;
  --text: #101319;
  --text-2: #4c5566;
  --text-3: #8b94a5;
  --accent: #2b6cff;
  --accent-ink: #1750d6;
  --accent-soft: #eef3ff;
  --danger: #e5484d;
  --ok: #0f9d58;
  --warn: #d97706;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 19, 25, .05);
  --shadow: 0 8px 28px -12px rgba(16, 19, 25, .16), 0 2px 6px rgba(16, 19, 25, .04);
  --shadow-lg: 0 30px 70px -28px rgba(16, 19, 25, .3), 0 8px 20px rgba(16, 19, 25, .06);
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; }
button { font-family: inherit; }

.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.center { text-align: center; }
.accent { color: var(--accent); }

/* ---------------- 页头 ---------------- */

.hdr {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.hdr-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  height: 62px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #2b6cff, #12b6e8);
  color: #fff; font-weight: 800; font-size: 13.5px; letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(43, 108, 255, .7);
}
.brand-mark.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.brand-mark.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15.5px; letter-spacing: -.01em; }
.brand-text i { font-style: normal; font-size: 9.5px; letter-spacing: .16em; color: var(--text-3); font-weight: 600; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 14px; border-radius: 9px; font-size: 14.5px; color: var(--text-2);
  font-weight: 500; transition: background .16s, color .16s;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.hdr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.who {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .12s, box-shadow .16s;
  background: var(--surface); color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(43, 108, 255, .75); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }
.btn.subtle { background: var(--surface-3); color: var(--text-2); }
.btn.subtle:hover { background: #e4e8ef; color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: #fff; border-color: #f3c6c7; color: var(--danger); }
.btn.danger-ghost:hover { background: #fff5f5; border-color: var(--danger); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.xs { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; font-weight: 500; }
.btn.block { width: 100%; padding: 11px 16px; }

/* ---------------- 主容器 ---------------- */

.main { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 64px; min-height: 60vh; }
.narrow { max-width: 620px; margin: 60px auto; }

.loading-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 90px 0; color: var(--text-3);
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Hero ---------------- */

.hero {
  position: relative; overflow: hidden; border-radius: 22px;
  padding: 54px 44px 44px; margin-bottom: 30px;
  background: linear-gradient(130deg, #0f2f86 0%, #2058e0 42%, #12b6e8 100%);
  color: #fff; box-shadow: 0 30px 60px -30px rgba(15, 47, 134, .6);
}
.hero-glow {
  position: absolute; inset: -40% -20% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, .3), transparent 62%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.hero-badge i { width: 6px; height: 6px; border-radius: 50%; background: #5ef0b8; box-shadow: 0 0 0 3px rgba(94, 240, 184, .25); }
.hero h1 { font-size: 44px; margin: 18px 0 10px; letter-spacing: -.03em; }
.hero p { font-size: 16.5px; color: rgba(255, 255, 255, .85); max-width: 520px; }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.hero-stats b { color: #fff; font-size: 19px; margin-right: 4px; font-weight: 700; }

.search {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin-top: 26px; background: #fff; border-radius: 14px; padding: 7px 7px 7px 14px;
  box-shadow: 0 16px 40px -18px rgba(7, 22, 60, .55); max-width: 520px;
}
.search-ico { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1; border: 0; outline: 0; font-size: 15px; color: var(--text); background: transparent;
  padding: 9px 0; min-width: 0; font-family: inherit;
}
.search button {
  border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  padding: 10px 20px; border-radius: 10px; cursor: pointer; transition: background .16s;
}
.search button:hover { background: var(--accent-ink); }

/* ---------------- 布局 ---------------- */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 30px; align-items: start; }
.col-main { min-width: 0; }
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 82px; }

.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.list-head h2 { font-size: 21px; }

/* ---------------- 文章卡片 ---------------- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card.is-draft { opacity: .82; border-style: dashed; }

.card-cover { display: block; position: relative; overflow: hidden; }
.cover, .cover-photo {
  aspect-ratio: 16 / 10; width: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.cover-fallback { position: relative; display: flex; align-items: center; justify-content: center; }
.cover-fallback b {
  position: relative; color: rgba(255, 255, 255, .95); font-size: 17px; letter-spacing: .1em;
  font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.cover-grid {
  position: absolute; inset: 0; opacity: .28;
  background-image: linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 78%);
}
.badge-featured, .badge-draft {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(255, 255, 255, .94); color: var(--accent-ink); letter-spacing: .02em;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .4);
}
.badge-draft { left: auto; right: 12px; background: rgba(255, 243, 224, .96); color: var(--warn); }
.badge-draft.inline { position: static; margin-left: 8px; box-shadow: none; }

.card-body { padding: 16px 17px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-ink); transition: background .16s;
}
.chip:hover { background: #dfe9ff; }
.card-title { font-size: 17px; line-height: 1.45; }
.card-title a { transition: color .16s; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  color: var(--text-2); font-size: 13.6px; line-height: 1.7; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); padding-top: 3px; }
.meta-dot { color: var(--border-strong); }
.meta-brand { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { margin-left: auto; display: flex; gap: 7px; }
.tag { color: var(--text-3); font-size: 12.5px; transition: color .16s; }
.tag:hover { color: var(--accent); }
.tag.lg { font-size: 13.5px; padding: 5px 12px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-weight: 500; }
.tag.lg:hover { background: var(--accent-soft); color: var(--accent-ink); }

.rating {
  display: inline-flex; align-items: baseline; gap: 1px; padding: 2px 8px;
  border-radius: 7px; background: #fff5e6; color: #b45309; font-size: 12.5px; font-weight: 700;
}
.rating i { font-style: normal; font-size: 10.5px; opacity: .7; font-weight: 600; }
.rating.big { padding: 4px 11px; font-size: 14px; }
.rating.big b { font-size: 15.5px; }

/* 头条卡片 */
.card-lead { flex-direction: row; align-items: stretch; margin-bottom: 20px; }
.card-lead .card-cover { width: 47%; flex-shrink: 0; }
.card-lead .cover, .card-lead .cover-photo { height: 100%; aspect-ratio: auto; min-height: 250px; }
.card-lead .card-body { padding: 24px 26px; gap: 11px; justify-content: center; }
.card-lead .card-title { font-size: 23px; line-height: 1.35; }
.card-lead .card-excerpt { font-size: 14.2px; -webkit-line-clamp: 3; }

/* ---------------- 分页 ---------------- */

.pager { display: flex; gap: 7px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pg {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); font-size: 13.5px;
  color: var(--text-2); font-weight: 500; transition: all .16s;
}
a.pg:hover { border-color: var(--accent); color: var(--accent); }
.pg.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg.disabled { opacity: .45; }

/* ---------------- 侧栏 ---------------- */

.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px;
}
.side-card h4 { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-list a {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px;
  font-size: 14px; transition: background .16s;
}
.side-list a:hover { background: var(--surface-2); }
.side-list .dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.side-list em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-3); background: var(--surface-3); padding: 1px 8px; border-radius: 999px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud .tag {
  padding: 5px 11px; border-radius: 999px; background: var(--surface-3);
  color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: all .16s;
}
.tag-cloud .tag:hover { background: var(--accent-soft); color: var(--accent-ink); }
.tag-cloud em { font-style: normal; opacity: .55; margin-left: 4px; font-size: 11px; }
.side-about p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.side-author { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; }
.side-author b { display: block; font-size: 14px; }
.side-author i { font-style: normal; font-size: 12px; color: var(--text-3); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #2b6cff, #12b6e8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }
.link-more { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.link-more:hover { color: var(--accent-ink); }

/* ---------------- 通用页头 ---------------- */

.page-head { margin: 14px 0 26px; }
.eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.page-head h1 { font-size: 33px; margin: 10px 0 8px; letter-spacing: -.025em; }
.page-head p { color: var(--text-2); font-size: 15px; }

/* ---------------- 分类 / 标签总览 ---------------- */

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cat-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s; display: block;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cat-bar { position: absolute; inset: 0 0 auto 0; height: 4px; }
.cat-card h3 { font-size: 19px; margin: 6px 0 4px; }
.cat-count { font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.cat-count b { color: var(--text); font-size: 16px; }
.cat-preview { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cat-preview li {
  font-size: 13px; color: var(--text-2); padding-left: 13px; position: relative;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-preview li::before { content: ''; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }

.tag-board { display: flex; flex-wrap: wrap; gap: 11px; align-items: baseline; }
.tag.xl {
  padding: 9px 17px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; color: var(--text); transition: all .18s; line-height: 1.2;
}
.tag.xl:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tag.xl em { font-style: normal; font-size: .72em; color: var(--text-3); margin-left: 7px; font-weight: 700; }

/* ---------------- 文章详情 ---------------- */

.post-wrap { max-width: 760px; margin: 0 auto; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 46px 34px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.crumbs a:hover { color: var(--accent); }
.post-head h1 { font-size: 33px; line-height: 1.28; letter-spacing: -.025em; margin: 12px 0 0; }
.post-top { display: flex; align-items: center; gap: 8px; }
.post-lead { color: var(--text-2); font-size: 16px; line-height: 1.75; margin-top: 14px; }
.post-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 20px; font-size: 13.5px; color: var(--text-3); }
.post-meta b { color: var(--text-2); font-weight: 600; }
.post-meta .sep { width: 1px; height: 13px; background: var(--border-strong); }
.spec-strip {
  display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 22px; padding: 16px 20px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.spec-strip div { display: flex; flex-direction: column; gap: 3px; }
.spec-strip i { font-style: normal; font-size: 11.5px; color: var(--text-3); letter-spacing: .05em; }
.spec-strip b { font-size: 15px; }
.post-cover {
  margin: 26px -46px 4px; aspect-ratio: 16 / 9;
  background-size: cover; background-position: center; border-block: 1px solid var(--border);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.pn {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all .18s;
}
a.pn:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.pn i { font-style: normal; font-size: 12px; color: var(--text-3); }
.pn b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn.right { text-align: right; }
.pn.disabled { opacity: .55; }

.related { max-width: var(--maxw); margin: 44px auto 0; }
.related h3 { font-size: 18px; margin-bottom: 16px; }

/* ---------------- Markdown 排版 ---------------- */

.md-body { margin-top: 30px; font-size: 16px; line-height: 1.85; color: #20242c; }
.md-body > *:first-child { margin-top: 0; }
.md-body h2 {
  font-size: 23px; margin: 40px 0 14px; padding-left: 14px; position: relative; letter-spacing: -.02em;
}
.md-body h2::before {
  content: ''; position: absolute; left: 0; top: .22em; bottom: .22em; width: 4px;
  border-radius: 3px; background: linear-gradient(180deg, #2b6cff, #12b6e8);
}
.md-body h3 { font-size: 18.5px; margin: 30px 0 11px; }
.md-body h4 { font-size: 16.5px; margin: 24px 0 9px; color: var(--text-2); }
.md-body p { margin: 15px 0; }
.md-body a { color: var(--accent); border-bottom: 1px solid rgba(43, 108, 255, .3); }
.md-body a:hover { border-bottom-color: var(--accent); }
.md-body strong { font-weight: 700; color: #0b0e13; }
.md-body ul, .md-body ol { margin: 15px 0; padding-left: 24px; }
.md-body li { margin: 7px 0; }
.md-body li::marker { color: var(--text-3); }
.md-body blockquote {
  margin: 20px 0; padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border-left: 3px solid var(--accent); color: #1c3f8f;
}
.md-body blockquote p { margin: 6px 0; }
.md-body code {
  background: var(--surface-3); padding: 2px 6px; border-radius: 5px; font-size: .87em;
  color: #b02a6b;
}
.md-body pre {
  background: #f6f8fa; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; overflow-x: auto; margin: 20px 0; line-height: 1.6;
}
.md-body pre code { background: none; padding: 0; color: inherit; font-size: 13.5px; }
.md-body hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.md-img { border-radius: var(--radius-sm); margin: 22px auto; border: 1px solid var(--border); }
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.md-body table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-body thead { background: var(--surface-2); }
.md-body th, .md-body td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.md-body th { font-weight: 700; color: var(--text); white-space: nowrap; }
.md-body tbody tr:last-child td { border-bottom: 0; }
.md-body tbody tr:hover { background: #fbfcfe; }

/* ---------------- 关于 ---------------- */

.about-wrap { max-width: 780px; margin: 0 auto; }
.about-head { text-align: center; margin-bottom: 28px; }
.about-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.about-who { flex: 1; }
.about-who b { display: block; font-size: 16.5px; }
.about-who i { font-style: normal; color: var(--text-3); font-size: 13px; }
.about-md {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 42px 30px; margin-top: 20px;
}
.about-md > h2:first-child { margin-top: 0; }

/* ---------------- 空状态 ---------------- */

.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty.sm { padding: 30px 16px; }
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--text-3);
}
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty p { font-size: 14px; }
.empty .btn { margin-top: 16px; }

/* ---------------- 登录 ---------------- */

.auth-wrap { display: flex; justify-content: center; padding: 30px 0 60px; }
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 34px 34px 30px;
  box-shadow: var(--shadow-lg);
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-mark { margin: 0 auto 14px; }
.auth-head h1 { font-size: 23px; }
.auth-head p { color: var(--text-3); font-size: 13.5px; margin-top: 7px; line-height: 1.65; }
.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 4px;
  background: var(--surface-3); border-radius: 12px; margin-bottom: 22px;
}
.tab {
  border: 0; background: transparent; padding: 8px 4px; border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-3); transition: all .16s; white-space: nowrap;
}
.tab:hover { color: var(--text-2); }
.tab.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-msg { margin-top: 14px; font-size: 13.5px; min-height: 20px; color: var(--text-3); line-height: 1.6; }
.auth-msg.ok { color: var(--ok); }
.auth-msg.error { color: var(--danger); }
.auth-tip { font-size: 12.5px; color: var(--text-3); text-align: center; }
.auth-tip a { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border-strong);
  font-size: 14.5px; font-family: inherit; color: var(--text); background: var(--surface);
  transition: border-color .16s, box-shadow .16s; outline: 0;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(43, 108, 255, .14);
}
.field textarea { resize: vertical; line-height: 1.7; }
.field .row { display: flex; gap: 8px; }
.field .row input { flex: 1; }
.field.checkbox { flex-direction: row; align-items: center; gap: 9px; }
.field.checkbox input { width: auto; }
.field.checkbox span { font-weight: 500; font-size: 13.5px; color: var(--text-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.field-err { color: var(--danger); font-size: 12.5px; min-height: 16px; margin: -6px 0 0; }

/* ---------------- 后台 ---------------- */

.admin { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-side {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; position: sticky; top: 82px;
}
.admin-side-head { padding: 2px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.admin-side-head b { display: block; font-size: 15px; }
.admin-side-head i { font-style: normal; font-size: 12px; color: var(--text-3); }
.admin-side nav { display: flex; flex-direction: column; gap: 3px; }
.admin-side nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  font-size: 14px; color: var(--text-2); font-weight: 500; transition: all .16s;
}
.admin-side nav a span { font-size: 14px; opacity: .8; width: 16px; text-align: center; }
.admin-side nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-side nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.admin-side-foot { display: block; margin-top: 14px; padding: 10px 11px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border); }
.admin-side-foot:hover { color: var(--accent); }

.admin-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 26px; }
.admin-head p { color: var(--text-3); font-size: 13.5px; margin-top: 5px; }
.admin-head p b { color: var(--text-2); }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel.pad { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); gap: 12px; }
.panel-head.inline { padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-size: 15.5px; }
.panel.pad .panel-head.inline { padding-bottom: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 3px; transition: all .18s;
}
.stat:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.stat i { font-style: normal; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.stat b { font-size: 28px; letter-spacing: -.03em; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--text-3); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 11px 14px; background: var(--surface-2);
  font-size: 12px; letter-spacing: .05em; color: var(--text-3); font-weight: 700;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fbfcfe; }
.td-title { max-width: 320px; font-weight: 600; }
.td-title a:hover { color: var(--accent); }
.td-act { text-align: right; white-space: nowrap; }
.mini-flag {
  display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 5px;
  background: #fff5e6; color: #b45309; font-size: 11px; font-weight: 700;
}
.chip-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.chip-status.ok { background: #e7f6ee; color: #0b7a44; }
.chip-status.draft { background: #fff3e0; color: #b45309; }

/* 编辑器 */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.editor-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ed-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-area {
  width: 100%; min-height: 440px; padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); font-family: var(--mono); font-size: 13.5px;
  line-height: 1.75; resize: vertical; outline: 0; color: var(--text); background: var(--surface-2);
}
.ed-area:focus { border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(43, 108, 255, .14); background: #fff; }
.ed-preview {
  margin-top: 16px; padding: 22px 24px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-2); max-height: 620px; overflow: auto;
}
.ed-preview .md-body { margin-top: 0; font-size: 15px; }
.ed-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cover-picker { display: flex; gap: 18px; align-items: flex-start; }
.cover-preview {
  width: 260px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--text-3);
  font-size: 13px; flex-shrink: 0;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview.empty { border-style: dashed; }
.cover-actions { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }

/* 媒体库 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.media-item { margin: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.media-thumb { aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: var(--surface-3); }
.media-thumb.file { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--text-3); font-size: 15px; letter-spacing: .05em; }
.media-item figcaption { padding: 9px 11px 4px; display: flex; flex-direction: column; gap: 2px; }
.media-item figcaption b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item figcaption i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.media-ops { display: flex; gap: 6px; padding: 6px 11px 11px; }

/* 守卫页 */
.guard { display: flex; justify-content: center; padding: 60px 0; }
.guard-card {
  max-width: 470px; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 40px 36px;
  box-shadow: var(--shadow);
}
.guard-card .brand-mark { margin: 0 auto 18px; }
.guard-card h1 { font-size: 22px; margin-bottom: 10px; }
.guard-card p { color: var(--text-3); font-size: 14px; line-height: 1.75; margin-bottom: 22px; }

/* ---------------- 页脚 ---------------- */

.ftr { background: var(--surface); border-top: 1px solid var(--border); margin-top: 20px; }
.ftr-inner { max-width: var(--maxw); margin: 0 auto; padding: 34px 22px 26px; }
.ftr-brand { display: flex; gap: 12px; align-items: flex-start; }
.ftr-brand b { font-size: 15px; }
.ftr-brand p { color: var(--text-3); font-size: 13px; margin-top: 3px; }
.ftr-links { display: flex; gap: 20px; margin: 22px 0 18px; flex-wrap: wrap; }
.ftr-links a { font-size: 13.5px; color: var(--text-2); }
.ftr-links a:hover { color: var(--accent); }
.ftr-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-3); flex-wrap: wrap;
}
.ftr-admin { color: var(--text-3); }
.ftr-admin:hover { color: var(--accent); }

/* ---------------- 提示 / 弹窗 ---------------- */

.toast-host { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  background: #101319; color: #fff; border-radius: 12px; font-size: 13.5px;
  box-shadow: 0 18px 44px -16px rgba(16, 19, 25, .55);
  opacity: 0; transform: translateY(10px) scale(.97); transition: all .24s cubic-bezier(.2, .8, .3, 1);
  max-width: 380px;
}
.toast.in { opacity: 1; transform: none; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: #6ba3ff; flex-shrink: 0; }
.toast.ok .toast-dot { background: #4ade80; }
.toast.error .toast-dot { background: #ff6b6b; }
.toast-msg { line-height: 1.5; }

.modal-mask {
  position: fixed; inset: 0; z-index: 300; background: rgba(16, 19, 25, .42);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .2s;
}
.modal-mask.in { opacity: 1; }
.modal {
  background: var(--surface); border-radius: 18px; padding: 26px 28px 22px; max-width: 430px; width: 100%;
  box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .2s cubic-bezier(.2, .8, .3, 1);
}
.modal-mask.in .modal { transform: none; }
.modal h3 { font-size: 18px; margin-bottom: 10px; }
.modal p { color: var(--text-2); font-size: 14px; line-height: 1.7; }
.modal b { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .hdr-inner { height: 56px; gap: 10px; padding: 0 14px; }
  .brand-text i { display: none; }
  .nav { gap: 0; overflow-x: auto; }
  .nav a { padding: 6px 9px; font-size: 13.5px; }
  .main { padding: 18px 14px 48px; }
  .hero { padding: 36px 22px 32px; border-radius: 18px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 14.5px; }
  .hero-stats { gap: 18px; }
  .grid, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .card-lead { flex-direction: column; }
  .card-lead .card-cover { width: 100%; }
  .card-lead .cover, .card-lead .cover-photo { min-height: 190px; }
  .card-lead .card-body { padding: 18px 18px 16px; }
  .card-lead .card-title { font-size: 19px; }
  .post { padding: 26px 20px 24px; border-radius: 14px; }
  .post-head h1 { font-size: 25px; }
  .post-cover { margin: 20px -20px 0; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .about-md { padding: 24px 20px; }
  .field-row, .field-row.three { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .cover-picker { flex-direction: column; }
  .cover-preview { width: 100%; }
  .auth-card { padding: 26px 20px 22px; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .about-card { flex-direction: column; text-align: center; }
  .page-head h1 { font-size: 26px; }
  .md-body { font-size: 15.5px; }
  .md-body h2 { font-size: 20px; }
  .toast-host { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; }
}

/* =========================================================
   中英双语
   ========================================================= */

/* 语言切换器 */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
  padding: 3px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border);
  margin-left: -14px;
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; line-height: 1.2;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--text-3);
  transition: background .16s, color .16s, box-shadow .16s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-switch button.active {
  background: var(--surface); color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}

/* 文章缺少对应语言版本时的提示条 */
.lang-fallback-note {
  margin: 22px 0 0; padding: 11px 16px;
  border-radius: 10px; font-size: 13.5px; line-height: 1.6;
  color: var(--warn); background: #fff8ec;
  border: 1px solid #f6e2bd;
}

/* 编辑器 / 设置页的次级区块 */
.panel-alt { background: var(--surface-2); border-style: dashed; }
.ed-tools.mb { margin-bottom: 8px; }

/* 英文排版微调：字距收紧、行高略降，更贴近西文阅读习惯 */
html[data-lang="en"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-lang="en"] h1,
html[data-lang="en"] h2,
html[data-lang="en"] h3,
html[data-lang="en"] h4 { letter-spacing: -.022em; }
html[data-lang="en"] .md-body { line-height: 1.78; letter-spacing: 0; }
html[data-lang="en"] .md-body p { margin: 1.05em 0; }
html[data-lang="en"] .md-body blockquote { font-style: italic; }
html[data-lang="en"] .post-lead { line-height: 1.7; }
html[data-lang="en"] .hero h1 { letter-spacing: -.03em; }
html[data-lang="en"] .card-title { letter-spacing: -.018em; }
html[data-lang="en"] .tag,
html[data-lang="en"] .chip { letter-spacing: 0; }

@media (max-width: 760px) {
  .lang-switch { margin-left: -6px; padding: 2px; }
  .lang-switch button { padding: 4px 9px; font-size: 11.5px; }
}
