/* front.css —— 前台结构样式（颜色由主题变量提供） */
.site { min-height: 100vh; background: var(--bg-app); }
.site__scroll {
  padding-top: var(--tabbar-h);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main.container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  max-width: 1440px;
}
main.container > * { width: 100%; }
main.container > .section:last-child,
main.container > .article,
main.container > .notfound { flex: 1 1 auto; display: flex; flex-direction: column; }
main.container > .section:last-child > .post-list { flex: 1 1 auto; }
.site__bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- 顶部标签栏 ---------- */
.tabbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--tabbar-h);
  display: flex; align-items: stretch;
  gap: 10px;
  padding: 0 14px;
  background: var(--tabbar-bg, rgba(16,18,30,.92));
  border-bottom: 1px solid var(--border);
}
.tabbar__dots { display: flex; align-items: center; gap: 7px; padding-right: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }
.dot--purple { background: #7c6cf0; }

.tabbar__tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; justify-content: center; }
.tabbar__tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px 0 13px;
  border-radius: 9px 9px 0 0;
  color: var(--text);
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent; border-bottom: none;
  transition: color .16s, background .16s;
}
.tab:hover {
  color: var(--nav-hover, var(--accent));
  background: color-mix(in srgb, var(--nav-hover, var(--accent)) 14%, transparent);
}
.tab.is-active {
  color: var(--text);
  background: var(--bg-panel);
  border-color: var(--border);
}
.tab__close { opacity: .35; font-size: 15px; line-height: 1; transition: opacity .16s; }
.tab:hover .tab__close { opacity: .8; }
.tab--add {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 19px; padding: 0 10px; height: 36px;
}
.tab--add:hover { color: var(--text); }

/* 自定义菜单：含子项的下拉 */
.tab-item { position: relative; display: inline-flex; align-items: center; }
.tab__chev { opacity: .6; }
.tab-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 70;
  min-width: 170px; padding: 6px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
  display: none; flex-direction: column; gap: 2px;
}
.tab-item:hover .tab-dropdown { display: flex; }
.tab-dropdown a {
  padding: 8px 12px; border-radius: 7px; font-size: 13.5px;
  color: var(--text-muted); white-space: nowrap;
}
.tab-dropdown a:hover, .tab-dropdown a.is-active { background: var(--bg-hover); color: var(--nav-hover, var(--accent)); }

.tabbar__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: transparent; border: none; color: var(--text-dim);
  transition: color .16s, background .16s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-hover, rgba(255,255,255,.06)); }

.searchbar {
  position: fixed; top: var(--tabbar-h); left: 0; right: 0; z-index: 55;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 12px 22px;
  animation: slideDown .2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.searchbar form { display: flex; align-items: center; gap: 10px; max-width: var(--container); margin: 0 auto; }
.searchbar svg { color: var(--text-dim); }
.searchbar input {
  flex: 1; height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-input); outline: none;
}
.searchbar input:focus { border-color: var(--accent); }
.searchbar button {
  height: 40px; padding: 0 20px; border-radius: 10px; border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600;
}
.searchbar .searchbar__close {
  position: absolute; top: 50%; transform: translateY(-50%); right: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; padding: 0;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim);
  transition: color .16s, border-color .16s;
}
.searchbar .searchbar__close:hover { color: var(--accent); border-color: var(--accent); }
.searchbar .search-error:empty { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero__banner {
  height: 300px; overflow: hidden;
  border-radius: 0 0 50% 50% / 0 0 88px 88px;
  background: var(--hero-fallback, #10131f);
}
.hero__banner img { width: 100%; height: 100%; object-fit: cover; }
.hero__profile { text-align: center; margin-top: -52px; position: relative; }
.hero__avatar { position: relative; display: inline-block; }
.hero__avatar img {
  width: 104px; height: 104px; border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-app);
  background: var(--bg-panel);
}
.hero__status {
  position: absolute; right: 6px; bottom: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #34d399; border: 3px solid var(--bg-app);
}
.hero__title { margin-top: 14px; font-size: 26px; letter-spacing: .3px; }
.hero__subtitle { margin-top: 8px; color: var(--text-muted); font-size: 14.5px; }
.hero__socials { display: flex; justify-content: center; gap: 20px; margin-top: 16px; }
.hero__socials a { color: var(--text-dim); transition: color .16s, transform .16s; }
.hero__socials a:hover { color: var(--accent); transform: translateY(-2px); }

/* ---------- Section ---------- */
.container > .section:first-child,
.section { margin-top: 34px; }
.section { max-width: var(--content); margin-left: auto; margin-right: auto; flex-shrink: 0; }
main.container > .section:last-child,
main.container > .article:last-child { margin-bottom: 40px; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section__title { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; }
.section__title svg { color: var(--accent); }
.section__count, .section__more { color: var(--text-dim); font-size: 13px; }
.section__more { display: inline-flex; align-items: center; gap: 5px; transition: color .16s; }
.section__more:hover { color: var(--accent); }

/* ---------- 文章列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; min-height: var(--list-min-h, 0); }

.pcard {
  display: grid; grid-template-columns: 288px 1fr; gap: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.pcard__thumb { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/10; }
.pcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pcard:hover .pcard__thumb img { transform: scale(1.05); }
.pcard__body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.pcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard__meta-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.pcard__file { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono); }
.pcard__file svg { color: var(--accent-2); }
.pcard__file:hover { color: var(--accent); }
.pcard__views { display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono); }
.pcard__views svg { color: var(--text-dim); }
.pcard__date { color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono); }
.pcard__title { font-size: 19px; }
.pcard__title a { transition: color .16s; }
.pcard__title a:hover { color: var(--accent); }
.pcard__summary {
  color: var(--text-muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pcard__tags { display: flex; gap: 7px; flex-wrap: wrap; }
.pcard__more { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pcard__more svg { transition: transform .18s; }
.pcard__more:hover svg { transform: translateX(3px); }

/* 精选卡片 */
.featured {
  max-width: var(--content); margin: 30px auto 0;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-panel); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.featured__thumb { position: relative; overflow: hidden; min-height: 300px; }
.featured__thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured__badge {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 11px; border-radius: 8px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 700;
}
.featured__body { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.featured__title { font-size: 24px; }
.featured__title a:hover { color: var(--accent); }
.featured__summary { color: var(--text-muted); font-size: 14.5px; flex: 1; }

/* ---------- 分类 / 标签 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--radius);
  background: var(--bg-panel); border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.cat-card__icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.cat-card__body { min-width: 0; flex: 1; }
.cat-card__name { font-size: 16px; }
.cat-card__desc { color: var(--text-dim); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-card__count { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; }

.cat-head {
  max-width: var(--content); margin: 30px auto 0;
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--bg-panel); border: 1px solid var(--border);
}
.cat-head__icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.cat-head__icon--tag { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 15%, transparent); }
.cat-head__body { flex: 1; min-width: 0; }
.cat-head__name { font-size: 22px; }
.cat-head__desc { color: var(--text-muted); font-size: 13.5px; margin-top: 5px; }
.cat-head__count { display: flex; align-items: baseline; gap: 6px; color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.cat-head__count strong { font-size: 30px; color: var(--text); font-weight: 700; line-height: 1; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.tag--lg { font-size: 14px; padding: 8px 16px; border-radius: 10px; }

/* 文章布局：左/右/无 边栏 */
.article-layout { max-width: 1440px; margin: 30px auto 0; display: grid; gap: 32px; align-items: start; }
.article-layout.layout-none { grid-template-columns: 1fr; max-width: 1320px; }
.article-layout.layout-right { grid-template-columns: minmax(0, 1fr) 340px; }
.article-layout.layout-left { grid-template-columns: 340px minmax(0, 1fr); }
.article-layout__main { min-width: 0; }
.article-layout .postnav, .article-layout .comments { max-width: none; }
/* 主栏内容填满主栏宽度（覆盖全局 content 限宽） */
.article-layout__main .section,
.article-layout__main .article { max-width: none !important; width: 100%; margin-left: 0 !important; margin-right: 0 !important; }
.article-layout__main .post-list { max-width: none; width: 100%; }
.article-layout__main > .section > .post-list { width: 100%; }

.side-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.side-card__title { font-size: 14px; margin-bottom: 12px; }
.side-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.side-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-dim); }
.side-list strong, .side-list a { color: var(--text); font-size: 13px; }
.side-list a:hover { color: var(--accent); }
.side-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.side-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.side-links a { font-size: 13px; color: var(--text-muted); }
.side-links a:hover { color: var(--accent); }

.article__license { margin-top: 26px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-input); border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.article__license svg { color: var(--accent); flex-shrink: 0; }
.article__license a { color: var(--accent); }
.article__share { margin-top: 18px; display: flex; justify-content: flex-end; }

.share-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.share-modal[hidden] { display: none; }
.share-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.share-modal__card { position: relative; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); max-width: 320px; }
.share-modal__title { font-size: 16px; margin-bottom: 16px; }
.share-modal__qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 10px; padding: 8px; }
.share-modal__hint { color: var(--text-dim); font-size: 12.5px; margin: 14px 0 16px; line-height: 1.6; }

@media (max-width: 900px) {
  .article-layout.layout-right, .article-layout.layout-left { grid-template-columns: 1fr; }
  .article-layout.layout-left .article-layout__side { order: 0; }
}

/* ---------- 文章详情 ---------- */
.article {
  max-width: var(--content); margin: 30px auto 0;
  padding: 26px 30px 34px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel); border: 1px solid var(--border);
}
.article__cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; aspect-ratio: 21/9; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.article__meta-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.meta__item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 13px; }
.meta__item--link:hover { color: var(--accent); }
.meta__item--cat { color: var(--text-dim); }
.meta__item--cat svg { color: var(--accent-2); }
.meta__item--cat:hover { color: var(--accent-2); }
.article__tags { display: flex; gap: 7px; flex-wrap: wrap; }
.article__title { font-size: 30px; margin-top: 16px; letter-spacing: .3px; }
.article__desc { color: var(--text-muted); margin-top: 10px; font-size: 15px; }
.article__content { margin-top: 26px; }

.article__footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.article__share { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 13px; }
.share-btn {
  padding: 7px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font-size: 13px; font-weight: 600;
  transition: border-color .16s, color .16s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Markdown 正文 */
.markdown-body { color: var(--text-muted); font-size: 15.5px; line-height: 1.85; }
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--text); margin: 34px 0 14px; position: relative;
}
.markdown-body h2 {
  font-size: 22px; padding-left: 14px; border-left: 4px solid var(--accent);
  line-height: 1.35;
}
.markdown-body h3 { font-size: 18px; padding-left: 13px; border-left: 3px solid var(--accent); }
.markdown-body h4 { font-size: 16px; }
.markdown-body p { margin: 14px 0; }
.markdown-body a { color: var(--link, #2dd4bf); border-bottom: 1px solid color-mix(in srgb, var(--link, #2dd4bf) 45%, transparent); }
.markdown-body a:hover { border-bottom-color: var(--link, #2dd4bf); }
.markdown-body strong { color: var(--text); font-weight: 700; }
.markdown-body ul, .markdown-body ol { margin: 14px 0; padding-left: 24px; }
.markdown-body li { margin: 7px 0; }
.markdown-body li::marker { color: var(--text); }
.markdown-body img { border-radius: var(--radius); margin: 20px auto; box-shadow: var(--shadow); }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }
.markdown-body blockquote {
  margin: 20px 0; padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--text-muted);
}
.markdown-body blockquote p { margin: 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; overflow: hidden; border-radius: var(--radius-sm); }
.markdown-body th, .markdown-body td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.markdown-body th { background: var(--bg-input); color: var(--text); font-weight: 600; }
.markdown-body :not(pre) > code {
  padding: 2px 7px; border-radius: 6px; font-family: var(--font-mono); font-size: 13.5px;
  background: color-mix(in srgb, var(--inline-code, #2dd4bf) 16%, transparent);
  color: var(--inline-code, #2dd4bf);
  overflow-wrap: anywhere;
}

/* 防溢出：长链接/长串与超宽内容 */
.markdown-body { overflow-wrap: break-word; }
.markdown-body img { max-width: min(100%, 760px); height: auto; }
.markdown-body pre { max-width: 100%; overflow-x: auto; }

/* 兼容 WordPress 导入内容：Code Block Pro + shiki */
.markdown-body .code-block-pro-copy-button { display: none; }
.markdown-body .wp-block-kevinbatdorf-code-block-pro {
  max-width: 100%; overflow: hidden; margin: 18px 0;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.markdown-body .wp-block-kevinbatdorf-code-block-pro > pre { margin: 0; }
.markdown-body pre.shiki {
  padding: 14px 16px; font-family: var(--font-mono);
  font-size: 13px; line-height: 1.7; overflow-x: auto;
}
.markdown-body .shiki code,
.markdown-body pre.shiki code {
  padding: 0; background: none; border-radius: 0;
  color: inherit; font-family: inherit; font-size: inherit;
}
.markdown-body input[type="checkbox"] { margin-right: 8px; accent-color: var(--accent); }

/* 代码块 */
.code-block {
  margin: 22px 0; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--code-bg, #0d1017);
}
.code-block__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--code-head, rgba(255,255,255,.04));
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  border-bottom: 1px solid var(--border);
}
.code-block__lang { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono); }
.code-block__copy {
  border: none; background: transparent; color: var(--text-dim);
  font-size: 12.5px; padding: 3px 8px; border-radius: 6px;
  transition: color .16s, background .16s;
}
.code-block__copy:hover { color: var(--text); background: var(--bg-hover, rgba(255,255,255,.07)); }
.code-block__pre { margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); transform: translateZ(0); }
.code-block__pre code { font-family: var(--font-mono); font-size: 14px; line-height: 1.75; color: var(--code-fg, #f4f6f9); background: none; padding: 0; }

/* 上一篇/下一篇 */
.postnav { max-width: var(--content); margin: 18px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.postnav__item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--bg-panel); border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
}
.postnav__item:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.postnav__item--next { text-align: right; align-items: flex-end; }
.postnav__item.is-empty { background: transparent; border: none; }
.postnav__label { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.postnav__title { font-size: 15px; font-weight: 700; }
.postnav__desc { color: var(--text-dim); font-size: 12.5px; }

/* 评论 */
.comments { max-width: var(--content); margin: 34px auto 0; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 13px; padding: 16px; border-radius: var(--radius); background: var(--bg-panel); border: 1px solid var(--border); }
.comment__avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 17px;
}
.comment__body { min-width: 0; }
.comment__head { display: flex; align-items: baseline; gap: 10px; }
.comment__name { font-weight: 700; font-size: 14px; }
.comment__time { color: var(--text-dim); font-size: 12px; }
.comment__text { color: var(--text-muted); font-size: 14px; margin-top: 6px; white-space: pre-wrap; }

.comment-form { margin-top: 22px; padding: 22px; border-radius: var(--radius); background: var(--bg-panel); border: 1px solid var(--border); }
.comment-form__title { font-size: 16px; margin-bottom: 14px; }
.comment-form__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-input); outline: none;
  transition: border-color .16s; resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.comment-form__hint { color: var(--text-dim); font-size: 12.5px; }

/* 关于页 */
.about-author {
  max-width: var(--content); margin: 30px auto 0;
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--bg-panel); border: 1px solid var(--border);
}
.about-author__avatar { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.about-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-author__title { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; margin-bottom: 12px; }
.about-author__title svg { color: var(--accent); }
.about-author__body p { color: var(--text-muted); margin-bottom: 9px; font-size: 14.5px; }
.about-author__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.about-grid { max-width: var(--content); margin: 16px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.about-grid--two { grid-template-columns: 1fr 1fr; }
.about-card { padding: 22px; border-radius: var(--radius); background: var(--bg-panel); border: 1px solid var(--border); }
.about-card__title { display: inline-flex; align-items: center; gap: 9px; font-size: 15.5px; margin-bottom: 12px; }
.about-card__title svg { color: var(--accent); }
.about-card__text { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.about-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  padding: 16px 10px; border-radius: var(--radius-sm); text-align: center;
  background: var(--bg-input); border: 1px solid var(--border);
}
.stat strong { display: block; font-size: 22px; font-weight: 700; }
.stat span { color: var(--text-dim); font-size: 12.5px; }

.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; transition: color .16s; }
.contact:hover { color: var(--accent); }

/* 404 */
.notfound { max-width: 560px; margin: 70px auto; text-align: center; }
.notfound__code {
  font-size: 96px; font-weight: 800; font-family: var(--font-mono);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound__title { font-size: 24px; margin-top: 8px; }
.notfound__text { color: var(--text-muted); margin: 12px 0 24px; }

/* 页脚 */
.footer {
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--footer-bg, transparent);
}
.footer__inner {
  max-width: var(--container); margin: 0 auto; padding: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--text-dim); font-size: 12.5px; flex-wrap: wrap;
  font-family: var(--font-mono);
}
.footer__left { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.footer__prompt { color: var(--accent); }
.footer__icp { border-bottom: 1px solid currentColor; }
.footer__beian { color: inherit; }
.footer__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer__item { display: inline-flex; align-items: center; gap: 7px; }
.footer__item .dot { width: 7px; height: 7px; }

/* 右下角悬浮操作（搜索 + 回到顶部） */
.float-actions {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.float-btn {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted);
  transition: all .22s; cursor: pointer;
}
.float-btn:hover { color: var(--accent); border-color: var(--accent); }

/* 响应式 */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured__thumb { min-height: 200px; }
  .about-author { grid-template-columns: 1fr; }
  .about-author__avatar { max-width: 160px; }
  .about-grid, .about-grid--two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pcard { grid-template-columns: 1fr; }
  .pcard__thumb { aspect-ratio: 16/9; }
  .article { padding: 20px; }
  .article__title { font-size: 24px; }
  .postnav { grid-template-columns: 1fr; }
  .comment-form__row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__banner { height: 210px; }
  .tabbar__dots { display: none; }
  .cat-head { flex-wrap: wrap; }
}

/* 代码高亮：VS Code Dark+ 风格配色 */
.chroma, .code-block__pre code { color: var(--code-fg, #f4f6f9); }
.code-block__pre .k, .code-block__pre .kd, .code-block__pre .kn,
.code-block__pre .kr, .code-block__pre .kt { color: #569cd6; }
.code-block__pre .s, .code-block__pre .s1, .code-block__pre .s2,
.code-block__pre .sb, .code-block__pre .sc { color: #ce9178; }
.code-block__pre .c, .code-block__pre .c1, .code-block__pre .cm,
.code-block__pre .ch { color: #6a9955; }
.code-block__pre .nf, .code-block__pre .fm { color: #dcdcaa; }
.code-block__pre .nc, .code-block__pre .nn { color: #4ec9b0; }
.code-block__pre .mi, .code-block__pre .mf, .code-block__pre .m { color: #b5cea8; }
.code-block__pre .o, .code-block__pre .ow { color: #d4d4d4; }
.code-block__pre .na { color: #9cdcfe; }
.code-block__pre .nv, .code-block__pre .nx { color: #9cdcfe; }
.code-block__pre .nt { color: #569cd6; }
.code-block__pre .p { color: #d4d4d4; }
.code-block__pre .err, .code-block__pre .gr { color: #f44747; }
.code-block__pre .gh, .code-block__pre .gu { color: #569cd6; }



/* 搜索表单（搜索页） */
.search-inline--page { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.search-inline--page input {
  flex: 1; min-width: 220px; height: 42px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
  outline: none; font-size: 14px;
}
.search-inline--page input:focus { border-color: var(--accent); }
.search-inline--page .field__error { flex-basis: 100%; margin: 0; }
.search-error { color: #f87171; font-size: 12.5px; font-weight: 600; flex-basis: 100%; }
.searchbar form { flex-wrap: wrap; }
.searchbar .search-error { margin-top: 4px; }

/* 侧栏：作者 / 分类树 / 归档 */
.side-author { text-align: center; }
.side-author__avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 2px solid var(--border); }
.side-author__name { font-size: 15px; font-weight: 700; }
.cat-tree { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cat-tree__children { list-style: none; margin: 4px 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--border); padding-left: 10px; }
.cat-tree__link { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; font-size: 13px; color: var(--text-muted); }
.cat-tree__link svg { color: var(--accent); flex-shrink: 0; }
.cat-tree__link em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-dim); }
.cat-tree__link:hover { background: var(--bg-hover); color: var(--accent); }
.archive-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.archive-list a { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; font-size: 13px; color: var(--text-muted); }
.archive-list a svg { color: var(--accent); flex-shrink: 0; }
.archive-list a em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-dim); }
.archive-list a:hover { background: var(--bg-hover); color: var(--accent); }

/* 侧栏作者卡片（仅管理员）操作：单行显示 */
.side-author__actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-author__actions a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); padding: 4px 6px; border-radius: 7px; }
.side-author__actions a:hover { color: var(--accent); background: var(--bg-hover); }
.side-author__actions svg { color: var(--accent); flex-shrink: 0; }

/* 分享内联二维码 */
.article__share { flex-direction: column; align-items: flex-end; gap: 12px; }
.article__share-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); }
.article__share-qr img { width: 180px; height: 180px; border-radius: 8px; background: #fff; padding: 6px; }
.article__share-qr span { font-size: 12.5px; color: var(--text-dim); }

/* 隐藏属性优先（覆盖 display 规则） */
[hidden] { display: none !important; }

/* 主栏内的分类头/容器与文章等宽 */
.article-layout__main .cat-head,
.article-layout__main .cat-grid { max-width: none !important; width: 100%; margin-left: 0 !important; margin-right: 0 !important; }

/* 文章卡片：最小高度 + 分享二维码浮动不撑高 */
.article { min-height: 520px; display: flex; flex-direction: column; }
.article .article__content { flex: 1 0 auto; }
.article__share { position: relative; margin-top: auto; flex-direction: column; align-items: flex-end; gap: 12px; }
.article__share-qr { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 5; box-shadow: var(--shadow); }

/* 右下角悬浮搜索框 */
.float-actions { align-items: flex-end; }
.float-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; width: 280px; flex-wrap: wrap;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.float-search > svg { color: var(--text-dim); flex-shrink: 0; }
.float-search input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; outline: none;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 13.5px;
}
.float-search input:focus { border-color: var(--accent); }
.float-search button {
  height: 34px; padding: 0 14px; border-radius: 8px; border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 600; font-size: 13px;
}
.float-search .search-error { flex-basis: 100%; margin: 0; }
.float-search .search-error:empty { display: none; }

/* 退出登录按钮样式（与侧栏操作一致） */
.side-author__actions form { display: inline; }
.side-author__logout button,
.user-menu__logout {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 4px 6px; border-radius: 7px;
  color: var(--text-muted); font-size: 13px; cursor: pointer; font-family: inherit;
}
.user-menu__logout { width: 100%; text-align: left; }
.side-author__logout button:hover,
.user-menu__logout:hover { color: var(--a-red); background: var(--bg-hover); }
.side-author__logout button svg { color: var(--a-red); }
