
/* t8_sso */
/* ============================================================
   FDE共创邦 · 论坛主题融合
   将 FlatBB 默认橙色主题替换为 FDE 科技蓝风格，
   顶部导航与主站一致深色，卡片/按钮/字体对齐主站设计语言
   ============================================================ */

:root{
  /* 品牌色：与主站完全一致 */
  --brand:#0071bd;
  --brand-hover:#005a97;
  --brand-soft:#eaf4fb;
  --brand-text:#ffffff;

  /* 科技高光（青色辉光，与主站 --tech 一致） */
  --tech:#00d4ff;
  --tech-h:#33e0ff;
  --tech-soft:#e6fbff;
  --tech-deep:#0891b2;

  /* 背景与表面 */
  --bg:#f4f6f9;
  --panel:#ffffff;
  --panel-2:#f8f9fb;

  /* 文字层级（与主站对齐） */
  --text:#131821;
  --text-muted:#5a6472;
  --text-subtle:#8a93a1;
  --text-disabled:#c0c6d0;

  /* 线条（主站 --line / --line2） */
  --line:#e6e9ee;
  --line-soft:#eff1f4;
  --line2:#d3d8e0;

  /* 形状（与主站 --r / --rs 一致） */
  --radius:10px;
  --radius-sm:6px;

  /* 字体（与主站一致） */
  --font:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  --topbar-h:62px;
  --container:min(1600px, 88vw);
  --left-w:260px;
  --right-w:320px;
  --gap:32px;

  /* 光晕效果（与主站 --glow-soft 一致） */
  --glow-soft:0 0 36px -6px rgba(0,212,255,.55);
}

/* 强制覆盖容器宽度（优先级最高） */
.container{max-width:min(1600px,88vw) !important}

/* 强制覆盖三栏布局 */
.page-grid{
  grid-template-columns:var(--left-w) minmax(0,1fr) var(--right-w) !important;
  gap:var(--gap) !important;
}
/* 单侧栏页面（发帖 / 编辑这类 right=false）别被上面那条三栏 !important 压成三列留一条空栏 */
body.no-right .page-grid{ grid-template-columns:var(--left-w) minmax(0,1fr) !important; }
body.no-left .page-grid{ grid-template-columns:minmax(0,1fr) var(--right-w) !important; }
body.no-left.no-right .page-grid{ grid-template-columns:minmax(0,1fr) !important; max-width:900px !important; margin-left:auto; margin-right:auto; }

/* ---------- 顶部导航：深色科技风，与主站一致 ---------- */
.topbar .logo{
  color:#fff;
  font-weight:700;
  font-size:17px;
  letter-spacing:.3px;
}
.topbar .logo .logo-mark path{
  stroke:var(--tech);
}
.topnav a{
  color:rgba(255,255,255,.7);
  font-weight:500;
  font-size:14px;
  padding:6px 12px;
  border-radius:var(--radius-sm);
  transition:all .15s;
}
.topnav a .icon{
  opacity:.7;
}
.topnav a:hover{
  background:rgba(0,212,255,.12);
  color:#fff;
}
.topnav a.active{
  background:rgba(0,212,255,.18);
  color:#fff;
}
.topnav a.active .icon{
  opacity:1;
}
.topbar-right{
  gap:6px;
}
.topbar-right .search-form{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.5);
}
.topbar-right .search-form input{
  color:#fff;
}
.topbar-right .search-form input::placeholder{
  color:rgba(255,255,255,.4);
}
.topbar-right .search-form:focus-within{
  background:rgba(255,255,255,.12);
  border-color:var(--tech);
  box-shadow:0 0 0 3px rgba(0,212,255,.15);
}
.icon-btn{
  color:rgba(255,255,255,.7);
}
.icon-btn:hover{
  background:rgba(255,255,255,.1);
  color:#fff;
}
.dropdown-toggle{
  color:rgba(255,255,255,.85);
}
.dropdown-toggle:hover{
  color:#fff;
}
.btn-primary{
  background:linear-gradient(135deg,var(--brand),var(--tech-deep));
  border-color:transparent;
  color:#fff;
  font-weight:500;
  font-size:14.5px;
  padding:11px 20px;
  box-shadow:var(--glow-soft);
  transition:all .2s;
}
.btn-primary:hover{
  background:linear-gradient(135deg,var(--tech-deep),var(--brand));
  border-color:transparent;
  color:#fff;
  box-shadow:var(--glow-soft);
  transform:translateY(-1px);
}
.btn{
  border-radius:var(--radius-sm);
  font-weight:500;
  font-size:14.5px;
  padding:11px 20px;
}
.btn:hover{
  border-color:var(--line2);
}

/* ---------- 主体背景 ---------- */
html body{background:var(--bg);
  color:var(--text);
  font-size:14.5px;
  line-height:1.65;
}

/* ---------- 链接 ---------- */
a{color:var(--brand);text-decoration:none;transition:color .15s}
a:hover{color:var(--brand-hover);text-decoration:none}

/* ---------- 卡片风格 ---------- */
.card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--panel);
  box-shadow:0 1px 2px rgba(16,24,40,.03);
  transition:box-shadow .2s,border-color .2s,transform .2s;
}
.card:hover{
  box-shadow:0 8px 24px -8px rgba(16,24,40,.10);
  border-color:var(--line2);
}
.card-head{
  border-bottom:1px solid var(--line-soft);
  padding:12px 16px;
}
.card-head h3{
  font-size:14px;
  font-weight:650;
  color:var(--text);
}

/* ---------- 帖子列表行 ---------- */
.topic-row{
  border-bottom:1px solid var(--line-soft);
  padding:14px 0;
  transition:background .15s;
}
.topic-row:hover{
  background:var(--panel-2);
}
.topic-title{
  font-weight:600;
  color:var(--text);
  font-size:15px;
}
.topic-title:hover{
  color:var(--brand);
}

/* ---------- 侧边栏 ---------- */
.side-link{
  border-radius:var(--radius-sm);
  padding:8px 12px;
  font-size:14px;
  color:var(--text-muted);
  font-weight:500;
}
.side-link:hover{
  background:var(--panel);
  color:var(--text);
}
.side-link.active{
  background:var(--brand-soft);
  color:var(--brand);
  font-weight:600;
}

/* ---------- 标签/徽章 ---------- */
.tag-badge{
  background:var(--panel-2);
  border:1px solid var(--line);
  color:var(--text-muted);
  border-radius:var(--radius-pill);
  padding:2px 10px;
  font-size:12px;
  transition:all .15s;
}
.tag-badge:hover{
  background:var(--brand-soft);
  border-color:var(--brand);
  color:var(--brand);
}
.flag{
  background:var(--brand-soft);
  color:var(--brand);
  border-radius:4px;
  font-size:12px;
  font-weight:600;
  padding:2px 8px;
}

/* ---------- 输入框 ---------- */
input:not([type]),input[type="text"],input[type="search"],input[type="email"],
input[type="password"],input[type="number"],input[type="url"],input[type="file"],
select,textarea{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:9px 12px;
  transition:border-color .15s,box-shadow .15s;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand);
  outline:0;
  box-shadow:0 0 0 3px var(--brand-soft);
}

/* ---------- 页脚 ---------- */
.footer{
  background:#fff;
  border-top:1px solid var(--line);
  color:var(--text-muted);
  font-size:13px;
}
.footer a{
  color:var(--text-muted);
}
.footer a:hover{
  color:var(--brand);
}

/* ---------- 分类徽章 ---------- */
.cat-badge{
  font-weight:550;
  font-size:12.5px;
}

/* ---------- 分页 ---------- */
.pagination a,.pagination span{
  border-radius:var(--radius-sm);
  min-width:32px;
  height:32px;
  font-size:13px;
}
.pagination a:hover{
  border-color:var(--brand);
  color:var(--brand);
}
.pagination .current{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}

/* ---------- 帖子详情 ---------- */
.post{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:12px;
}
.post-content{
  color:var(--text);
  font-size:14.5px;
  line-height:1.75;
}
.post-content h1,.post-content h2,.post-content h3{
  color:var(--text);
  font-weight:650;
}
.post-content code{
  background:var(--panel-2);
  border:1px solid var(--line-soft);
  border-radius:4px;
  padding:.1em .4em;
  font-size:13px;
}
.post-content pre{
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs{
  font-size:13px;
  color:var(--text-subtle);
  margin-bottom:14px;
}
.breadcrumbs a{
  color:var(--text-muted);
}
.breadcrumbs a:hover{
  color:var(--brand);
}

/* ---------- 空状态 ---------- */
.empty{
  background:var(--panel);
  border:1px dashed var(--line);
  border-radius:var(--radius);
  color:var(--text-subtle);
}

/* ---------- 暗色模式适配（保持深色顶栏） ---------- */
[data-theme="dark"]{
  --bg:#0f172a;
  --panel:#1e293b;
  --panel-2:#172033;
  --line:#334155;
  --line-soft:#273449;
  --text:#e2e8f0;
  --text-muted:#94a3b8;
  --text-subtle:#64748b;
  --brand-soft:rgba(0,113,189,.25);
}
[data-theme="dark"] .card{
  border-color:var(--line);
}
[data-theme="dark"] .topbar{
  background:linear-gradient(180deg,#070c15 0%,#0f172a 100%);
  border-bottom-color:rgba(0,212,255,.2);
}
[data-theme="dark"] .footer{
  background:var(--panel);
  border-top-color:var(--line);
}
@media (prefers-color-scheme:dark){
  [data-theme="auto"]{
    --bg:#0f172a; --panel:#1e293b; --panel-2:#172033;
    --line:#334155; --line-soft:#273449;
    --text:#e2e8f0; --text-muted:#94a3b8; --text-subtle:#64748b;
    --brand-soft:rgba(0,113,189,.25);
  }
  [data-theme="auto"] .card{border-color:var(--line)}
  [data-theme="auto"] .topbar{
    background:linear-gradient(180deg,#070c15 0%,#0f172a 100%);
    border-bottom-color:rgba(0,212,255,.2);
  }
  [data-theme="auto"] .footer{background:var(--panel);border-top-color:var(--line)}
}

/* ============================================================
   P2 · 组件级深度融合（对齐主站设计语言）
   ============================================================ */

/* ---------- 圆角系统：从 10px 收窄到 6px，更接近主站锐利风格 ---------- */
:root{
  --radius:6px;
  --radius-sm:4px;
  --radius-pill:999px;
}

/* ---------- 正文字号：14.5px → 15px，行高 1.7，长帖更舒适 ---------- */
html body{
  font-size:15px;
  line-height:1.7;
}

/* ---------- 话题列表卡片化：从分隔线列表 → 白色卡片 ---------- */
.topic-rows .topic-row{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 18px;
  margin-bottom:10px;
  border-bottom:1px solid var(--line);
  transition:all .2s ease;
}
.topic-rows .topic-row:hover{
  background:var(--panel);
  border-color:var(--brand);
  box-shadow:0 4px 12px -4px rgba(0,113,189,.15);
  transform:translateY(-1px);
}
.topic-rows .topic-row:last-child{
  margin-bottom:0;
}

/* 话题标题字号与字重 */
.topic-title,
.row-title{
  font-size:16px;
  font-weight:600;
  line-height:1.5;
  color:var(--text);
}
.row-title a{
  color:var(--text);
  font-weight:600;
}
.row-title a:hover{
  color:var(--brand);
}

/* 话题元信息（作者/时间/回复数）更紧凑、更轻 */
.topic-meta,
.row-meta,
.meta{
  font-size:13px;
  color:var(--text-muted) !important;
  margin-top:8px;
}
.topic-meta .dot,
.row-meta .dot{
  color:var(--line);
  margin:0 6px;
}
.row-meta a,
.meta a{
  color:var(--text-muted) !important;
}
.row-meta a:hover,
.meta a:hover{
  color:var(--brand) !important;
}

/* ---------- 标签胶囊：与主站 chip 风格统一 ---------- */
.tag-badge{
  background:var(--tech-soft);
  border:1px solid transparent;
  color:var(--tech-deep);
  border-radius:var(--radius-pill);
  padding:3px 10px;
  font-size:12px;
  font-weight:500;
  transition:all .15s;
}
.tag-badge:hover{
  background:var(--brand-soft);
  border-color:var(--brand);
  color:var(--brand);
}

/* 分类徽章：左色条 + 浅底，更有识别度 */
.cat-badge{
  position:relative;
  padding-left:8px;
  font-weight:600;
  font-size:12.5px;
  color:var(--text-muted);
}
.cat-badge::before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:3px;
  height:12px;
  background:var(--brand);
  border-radius:2px;
}

/* ---------- 卡片 hover 效果增强：与主站一致的上移 + 阴影 ---------- */
.card{
  transition:box-shadow .2s ease,border-color .2s ease,transform .2s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px -8px rgba(16,24,40,.12);
}

/* ---------- 帖子详情卡片：padding 加大，呼吸感更强 ---------- */
.post{
  padding:20px 22px;
  border-radius:var(--radius);
  margin-bottom:14px;
}
.post-content{
  font-size:15px;
  line-height:1.75;
}
.post-content p{
  margin-bottom:14px;
}
.post-content h1{font-size:24px;margin-bottom:14px}
.post-content h2{font-size:20px;margin-bottom:12px}
.post-content h3{font-size:17px;margin-bottom:10px}

/* ---------- 侧边栏卡片：增加间距与层次 ---------- */
.side-nav + .card,
.col-left .card{
  margin-top:16px;
}
.col-left .card-head{
  padding:14px 18px;
  font-size:14px;
  font-weight:650;
}
.col-left .card-body{
  padding:14px 18px;
}

/* ---------- 侧栏链接：间距加大 ---------- */
.side-link{
  padding:10px 14px;
  font-size:14px;
  margin-bottom:2px;
}

/* ---------- 分页：更大、更易点 ---------- */
.pagination a,.pagination span{
  min-width:34px;
  height:34px;
  font-size:13.5px;
  font-weight:500;
}

/* ---------- 按钮：主站渐变风格增强 ---------- */
.btn-primary{
  padding:10px 22px;
  font-size:14.5px;
  font-weight:600;
  letter-spacing:.2px;
}

/* ---------- 输入框：focus 时青色辉光，与主站一致 ---------- */
input:focus,select:focus,textarea:focus{
  border-color:var(--tech-deep);
  box-shadow:0 0 0 3px rgba(0,212,255,.15);
}

/* ---------- 搜索框：顶部搜索框样式优化 ---------- */
.topbar-right .search-form:focus-within{
  border-color:var(--tech);
  box-shadow:0 0 0 3px rgba(0,212,255,.15);
}

/* ---------- 面包屑：更轻、更淡 ---------- */
.breadcrumbs{
  font-size:13px;
  margin-bottom:16px;
  color:var(--text-subtle);
}

/* ---------- 空状态：padding 加大 ---------- */
.empty{
  padding:40px 20px;
}

/* ---------- 暗色模式：P2 适配 ---------- */
[data-theme="dark"] .topic-row{
  background:var(--panel);
  border-color:var(--line);
}
[data-theme="dark"] .topic-row:hover{
  border-color:var(--tech-deep);
  box-shadow:0 4px 16px -4px rgba(0,212,255,.2);
}
[data-theme="dark"] .tag-badge{
  background:rgba(0,212,255,.12);
  color:var(--tech);
  border-color:transparent;
}
[data-theme="dark"] .tag-badge:hover{
  background:rgba(0,212,255,.2);
  color:var(--tech-h);
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] .topic-row{
    background:var(--panel);
    border-color:var(--line);
  }
  [data-theme="auto"] .topic-row:hover{
    border-color:var(--tech-deep);
    box-shadow:0 4px 16px -4px rgba(0,212,255,.2);
  }
  [data-theme="auto"] .tag-badge{
    background:rgba(0,212,255,.12);
    color:var(--tech);
    border-color:transparent;
  }
  [data-theme="auto"] .tag-badge:hover{
    background:rgba(0,212,255,.2);
    color:var(--tech-h);
  }
}

/* ---------- 响应式：移动端卡片 padding 收窄 ---------- */
@media (max-width:768px){
  .topic-rows .topic-row{
    padding:12px 14px;
  }
  .post{
    padding:14px 16px;
  }
  html body{
    font-size:14.5px;
  }
  .topic-title{
    font-size:15px;
  }
}

/* ============================================================
   P1 · 导航统一（双层结构：t8bar 一级 + topbar 二级）
   ============================================================ */

/* ---------- 变量：topbar 改为二级导航，高度收窄 ---------- */
body{
  --topbar-h:52px;
}

/* ---------- Topbar：深色主导航 → 浅色二级 Tab 栏 ---------- */
body .topbar{
  background:var(--panel) !important;
  border-bottom:1px solid var(--line);
  top:63px !important;
  z-index:90;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
  position:sticky;
}

/* 内容区下移：topbar 视觉上从 63px 开始，
   但文档流里只占自身高度，需要补 t8bar 的高度差 */
body .page-grid{
  padding-top:calc(20px + 63px) !important;
}

/* 🔴 2026-10-23 移动端修复：上面那条三栏 !important 在窄屏会把 col-main 挤成 260px、
   col-right（320px）直接溢出屏外被 overflow-x:hidden 切掉 => 列表只剩 2/3 宽度。
   992 以下统一单列 + 容器满宽。 */
@media (max-width: 992px){
  .container{ max-width:100% !important; padding-left:12px; padding-right:12px; }
  .page-grid, body .page-grid,
  body.no-right .page-grid, body.no-left .page-grid, body.no-left.no-right .page-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:0 !important;
  }
  body .page-grid{ padding-top:calc(14px + 63px) !important; }
  /* 分类条用负 margin 铺到屏幕边，负值要跟容器 padding 对齐，否则右侧多出几条像素 */
  .cat-bar, .cat-bar-mobile{ margin-left:-12px !important; margin-right:-12px !important; }
}
@media (max-width: 640px){
  .container{ padding-left:8px; padding-right:8px; }
  .cat-bar, .cat-bar-mobile{ margin-left:-8px !important; margin-right:-8px !important; }
}

/* 去掉 Logo（t8bar 已有，避免重复） */
body .topbar .logo{
  display:none !important;
}

/* 二级导航文字：深色 */
body .topbar .topnav a{
  color:var(--text-muted) !important;
  font-weight:500;
  font-size:14px;
  padding:6px 14px;
  border-radius:var(--radius);
  transition:all .15s;
}
body .topbar .topnav a:hover{
  background:var(--panel-2) !important;
  color:var(--text) !important;
}
body .topbar .topnav a.is-active,
body .topbar .topnav a[aria-current="page"],
body .topbar .topnav a.active{
  background:var(--brand-soft) !important;
  color:var(--brand) !important;
  font-weight:600;
}

/* 右侧搜索框：浅色背景 */
body .topbar .topbar-right .search-form{
  background:var(--panel-2) !important;
  border:1px solid var(--line) !important;
  color:var(--text-muted) !important;
}
body .topbar .topbar-right .search-form input{
  color:var(--text) !important;
}
body .topbar .topbar-right .search-form input::placeholder{
  color:var(--text-subtle) !important;
}
body .topbar .topbar-right .search-form:focus-within{
  background:var(--panel) !important;
  border-color:var(--tech) !important;
  box-shadow:0 0 0 3px rgba(0,212,255,.15) !important;
}

/* 主题切换按钮：深色图标适配浅色背景 */
body .topbar .icon-btn{
  color:var(--text-muted) !important;
}
body .topbar .icon-btn:hover{
  background:var(--panel-2) !important;
  color:var(--text) !important;
}

/* 列表页自带的 tabs：隐藏（已移到 topbar 二级导航） */
body .list-head .tabs{
  display:none !important;
}

/* 论坛自带登录/注册卡片：隐藏（统一走主站 SSO，t8bar 已有入口） */
body .card-login{
  display:none !important;
}

/* 侧栏主导航：隐藏（二级导航已承担最新/热门/分类/标签入口，避免重复）
   保留分类列表、标签云等内容区块 */
body .col-left > .side-nav:not(.drawer-nav){
  display:none !important;
}

/* ---------- 侧栏 section 标题：颜色+字号统一 ---------- */
body .side-section h3,
body .side-section h4,
body .side-section > *:first-child{
  font-size:12px !important;
  font-weight:600 !important;
  color:var(--text-muted) !important;
  letter-spacing:.5px;
  text-transform:none;
}

/* ---------- 分类行卡片化（与话题列表风格一致） ---------- */
body .category-row{
  background:var(--panel) !important;
  border:1px solid var(--line) !important;
  border-radius:var(--radius) !important;
  padding:16px 18px !important;
  margin-bottom:10px !important;
  transition:all .2s ease;
}
body .category-row:hover{
  border-color:var(--brand) !important;
  box-shadow:0 4px 12px -4px rgba(0,113,189,.15);
  transform:translateY(-1px);
}
body .category-row:last-child{
  margin-bottom:0 !important;
}

/* 分类标题 */
body .category-row h3,
body .category-row .cat-name,
body .cat-text h4{
  font-size:16px !important;
  font-weight:600 !important;
  color:var(--text) !important;
  margin-bottom:6px;
}

/* 分类描述：字号放大 */
body .category-row p,
body .cat-desc,
body .cat-text p{
  font-size:13px !important;
  color:var(--text-muted) !important;
  line-height:1.6;
  margin:0;
}

/* ---------- 统计卡片数字：品牌蓝 + 更大 ---------- */
body .stat-list b,
body .card-stats b,
body .stats b{
  color:var(--brand) !important;
  font-size:18px !important;
  font-weight:700 !important;
}
body .stat-list li span,
body .card-stats li span{
  color:var(--text-muted);
  font-size:13px;
}

/* 暗色模式适配 */
[data-theme="dark"] body .category-row{
  background:var(--panel) !important;
  border-color:var(--line) !important;
}
[data-theme="dark"] body .category-row:hover{
  border-color:var(--tech-deep) !important;
  box-shadow:0 4px 16px -4px rgba(0,212,255,.2);
}
[data-theme="dark"] body .stat-list b,
[data-theme="dark"] body .card-stats b,
[data-theme="dark"] body .stats b{
  color:var(--tech) !important;
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] body .category-row{
    background:var(--panel) !important;
    border-color:var(--line) !important;
  }
  [data-theme="auto"] body .category-row:hover{
    border-color:var(--tech-deep) !important;
    box-shadow:0 4px 16px -4px rgba(0,212,255,.2);
  }
  [data-theme="auto"] body .stat-list b,
  [data-theme="auto"] body .card-stats b,
  [data-theme="auto"] body .stats b{
    color:var(--tech) !important;
  }
}

/* ============================================================
   P1 · 体验优化
   ============================================================ */

/* ---------- 二级导航：非 active 更浅，active 对比更强 ---------- */
body .topbar .topnav a{
  color:var(--text-subtle) !important;
}
body .topbar .topnav a:hover{
  color:var(--text) !important;
  background:var(--panel-2) !important;
}
body .topbar .topnav a.is-active,
body .topbar .topnav a[aria-current="page"],
body .topbar .topnav a.active{
  color:var(--brand) !important;
  background:var(--brand-soft) !important;
  font-weight:600;
}

/* ---------- 侧栏链接 hover 态统一 ---------- */
body .side-link{
  transition:all .15s;
  border-radius:var(--radius-sm);
}
body .side-link:hover{
  background:var(--panel-2) !important;
  color:var(--brand) !important;
}
body .side-link.active{
  background:var(--brand-soft) !important;
  color:var(--brand) !important;
  font-weight:600;
}

/* ---------- 帖子详情：代码块 / 引用块 ---------- */
body .post-content blockquote{
  border-left:3px solid var(--brand);
  background:var(--brand-soft);
  padding:12px 16px;
  margin:14px 0;
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  color:var(--text-muted);
  font-size:14.5px;
}
body .post-content code{
  background:var(--panel-2);
  border:1px solid var(--line);
  padding:2px 6px;
  border-radius:4px;
  font-size:13.5px;
  color:var(--brand);
  font-family:Consolas,"SF Mono",Monaco,monospace;
}
body .post-content pre{
  background:#0f172a;
  color:#e2e8f0;
  padding:16px 18px;
  border-radius:var(--radius);
  overflow-x:auto;
  margin:14px 0;
  font-size:13.5px;
  line-height:1.6;
}
body .post-content pre code{
  background:transparent;
  border:none;
  padding:0;
  color:inherit;
  font-size:inherit;
}

/* 暗色模式：帖子详情元素适配 */
[data-theme="dark"] body .post-content blockquote{
  border-left-color:var(--tech);
  background:rgba(0,212,255,.08);
  color:var(--text-muted);
}
[data-theme="dark"] body .post-content code{
  background:var(--panel-2);
  border-color:var(--line);
  color:var(--tech);
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] body .post-content blockquote{
    border-left-color:var(--tech);
    background:rgba(0,212,255,.08);
    color:var(--text-muted);
  }
  [data-theme="auto"] body .post-content code{
    background:var(--panel-2);
    border-color:var(--line);
    color:var(--tech);
  }
}

/* ============================================================
   P2 · 细节打磨
   ============================================================ */

/* ---------- 选中文字：品牌色 ---------- */
::selection{
  background:var(--brand);
  color:#fff;
}
::-moz-selection{
  background:var(--brand);
  color:#fff;
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar{
  width:8px;
  height:8px;
}
::-webkit-scrollbar-track{
  background:transparent;
}
::-webkit-scrollbar-thumb{
  background:var(--line2);
  border-radius:4px;
  transition:background .2s;
}
::-webkit-scrollbar-thumb:hover{
  background:var(--text-subtle);
}

/* 暗色模式滚动条 */
[data-theme="dark"] ::-webkit-scrollbar-thumb{
  background:#3a4150;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{
  background:#4a5568;
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] ::-webkit-scrollbar-thumb{
    background:#3a4150;
  }
  [data-theme="auto"] ::-webkit-scrollbar-thumb:hover{
    background:#4a5568;
  }
}

/* 分页：active 用品牌色背景+白字，更突出 */
body .pagination a,
body .pagination span{
  min-width:34px;
  height:34px;
  font-size:13.5px;
  font-weight:500;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text-muted);
  transition:all .15s;
}
body .pagination a:hover{
  border-color:var(--brand);
  color:var(--brand);
  background:var(--brand-soft);
}
body .pagination .is-active,
body .pagination .current,
body .pagination .page-cur,
body .pagination span.current,
body .pagination span.page-cur{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  font-weight:600;
}

/* 暗色模式：分页适配 */
[data-theme="dark"] body .pagination a,
[data-theme="dark"] body .pagination span{
  background:var(--panel);
  border-color:var(--line);
  color:var(--text-muted);
}
[data-theme="dark"] body .pagination a:hover{
  border-color:var(--tech-deep);
  color:var(--tech);
  background:rgba(0,212,255,.1);
}
[data-theme="dark"] body .pagination .is-active,
[data-theme="dark"] body .pagination .current,
[data-theme="dark"] body .pagination .page-cur,
[data-theme="dark"] body .pagination span.current,
[data-theme="dark"] body .pagination span.page-cur{
  background:var(--tech-deep);
  border-color:var(--tech-deep);
  color:#fff;
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] body .pagination a,
  [data-theme="auto"] body .pagination span{
    background:var(--panel);
    border-color:var(--line);
    color:var(--text-muted);
  }
  [data-theme="auto"] body .pagination a:hover{
    border-color:var(--tech-deep);
    color:var(--tech);
    background:rgba(0,212,255,.1);
  }
  [data-theme="auto"] body .pagination .is-active,
  [data-theme="auto"] body .pagination .current,
  [data-theme="auto"] body .pagination .page-cur,
  [data-theme="auto"] body .pagination span.current,
  [data-theme="auto"] body .pagination span.page-cur{
    background:var(--tech-deep);
    border-color:var(--tech-deep);
    color:#fff;
  }
}

/* ---------- 暗色模式：P1 适配 ---------- */
[data-theme="dark"] body .topbar{
  background:var(--panel) !important;
  border-bottom-color:var(--line);
}
[data-theme="dark"] body .topbar .topnav a{
  color:var(--text-muted) !important;
}
[data-theme="dark"] body .topbar .topnav a:hover{
  background:var(--panel-2) !important;
  color:var(--text) !important;
}
[data-theme="dark"] body .topbar .topnav a.is-active,
[data-theme="dark"] body .topbar .topnav a[aria-current="page"],
[data-theme="dark"] body .topbar .topnav a.active{
  background:rgba(0,212,255,.15) !important;
  color:var(--tech) !important;
}

@media (prefers-color-scheme:dark){
  [data-theme="auto"] body .topbar{
    background:var(--panel) !important;
    border-bottom-color:var(--line);
  }
  [data-theme="auto"] body .topbar .topnav a{
    color:var(--text-muted) !important;
  }
  [data-theme="auto"] body .topbar .topnav a:hover{
    background:var(--panel-2) !important;
    color:var(--text) !important;
  }
  [data-theme="auto"] body .topbar .topnav a.is-active,
  [data-theme="auto"] body .topbar .topnav a[aria-current="page"],
  [data-theme="auto"] body .topbar .topnav a.active{
    background:rgba(0,212,255,.15) !important;
    color:var(--tech) !important;
  }
}

/* ---------- 响应式：移动端 ---------- */
@media (max-width:768px){
  body{
    --topbar-h:48px;
  }
  body .topbar{
    top:63px !important;
  }
  body .topbar .topnav a{
    padding:6px 10px;
    font-size:13.5px;
  }
}

/* ============================================================
   P3 · 版面重整（与主站同一套呼吸节奏）
   1) 内容宽 1200 / 三栏比例  2) 二级栏深色并接 t8bar
   3) 首页版头  4) 左栏分类  5) 列表行  6) 右栏卡片  7) 深色页脚
   ============================================================ */

/* ---------- 1. 宽度节奏（对齐主站 --maxw:1200） ---------- */
body{
  --container:1200px;
  --left-w:184px;
  --right-w:300px;
  --gap:24px;
}
body .container{ max-width:1200px !important; }
@media (max-width:1240px){
  body .container{ max-width:100% !important; }
}

/* ---------- 2. 二级导航深色：与 t8bar 连成一条深色头部带 ---------- */
body .topbar{
  background:#0b121e !important;
  border-bottom:1px solid rgba(0,212,255,.10) !important;
  box-shadow:none !important;
}
body .topbar .topnav a{
  color:rgba(255,255,255,.64) !important;
  font-size:13.5px;
  letter-spacing:.2px;
}
body .topbar .topnav a:hover{
  background:rgba(255,255,255,.07) !important;
  color:#fff !important;
}
body .topbar .topnav a.is-active,
body .topbar .topnav a[aria-current="page"],
body .topbar .topnav a.active{
  background:rgba(0,212,255,.14) !important;
  color:#7fe9ff !important;
}
body .topbar .topbar-right .search-form{
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:rgba(255,255,255,.55) !important;
}
body .topbar .topbar-right .search-form input{
  background:transparent !important;
  color:#fff !important;
}
body .topbar .topbar-right .search-form input::placeholder{
  color:rgba(255,255,255,.38) !important;
}
body .topbar .topbar-right .search-form:focus-within{
  background:rgba(255,255,255,.1) !important;
  border-color:rgba(0,212,255,.55) !important;
  box-shadow:0 0 0 3px rgba(0,212,255,.12) !important;
}
body .topbar .icon-btn{
  color:rgba(255,255,255,.7) !important;
}
body .topbar .icon-btn:hover{
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
}
body .topbar .dropdown-toggle{
  color:rgba(255,255,255,.8) !important;
}

/* ---------- 3. 首页版头（page.top region） ---------- */
.t8-hero{
  position:relative;
  overflow:hidden;
  /* t8bar 是 fixed（不占文档流），顶部 63px 给它让位，否则版头会被压掉一截 */
  padding-top:63px;
  background:linear-gradient(118deg,#0b121e 0%,#132238 62%,#0d1a2b 100%);
  border-bottom:1px solid rgba(0,212,255,.14);
}
.t8-hero::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image:linear-gradient(rgba(0,212,255,.06) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(0,212,255,.06) 1px,transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:radial-gradient(125% 130% at 16% 0%,#000 24%,transparent 74%);
  mask-image:radial-gradient(125% 130% at 16% 0%,#000 24%,transparent 74%);
}
.t8-hero::after{
  content:""; position:absolute; right:-70px; top:-160px; width:430px; height:430px;
  background:radial-gradient(circle,rgba(0,212,255,.16),transparent 62%);
  pointer-events:none;
}
.t8-hero-in{
  position:relative; z-index:1;
  max-width:1200px; margin:0 auto; padding:30px 20px 32px;
  display:flex; align-items:flex-end; justify-content:space-between; gap:28px;
}
.t8-hero-kicker{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--mono); font-size:11.5px; letter-spacing:1.5px;
  color:#7fe9ff; text-transform:uppercase;
}
.t8-hero-kicker::before{ content:""; width:18px; height:1px; background:#00d4ff; }
.t8-hero-title{
  margin:11px 0 8px; color:#fff; font-size:27px; line-height:1.28;
  font-weight:700; letter-spacing:.2px;
}
.t8-hero-sub{
  margin:0; max-width:560px; color:rgba(255,255,255,.56);
  font-size:13.5px; line-height:1.65;
}
.t8-hero-r{ display:flex; align-items:center; gap:24px; flex:none; }
.t8-hero-stats{ display:flex; align-items:center; }
.t8-hero-stats > div{ min-width:56px; text-align:center; }
.t8-hero-stats > div + div{ position:relative; padding-left:22px; }
.t8-hero-stats > div + div::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:1px; height:26px; background:rgba(255,255,255,.12);
}
.t8-hero-stats b{
  display:block; color:#fff; font-family:var(--mono); font-size:19px;
  font-weight:600; line-height:1.2; font-variant-numeric:tabular-nums;
}
.t8-hero-stats span{ font-size:11.5px; color:rgba(255,255,255,.45); letter-spacing:.6px; }
.t8-hero-cta{
  display:inline-flex; align-items:center; gap:7px; white-space:nowrap;
  padding:10px 18px; border-radius:8px;
  background:linear-gradient(135deg,#0071bd,#0891b2); color:#fff !important;
  font-size:13.5px; font-weight:600;
  box-shadow:0 8px 22px -10px rgba(0,212,255,.7);
  transition:transform .15s, box-shadow .15s, filter .15s;
}
.t8-hero-cta:hover{
  transform:translateY(-1px); filter:brightness(1.06); color:#fff !important;
  box-shadow:0 12px 30px -10px rgba(0,212,255,.85);
}
.t8-hero-cta .icon{ width:15px; height:15px; }
@media (max-width:900px){
  .t8-hero-in{ flex-direction:column; align-items:flex-start; gap:16px; padding:18px 16px 20px; }
  .t8-hero-title{ font-size:20px; margin:8px 0 6px; }
  .t8-hero-sub{ font-size:12.5px; line-height:1.55; }
  .t8-hero-r{ width:100%; justify-content:space-between; gap:12px; }
  .t8-hero-stats > div{ min-width:0; }
  .t8-hero-stats > div + div{ padding-left:16px; }
  .t8-hero-stats b{ font-size:16.5px; }
  .t8-hero-cta{ padding:8px 14px; font-size:13px; }
}

/* ---------- 4. 左栏：分类 / 标签 ---------- */
body .side-section{ margin-top:22px; }
body .side-section h4{
  font-size:11px !important; font-weight:600 !important;
  letter-spacing:1.2px; color:var(--text-subtle) !important;
  margin:0 0 8px !important; padding-left:10px !important;
}
body .side-section .cat-link{
  display:flex; align-items:center; gap:8px;
  padding:7px 10px !important; border-radius:6px;
  font-size:13.5px !important; color:var(--text-muted) !important;
  transition:background .14s, color .14s;
}
body .side-section .cat-link .icon,
body .side-section .cat-link svg{ width:14px; height:14px; opacity:.55; flex:none; }
body .side-section .cat-link small{
  margin-left:auto; font-family:var(--mono); font-size:11.5px;
  color:var(--text-subtle); font-variant-numeric:tabular-nums;
}
body .side-section .cat-link:hover{ background:var(--panel-2) !important; color:var(--brand) !important; }
body .side-section .cat-link:hover .icon{ opacity:1; }
body .side-section .cat-link.active{
  background:var(--brand-soft) !important; color:var(--brand) !important;
  font-weight:600; box-shadow:inset 2px 0 0 var(--brand);
}
body .side-section .cat-link.active small{ color:var(--brand); }
body .side-section .cat-child{ padding-left:24px !important; }
body .tag-cloud{ display:flex; flex-wrap:wrap; gap:6px; padding-left:10px; }
body .tag-cloud .tag-badge{
  background:var(--panel) !important; border:1px solid var(--line2) !important;
  color:var(--text-muted) !important; border-radius:4px !important;
  padding:3px 9px !important; font-size:12px; line-height:1.5;
}
body .tag-cloud .tag-badge:hover{
  border-color:var(--brand) !important; color:var(--brand) !important;
  background:var(--brand-soft) !important;
}
@media (min-width:993px){
  body .col-left{ position:sticky; top:calc(63px + 52px + 18px); align-self:start; }
  /* 右栏也跟随：长列表滚到底时右侧不再留一条空白（内容高 800 左右，仍在视口内） */
  body .col-right{ position:sticky; top:calc(63px + 52px + 18px); align-self:start; }
}

/* ---------- 4b. 发帖 / 编辑页：撰写区跟着屏高长，别一屏只占上半截 ---------- */
body.page-compose .compose-new .editor-input,
body.page-compose .compose-new .editor-preview{ min-height:220px; }

/* ---------- 5. 列表行 ---------- */
body .list-card{ border-radius:10px; }
body .topic-rows .topic-row{
  align-items:flex-start; gap:14px;
  padding:15px 18px !important;
  border-bottom:1px solid var(--line-soft);
  transition:background .14s, box-shadow .14s;
}
body .topic-rows .topic-row:hover{ background:#f3f7fb; box-shadow:inset 2px 0 0 var(--brand); }
body .topic-rows .topic-row.pinned,
body .topic-rows .topic-row.pinned:hover{ box-shadow:inset 2px 0 0 rgba(245,158,11,.7); }
body .topic-rows .topic-row:last-child{ border-bottom:0; }
body .row-title{ font-size:15px !important; font-weight:600; line-height:1.5; }
body .row-title a{ color:var(--text); }
body .topic-row:hover .row-title a{ color:var(--brand); }
body .row-meta{ margin-top:6px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; }
body .row-meta .meta{ display:inline-flex; align-items:center; gap:4px; font-size:12.5px; color:var(--text-subtle); }
body .row-meta .meta .icon{ width:13px; height:13px; opacity:.7; }
body .row-meta .row-tag{ color:var(--text-subtle); background:none; border:0; padding:0; font-size:12px; }
body .row-meta .row-tag:hover{ color:var(--brand); }
body .row-meta .row-time{ font-variant-numeric:tabular-nums; }
body .row-cat{
  margin-left:auto; flex:none; align-self:flex-start; margin-top:2px;
  padding:2px 8px !important; border-radius:4px;
  background:var(--panel-2); border:1px solid var(--line);
  font-size:11.5px !important; color:var(--text-muted) !important;
}
body .row-cat:hover{ border-color:var(--brand) !important; color:var(--brand) !important; }

/* ---------- 5b. 整行可点：标题链接的伪元素铺满整行 ----------
   以前只有标题那几个字是链接，点行内空白没反应。行内其它链接（头像 / 作者 / 时间 / 标签 / 分类）
   提到上层，仍能单独点，互不吞。 */
body .topic-rows .topic-row{ position:relative; }
body .topic-rows .topic-row .row-title > a::after{
  content:""; position:absolute; inset:0; z-index:1; border-radius:inherit;
}
body .topic-rows .topic-row .row-meta a,
body .topic-rows .topic-row .row-cat,
body .topic-rows .topic-row .row-avatar a{ position:relative; z-index:2; }

/* ---------- 5c. 发帖页：页头 + 三块卡片 + 控件统一节奏 ---------- */
.t8-cmp-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:18px;
  padding:0 0 11px; margin-bottom:12px;
  border-bottom:1px solid var(--line-soft);
}
.t8-cmp-kicker{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--mono); font-size:11.5px; letter-spacing:1.4px;
  color:var(--brand); text-transform:uppercase;
}
.t8-cmp-kicker::before{ content:""; width:16px; height:1px; background:var(--brand); }
body .t8-cmp-head h1{
  margin:4px 0 4px !important; font-size:24px !important; line-height:1.25;
  font-weight:700; letter-spacing:.2px; color:var(--text);
}
body .t8-cmp-head p{ margin:0; font-size:12.5px; color:var(--text-muted); }
body .t8-cmp-guide{
  flex:none; display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px; border-radius:999px; font-size:12px; font-weight:500;
  color:var(--brand); background:var(--brand-soft); border:1px solid transparent;
  text-decoration:none; transition:background .15s, border-color .15s;
}
body .t8-cmp-guide:hover{ background:var(--panel); border-color:var(--brand); }
body .t8-cmp-guide .icon{ width:14px; height:14px; }

/* 表单：三块卡片（标题 / 分类·标签 / 正文），间距 14 */
body.page-compose .compose-new form{ display:flex; flex-direction:column; gap:12px; }
body.page-compose .compose-new form > .form-row,
body.page-compose .compose-new form > .form-grid,
body.page-compose .compose-new form > .editor,
body.page-compose .compose-new form > .form-actions{ margin:0 !important; }
body.page-compose .compose-new form > .form-row:first-of-type,
body.page-compose .compose-new .form-grid{
  background:var(--panel); border:1px solid var(--line); border-radius:10px;
  padding:13px 16px;
}
body.page-compose .compose-new .form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* 控件：与主站表单同一套（高 42 / 圆角 6 / focus 品牌蓝 + 光晕） */
body.page-compose .compose-new .form-row label{
  display:block; margin-bottom:5px; font-size:12px; font-weight:600;
  letter-spacing:.3px; color:var(--text-muted);
}
body.page-compose .compose-new .input-lg,
body.page-compose .compose-new .form-row input[type=text],
body.page-compose .compose-new .form-row select{
  width:100%; height:42px; padding:0 13px; border-radius:6px;
  border:1px solid var(--line); background:var(--panel); color:var(--text);
  font-size:14px; transition:border-color .15s, box-shadow .15s;
}
body.page-compose .compose-new .input-lg{ height:46px; font-size:16px; font-weight:600; letter-spacing:.1px; }
body.page-compose .compose-new .input-lg::placeholder{ font-weight:400; color:var(--text-subtle); }
body.page-compose .compose-new .input-lg:focus,
body.page-compose .compose-new .form-row input[type=text]:focus,
body.page-compose .compose-new .form-row select:focus{
  outline:0; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft);
}
/* 每个字段后面跟一句人话说明 */
body.page-compose .compose-new form > .form-row:first-of-type::after,
body.page-compose .compose-new .form-grid .form-row::after{
  display:block; margin-top:5px; font-size:11.5px; line-height:1.45; color:var(--text-subtle);
}
body.page-compose .compose-new form > .form-row:first-of-type::after{ content:"建议 15–40 字：带上模块名或报错关键字，后来人才搜得到"; }
body.page-compose .compose-new .form-grid .form-row:nth-child(1)::after{ content:"决定这条讨论归到哪个板块"; }
body.page-compose .compose-new .form-grid .form-row:nth-child(2)::after{ content:"最多 5 个，英文逗号分隔；标签会把同类讨论串起来"; }

/* 正文编辑器：工具栏与状态栏压深一档，正文区给足高度 */
body.page-compose .compose-new .editor{ border-radius:10px; overflow:hidden; background:var(--panel); }
body.page-compose .compose-new .editor-toolbar{ background:var(--panel-2); padding:7px 8px; gap:3px; }
body.page-compose .compose-new .editor-input{
  padding:12px 16px; font-family:var(--font); font-size:14.5px; line-height:1.7;
}
body.page-compose .compose-new .editor-foot{ background:var(--panel-2); padding:7px 12px; }

/* 动作条：左侧一句自动存草稿的提示，右侧主次按钮 */
body.page-compose .compose-new .form-actions{ display:flex; align-items:center; gap:10px; margin-top:2px; }
body.page-compose .compose-new .form-actions::before{
  content:"内容会自动存草稿，下次进来可恢复"; margin-right:auto;
  font-size:11.5px; color:var(--text-subtle);
}
body.page-compose .compose-new .form-actions .btn{ height:38px; line-height:38px; padding:0 20px; border-radius:6px; font-size:14px; }
body.page-compose .compose-new .form-actions .btn-primary{ box-shadow:0 6px 16px -8px rgba(0,113,189,.65); }
body.page-compose .compose-new .form-actions .btn-primary:hover{ box-shadow:0 8px 20px -8px rgba(0,113,189,.75); }
body.page-compose .compose-new .form-actions .btn-ghost{ color:var(--text-muted); }
body.page-compose .compose-new .form-actions .btn-ghost:hover{ color:var(--text); background:var(--panel-2); }

/* 左栏「发帖小贴士」 */
body .t8-tips{ margin:0; padding:0; list-style:none; counter-reset:tip; }
body .t8-tips li{
  position:relative; padding-left:23px; margin-bottom:10px;
  font-size:12.5px; line-height:1.62; color:var(--text-muted);
}
body .t8-tips li:last-child{ margin-bottom:0; }
body .t8-tips li::before{
  counter-increment:tip; content:counter(tip);
  position:absolute; left:0; top:1px; width:16px; height:16px; border-radius:5px;
  background:var(--brand-soft); color:var(--brand);
  font-size:10.5px; font-weight:700; display:flex; align-items:center; justify-content:center;
}
body .t8-tips code{ padding:1px 5px; border-radius:4px; background:var(--panel-2); font-size:11.5px; }

/* ---------- 5d. 发帖页「一屏呈现」：桌面端编辑区吃掉剩余高度，页面不出滚动条 ---------- */
@media (min-width:993px){
  body.page-compose .compose-new{
    display:flex; flex-direction:column;
    /* 视口 −（二级栏 52 + 内容上 padding 83 + 网格下 padding 12 + 页脚 58）＝ 205，留 1px 余量 */
    height:calc(100vh - 206px); min-height:320px;
  }
  body.page-compose .compose-new .t8-cmp-head{ flex:none; }
  /* 发帖页把页脚前的两层空白收掉，省下来的高度全给编辑区 */
  body.page-compose .page-grid{ padding-bottom:12px !important; }
  body.page-compose .footer{ margin-top:0 !important; }
  body.page-compose .compose-new form{ flex:1 1 auto; min-height:0; }
  body.page-compose .compose-new .editor{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
  body.page-compose .compose-new .editor-body{ flex:1 1 auto; min-height:0; }
  body.page-compose .compose-new .editor-input{ height:100%; min-height:0; resize:none; }
  body.page-compose .compose-new .editor-preview{ min-height:0; }
}
/* 窗口矮：先舍辅助文案，把高度让给正文 */
@media (min-width:993px) and (max-height:820px){
  body.page-compose .compose-new .t8-cmp-head p{ display:none; }
  body.page-compose .compose-new form > .form-row:first-of-type::after,
  body.page-compose .compose-new .form-grid .form-row::after{ display:none; }
  /* 左栏比正文还高会把整页顶出滚动条：矮窗口先收起小贴士（写帖时用不到） */
  body.page-compose .card-tips{ display:none; }
}
/* 更矮（笔记本半屏 / 缩放 150% 的窗口）：页头与卡片一起收，保编辑区还能写字 */
@media (min-width:993px) and (max-height:790px){
  body.page-compose .compose-new .t8-cmp-kicker{ display:none; }
  body.page-compose .compose-new .t8-cmp-head{ padding-bottom:8px; margin-bottom:8px; }
  body.page-compose .compose-new .t8-cmp-head h1{ font-size:20px !important; margin:0 0 3px !important; }
  body.page-compose .compose-new form{ gap:8px; }
  body.page-compose .compose-new form > .form-row:first-of-type,
  body.page-compose .compose-new .form-grid{ padding:10px 14px; }
  body.page-compose .compose-new .input-lg{ height:42px; font-size:15px; }
  body.page-compose .compose-new .form-row input[type=text],
  body.page-compose .compose-new .form-row select{ height:38px; }
  body.page-compose .compose-new .form-actions .btn{ height:34px; line-height:34px; }
  body.page-compose .compose-new .editor-foot{ padding:5px 12px; }
  body.page-compose .compose-new .editor-toolbar{ padding:5px 6px; }
  body.page-compose .side-tags{ display:none; }
}
/* 极矮（半屏窗口 / 150% 缩放）：连字段标题都省，只留输入框本身，把高度全让给正文 */
@media (min-width:993px) and (max-height:660px){
  body.page-compose .compose-new .t8-cmp-head h1{ font-size:18px !important; }
  body.page-compose .compose-new form{ gap:6px; }
  body.page-compose .compose-new form > .form-row:first-of-type,
  body.page-compose .compose-new .form-grid{ padding:8px 12px; }
  /* 字段名与控件同排：省一整行高度，但「分类 / 标签」两个词还在，不至于认不出来 */
  body.page-compose .compose-new .form-grid .form-row{ display:flex; align-items:center; gap:8px; }
  body.page-compose .compose-new .form-grid .form-row label{ flex:none; margin:0; font-size:11.5px; }
  body.page-compose .compose-new .form-grid .form-row > select,
  body.page-compose .compose-new .form-grid .form-row > input{ flex:1 1 auto; min-width:0; }
  body.page-compose .compose-new .input-lg{ height:38px; font-size:14.5px; }
  body.page-compose .compose-new .form-row input[type=text],
  body.page-compose .compose-new .form-row select{ height:36px; }
  body.page-compose .compose-new .form-actions .btn{ height:30px; line-height:30px; font-size:13px; }
  body.page-compose .compose-new .t8-cmp-guide{ padding:4px 10px; font-size:11.5px; }
}

@media (max-width:768px){
  .t8-cmp-head{ flex-direction:column; align-items:flex-start; gap:12px; }
  body.page-compose .compose-new .form-grid{ grid-template-columns:1fr; }
  body.page-compose .compose-new .form-actions::before{ display:none; }
}
body .row-avatar .avatar{ border-radius:50%; box-shadow:0 0 0 1px var(--line); }
body .empty{ padding:52px 20px; color:var(--text-subtle); }

/* ---------- 6. 右栏卡片 ---------- */
body .card{ border-radius:10px; box-shadow:none; }
body .card:hover{ box-shadow:none; border-color:var(--line); }
body .card-head{ padding:12px 16px !important; border-bottom:1px solid var(--line-soft); }
body .card-head h3{ font-size:13px !important; font-weight:600; letter-spacing:.3px; color:var(--text); }
body .card-body{ padding:16px; }
body .card-stats .card-body{ padding:4px 16px !important; }
body .stat-list li{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0 !important; border-bottom:1px solid var(--line-soft);
}
body .stat-list li:last-child{ border-bottom:0; }
body .stat-list b{
  font-family:var(--mono); font-size:15px !important; font-weight:600 !important;
  color:var(--brand) !important; font-variant-numeric:tabular-nums;
}
body .stat-list li span{ font-size:12.5px !important; color:var(--text-muted); }
body .newest-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:4px !important; }
body .newest-item{
  display:flex; flex-direction:row; align-items:center; gap:8px; padding:5px 6px;
  border-radius:6px; font-size:12.5px; color:var(--text-muted);
  transition:background .14s, color .14s;
}
body .newest-item:hover{ background:var(--panel-2); color:var(--brand); }
body .newest-item .avatar{ width:28px !important; height:28px !important; --s:28px; border-radius:50%; border:0; font-size:12px; }
body .newest-item span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- 6b. 右栏补卡：最新回复 / 新人必看 ---------- */
body .t8-side-list{ display:flex; flex-direction:column; gap:1px; margin:-5px -8px; }
body .t8-reply-item{
  display:flex; gap:9px; padding:8px; border-radius:7px;
  text-decoration:none; transition:background .14s;
}
body .t8-reply-item:hover{ background:var(--panel-2); }
body .t8-reply-item .avatar{ flex:none; border-radius:50%; border:0; margin-top:1px; }
body .t8-ri-body{ min-width:0; display:flex; flex-direction:column; gap:3px; }
body .t8-ri-title{
  font-size:12.8px; color:var(--text); line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
body .t8-reply-item:hover .t8-ri-title{ color:var(--brand); }
body .t8-ri-meta{ font-size:11.5px; color:var(--text-subtle); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body .t8-guide-item{
  display:flex; gap:9px; align-items:flex-start; padding:8px; border-radius:7px;
  font-size:12.8px; color:var(--text); line-height:1.5; text-decoration:none;
  transition:background .14s, color .14s;
}
body .t8-guide-item:hover{ background:var(--panel-2); color:var(--brand); }
body .t8-guide-item b{
  flex:none; width:16px; height:16px; margin-top:1px; border-radius:4px;
  background:var(--brand-soft); color:var(--brand);
  font-size:11px; font-weight:700; display:inline-flex; align-items:center; justify-content:center;
}
[data-theme="dark"] body .t8-reply-item:hover,
[data-theme="dark"] body .t8-guide-item:hover{ background:var(--panel-2); }

/* ---------- 7. 页脚：深色，对齐主站 footer ---------- */
body .footer{
  background:#0b121e; border-top:1px solid rgba(0,212,255,.12);
  color:rgba(255,255,255,.45); font-size:12.5px; margin-top:34px;
}
body .footer .footer-inner{
  padding-top:18px !important; padding-bottom:18px !important;
  color:rgba(255,255,255,.45); font-size:12.5px;
}
body .footer a{ color:rgba(255,255,255,.6); }
body .footer a:hover{ color:#fff; }
body .footer .powered{ color:rgba(255,255,255,.28); }
body .footer .powered a{ color:rgba(255,255,255,.4); }
@media (max-width:640px){
  body .footer .footer-inner{ flex-direction:column; align-items:center; gap:8px; text-align:center; }
}

/* ---------- 8. 分页 ---------- */
body .pagination{ display:flex; justify-content:center; gap:6px; margin-top:18px; }

/* ---------- 9. 标签索引页：卡片统一节奏 ---------- */
body .tag-grid{ grid-template-columns:repeat(auto-fill,minmax(186px,1fr)) !important; gap:12px !important; }
body .tag-card{
  flex-direction:row; align-items:center; justify-content:space-between;
  background:var(--panel); border:1px solid var(--line); border-radius:8px;
  padding:9px 14px !important; gap:10px !important;
  transition:border-color .15s, background .15s;
}
body .tag-card:hover{ border-color:var(--brand); background:#f7fbfe; }
body .tag-card .tag-badge{
  background:var(--brand-soft) !important; border:0 !important; color:var(--brand) !important;
  border-radius:4px !important; padding:2px 8px !important;
  font-size:12.5px; font-weight:600; line-height:1.6;
}
body .tag-card small{ font-size:11.5px; color:var(--text-subtle); }

/* 分类索引：图标加品牌浅底，统计数字用等宽字体 */
body .category-row .cat-icon{ background:var(--brand-soft); color:var(--brand); border-radius:8px; }
body .category-row .cat-stats{ font-size:12.5px; color:var(--text-muted); }
body .category-row .cat-stats b{ font-family:var(--mono); color:var(--text); }

/* ---------- 10. 轻量页头（标签 / 分类索引页） ---------- */.t8-pagehead{ margin:2px 0 16px; }
.t8-pagehead h1{ margin:0 0 4px; font-size:20px; font-weight:700; letter-spacing:.2px; color:var(--text); }
.t8-pagehead p{ margin:0; font-size:13px; color:var(--text-subtle); }

/* ---------- 11. 主题详情页标题层级 ---------- */
body .topic-head{ margin:0 0 18px; }
body .topic-title{ font-size:20px !important; font-weight:700; line-height:1.4; letter-spacing:.2px; }
body .topic-meta{ margin-top:8px; font-size:12.5px; color:var(--text-subtle); }
body .cat-badge{
  background:var(--brand-soft); color:var(--brand);
  border-radius:4px; padding:1px 8px; font-size:11.5px; font-weight:600;
}
body .topic-meta .cat-badge{
  background:var(--brand-soft) !important; color:var(--brand) !important;
  border:0; border-radius:4px; padding:2px 9px !important;
  font-size:12px; font-weight:600; line-height:1.7;
}
/* 小徽章里再插一条 3px 竖条会显得脏，去掉 */
body .topic-meta .cat-badge::before{ display:none; }

/* 暗色：两处 hover 浅底要收回变量，否则深色主题上会闪白块 */
[data-theme="dark"] body .topic-rows .topic-row:hover{ background:var(--panel-2); }
[data-theme="dark"] body .tag-card:hover{ background:var(--panel-2); }
@media (prefers-color-scheme:dark){
  [data-theme="auto"] body .topic-rows .topic-row:hover{ background:var(--panel-2); }
  [data-theme="auto"] body .tag-card:hover{ background:var(--panel-2); }
}

/* 有版头时，内容区不必再为 sticky 顶栏留整段空隙（版头已把头部空间吃下） */
body:has(.t8-hero) .page-grid{ padding-top:18px !important; }
@media (max-width:992px){
  body:has(.t8-hero) .page-grid{ padding-top:14px !important; }
}
