/* ==================================================================
   BaiyuDown 白鱼资源下载主题  适配 Z-BlogPHP 1.7/1.8
   深色 / 浅色双模式，主色可在主题后台修改
   ================================================================== */

/* ---------- 主题变量 · 方案A 雾石灰 ---------- */
:root{
  --by-primary:#3a3f47;
  --by-primary-soft:rgba(0,0,0,.055);
  --by-radius:12px;
  --by-radius-sm:8px;
  --by-header-h:60px;
  --by-maxw:1200px;
  --by-shadow:0 2px 12px rgba(0,0,0,.18);
  --by-transition:.22s ease;
}
html[data-theme="dark"]{
  --by-bg:#141518;
  --by-bg-2:#1a1b1f;
  --by-card:#1d1f23;
  --by-card-2:#25272c;
  --by-card-hover:#2a2c31;
  --by-border:#2e3136;
  --by-border-soft:#26282d;
  --by-text:#e4e6e9;
  --by-text-2:#9aa0a8;
  --by-text-3:#6b7078;
  --by-footer:#101114;
  --by-mask:rgba(0,0,0,.62);
  --by-input:#1a1b1f;
  --by-nav-bg:rgba(30,32,36,.62);
  --by-nav-border:rgba(255,255,255,.08);
  --by-nav-shadow:0 8px 28px rgba(0,0,0,.45);
}
html[data-theme="light"]{
  --by-bg:#f1f2f4;
  --by-bg-2:#e9eaed;
  --by-card:#ffffff;
  --by-card-2:#f4f5f7;
  --by-card-hover:#eceef1;
  --by-border:#e2e4e8;
  --by-border-soft:#eceef1;
  --by-text:#1f2125;
  --by-text-2:#5a6068;
  --by-text-3:#9aa0a8;
  --by-footer:#ffffff;
  --by-mask:rgba(30,32,36,.4);
  --by-input:#f1f2f4;
  --by-shadow:0 2px 14px rgba(31,33,38,.08);
  --by-nav-bg:rgba(255,255,255,.68);
  --by-nav-border:rgba(255,255,255,.7);
  --by-nav-shadow:0 8px 28px rgba(31,33,38,.10);
}

/* ---------- 基础重置 ---------- */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  font-family:"MiSans","PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--by-bg);
  color:var(--by-text);
  line-height:1.7;
  font-size:15px;
  -webkit-font-smoothing:antialiased;
  transition:background var(--by-transition),color var(--by-transition);
}
a{color:inherit;text-decoration:none;transition:color var(--by-transition);}
img{display:block;max-width:100%;border:0;}
button{font-family:inherit;cursor:pointer;border:0;background:none;color:inherit;}
input,textarea{font-family:inherit;font-size:14px;outline:none;}
ul,ol{list-style:none;}
h1,h2,h3,h4{font-weight:600;line-height:1.4;}
.by-container{max-width:var(--by-maxw);margin:0 auto;padding:0 18px;width:100%;}
.by-main{padding:calc(var(--by-header-h) + 30px) 0 40px;min-height:calc(100vh - 260px);}
.by-layout{display:flex;gap:22px;align-items:flex-start;}
.by-content{flex:1;min-width:0;}
.by-sidebar{width:300px;flex-shrink:0;position:sticky;top:calc(var(--by-header-h) + 30px);display:flex;flex-direction:column;gap:16px;}

/* ---------- 通用按钮 / 标签 ---------- */
.by-btn-primary{
  display:inline-block;background:var(--by-primary);color:#fff!important;
  padding:8px 20px;border-radius:var(--by-radius-sm);font-size:14px;
  text-align:center;transition:filter var(--by-transition),transform var(--by-transition);
  border:0;cursor:pointer;
}
.by-btn-primary:hover{filter:brightness(1.08);}
.by-btn-primary:active{transform:scale(.97);}
.by-btn-sm{padding:6px 16px;font-size:13px;}
.by-block{display:block;width:100%;padding:11px;font-size:15px;}
.by-tag{
  display:inline-block;padding:2px 10px;border-radius:6px;font-size:12px;
  background:var(--by-card-2);color:var(--by-text-2);margin:0 6px 6px 0;
  border:1px solid var(--by-border-soft);transition:all var(--by-transition);
}
.by-tag:hover{color:var(--by-primary);border-color:var(--by-primary);}
.by-tag-cat{color:var(--by-primary);border-color:var(--by-primary);background:var(--by-primary-soft);}
.by-circle{
  width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  background:var(--by-card-2);color:var(--by-text-2);border:1px solid var(--by-border);
  transition:all var(--by-transition);
}
.by-circle:hover{color:var(--by-primary);border-color:var(--by-primary);}
.by-avatar-xs{width:24px;height:24px;border-radius:50%;object-fit:cover;}

/* ==================================================================
   顶部导航
   ================================================================== */
.by-header{
  position:fixed;top:0;left:0;right:0;z-index:100;
  padding:14px 18px 0;
  pointer-events:none;
}
.by-header > .by-nav,
.by-header > .by-searchbar{pointer-events:auto;}
.by-nav{
  display:flex;align-items:center;height:var(--by-header-h);gap:26px;
  max-width:var(--by-maxw);margin:0 auto;padding:0 14px;
  background:var(--by-nav-bg);
  -webkit-backdrop-filter:saturate(160%) blur(20px);
  backdrop-filter:saturate(160%) blur(20px);
  border:1px solid transparent;
  border-radius:18px;
  box-shadow:var(--by-nav-shadow);
}
.by-logo{
  font-size:21px;font-weight:800;letter-spacing:1px;white-space:nowrap;
  font-family:"STKaiti","KaiTi","Songti SC",serif;position:relative;
}
.by-logo::after{content:"";position:absolute;left:0;bottom:-4px;width:100%;height:2px;background:var(--by-primary);border-radius:2px;}
.by-menu{flex:1;}
.by-menu ul{display:flex;gap:6px;flex-wrap:wrap;}
.by-menu li{position:relative;}
.by-menu>ul>li>a{
  display:block;padding:7px 13px;border-radius:8px;font-size:15px;color:var(--by-text-2);
  position:relative;white-space:nowrap;
}
.by-menu>ul>li.by-has-sub>a{padding-right:26px;}
.by-menu>ul>li.by-has-sub>a::after{
  content:"";position:absolute;right:11px;top:50%;transform:translateY(-50%);
  width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;
  border-top:5px solid currentColor;opacity:.55;transition:transform .2s ease;
}
.by-menu>ul>li.by-has-sub:hover>a::after{transform:translateY(-50%) rotate(180deg);}
.by-menu>ul>li>a:hover,.by-menu>ul>li.current>a{color:var(--by-primary);background:var(--by-primary-soft);}
.by-menu li ul{
  position:absolute;top:calc(100% + 6px);left:0;min-width:160px;background:var(--by-card);
  border:1px solid var(--by-border);border-radius:12px;padding:8px;display:none;
  box-shadow:0 8px 28px rgba(0,0,0,.2);z-index:50;
}
/* 修复二级菜单 hover 断裂：父项底部向下延伸6px透明区，鼠标移向子菜单不丢悬停 */
.by-menu>ul>li.by-has-sub::after{
  content:'';position:absolute;left:0;right:0;top:100%;height:6px;
}
.by-menu li:hover>ul{display:block;}
.by-menu li ul li{border-bottom:1px solid var(--by-border-soft);}
.by-menu li ul li:last-child{border-bottom:0;}
.by-menu li ul a{display:block;padding:9px 14px;border-radius:6px;font-size:14px;color:var(--by-text-2);}
.by-menu li ul a:hover{background:var(--by-card-2);color:var(--by-primary);}
.by-nav-right{display:flex;align-items:center;gap:6px;margin-left:auto;}
.by-icon-btn{
  width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  color:var(--by-text-2);transition:all var(--by-transition);
}
.by-icon-btn:hover{color:var(--by-primary);background:var(--by-primary-soft);}
.by-icon-sun{display:none;}
html[data-theme="light"] .by-icon-moon{display:none;}
html[data-theme="light"] .by-icon-sun{display:block;}
.by-userbox{position:relative;}
.by-userbtn{display:flex;align-items:center;gap:6px;padding:4px 10px 4px 4px;border-radius:20px;background:var(--by-card-2);border:1px solid var(--by-border);}
.by-username{font-size:13px;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.by-userdrop{
  position:absolute;top:calc(100% + 8px);right:0;min-width:120px;background:var(--by-card);
  border:1px solid var(--by-border);border-radius:10px;padding:6px;display:none;box-shadow:var(--by-shadow);z-index:60;
}
.by-userbox:hover .by-userdrop,.by-userbox:focus-within .by-userdrop{display:block;}
.by-userdrop a{display:block;padding:8px 12px;border-radius:6px;font-size:14px;}
.by-userdrop a:hover{background:var(--by-card-2);color:var(--by-primary);}
.by-burger{display:none;flex-direction:column;gap:4px;width:34px;height:34px;align-items:center;justify-content:center;}
.by-burger span{width:20px;height:2px;background:var(--by-text);border-radius:2px;}

/* 顶部展开搜索条（独立磨砂卡，浮在导航下方） */
.by-searchbar{
  max-width:var(--by-maxw);margin:10px auto 0;
  max-height:0;overflow:hidden;transition:max-height .3s ease;
  background:var(--by-nav-bg);
  -webkit-backdrop-filter:saturate(160%) blur(20px);
  backdrop-filter:saturate(160%) blur(20px);
  border:1px solid var(--by-nav-border);
  border-radius:16px;
  box-shadow:var(--by-nav-shadow);
}
.by-searchbar.open{max-height:80px;}
.by-searchbar form{display:flex;align-items:center;gap:10px;padding:14px 18px;color:var(--by-text-3);max-width:none;margin:0;}
.by-searchbar input{flex:1;background:transparent;border:0;color:var(--by-text);font-size:15px;}
.by-searchbar button{padding:7px 22px;border-radius:8px;background:var(--by-primary);color:#fff;}

/* ==================================================================
   轮播横幅
   ================================================================== */
.by-banner{position:relative;border-radius:var(--by-radius);overflow:hidden;margin-bottom:20px;height:180px;background:var(--by-card-2);}
.by-banner-track{height:100%;position:relative;}
.by-banner-slide{
  position:absolute;inset:0;opacity:0;transition:opacity .6s ease;
  background-size:cover;background-position:center;display:flex;align-items:center;
}
.by-banner-slide::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.62),rgba(0,0,0,.12));}
html[data-theme="light"] .by-banner-slide::before{background:linear-gradient(90deg,rgba(20,30,55,.5),rgba(20,30,55,.05));}
.by-banner-slide.active{opacity:1;z-index:1;}
.by-banner-text{position:relative;z-index:2;padding:0 38px;color:#fff;}
.by-banner-text h2{font-size:26px;font-weight:700;margin-bottom:8px;text-shadow:0 2px 8px rgba(0,0,0,.3);}
.by-banner-text p{font-size:14px;opacity:.92;}
.by-banner-prev,.by-banner-next{
  position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:38px;height:38px;border-radius:50%;
  background:rgba(0,0,0,.32);color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity var(--by-transition);
}
.by-banner:hover .by-banner-prev,.by-banner:hover .by-banner-next{opacity:1;}
.by-banner-prev{left:12px;}.by-banner-next{right:12px;}
.by-banner-dots{position:absolute;bottom:12px;right:18px;z-index:3;display:flex;gap:7px;}
.by-banner-dots button{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.45);}
.by-banner-dots button.active{background:#fff;width:18px;border-radius:4px;}

/* 排序条 */
.by-sortbar{display:flex;align-items:center;gap:12px;margin-bottom:16px;color:var(--by-text-3);font-size:14px;}
.by-sortbar em{font-style:normal;opacity:.5;}
.by-sortbar button{color:var(--by-text-2);font-size:14px;padding:2px 4px;}
.by-sortbar button.active{color:var(--by-primary);font-weight:600;}

/* ==================================================================
   文章卡片列表
   ================================================================== */
.by-post-list{display:flex;flex-direction:column;gap:14px;}
.by-post-card{
  display:flex;gap:18px;background:var(--by-card);border:1px solid var(--by-border-soft);
  border-radius:var(--by-radius);padding:16px;transition:all var(--by-transition);
}
.by-post-card:hover{background:var(--by-card-hover);transform:translateY(-2px);box-shadow:var(--by-shadow);}
.by-post-top{border-color:color-mix(in srgb,var(--by-primary) 40%,var(--by-border));}
.by-post-thumb{
  width:168px;height:118px;flex-shrink:0;border-radius:10px;overflow:hidden;background:var(--by-card-2);
  position:relative;
}
.by-post-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease;}
.by-post-card:hover .by-post-thumb img{transform:scale(1.06);}
.by-top-flag{
  position:absolute;left:0;top:0;background:var(--by-primary);color:#fff;font-size:11px;
  padding:2px 8px;border-bottom-right-radius:8px;
}
.by-post-body{flex:1;min-width:0;display:flex;flex-direction:column;}
.by-post-title{font-size:18px;font-weight:600;line-height:1.4;margin-bottom:8px;}
.by-post-title a{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.by-post-title a:hover{color:var(--by-primary);}
.by-post-excerpt{
  color:var(--by-text-2);font-size:13.5px;line-height:1.6;margin-bottom:10px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.by-post-tags{margin-bottom:auto;}
.by-post-tags .by-tag{margin-bottom:0;}
.by-post-meta{display:flex;justify-content:space-between;margin-top:10px;color:var(--by-text-3);font-size:12.5px;}

/* 归档/搜索头部 */
.by-archive-head{
  background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);
  padding:26px 28px;margin-bottom:18px;
}
.by-archive-head h1{font-size:22px;margin-bottom:6px;}
.by-archive-head p{color:var(--by-text-2);font-size:14px;}
.by-search-head{margin-bottom:18px;}
.by-bigsearch{display:flex;gap:10px;background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:14px;}
.by-bigsearch input{flex:1;background:var(--by-input);border:1px solid var(--by-border);border-radius:8px;padding:11px 14px;color:var(--by-text);}
.by-bigsearch button{padding:0 28px;border-radius:8px;background:var(--by-primary);color:#fff;}
.by-search-stat{padding:12px 6px;color:var(--by-text-2);font-size:14px;}
.by-search-stat b{color:var(--by-primary);}
.by-empty{padding:80px 0;text-align:center;color:var(--by-text-3);background:var(--by-card);border-radius:var(--by-radius);}

/* ==================================================================
   侧边栏
   ================================================================== */
.by-widget{background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:18px;}
.by-widget-title{
  font-size:16px;font-weight:600;margin-bottom:14px;padding-left:10px;position:relative;
}
.by-widget-title::before,.by-block-title::before{
  content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:4px;height:16px;background:var(--by-primary);border-radius:2px;
}
.by-block-title{font-size:18px;font-weight:600;margin-bottom:16px;padding-left:12px;position:relative;}
.by-block-title em{font-style:normal;font-size:13px;color:var(--by-text-3);font-weight:400;margin-left:6px;}

/* 站长卡片 */
.by-master{text-align:center;}
.by-master-avatar{width:64px;height:64px;border-radius:50%;object-fit:cover;margin:0 auto 10px;border:2px solid var(--by-border);}
.by-master-name{font-size:16px;font-weight:600;margin-bottom:4px;}
.by-master-intro{font-size:12.5px;color:var(--by-text-2);margin-bottom:12px;}
.by-master-icons{display:flex;justify-content:center;gap:10px;}

/* 迷你列表（热门） */
.by-mini-list li{margin-bottom:12px;}
.by-mini-list li:last-child{margin-bottom:0;}
.by-mini-item{display:flex;gap:10px;align-items:flex-start;}
.by-mini-item img{width:64px;height:48px;border-radius:7px;object-fit:cover;flex-shrink:0;background:var(--by-card-2);}
.by-mini-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}
.by-mini-title{
  font-size:13.5px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.by-mini-item:hover .by-mini-title{color:var(--by-primary);}
.by-mini-meta{font-size:12px;color:var(--by-text-3);}

/* 标签云 */
.by-tagcloud{display:flex;flex-wrap:wrap;gap:12px;}
.by-tagcloud a{
  font-size:12.5px;padding:6px 11px;border-radius:8px;background:var(--by-card-2);
  color:var(--by-text-2);border:1px solid var(--by-border-soft);
}
.by-tagcloud a em{font-style:normal;color:var(--by-text-3);font-size:11px;margin-left:2px;}
.by-tagcloud a:hover{color:var(--by-primary);border-color:var(--by-primary);}

/* 最近评论 */
.by-cmt-list li{display:flex;gap:10px;padding:10px 0;border-bottom:1px dashed var(--by-border-soft);}
.by-cmt-list li:last-child{border-bottom:0;padding-bottom:0;}
.by-cmt-list li:first-child{padding-top:0;}
.by-cmt-avatar{width:34px;height:34px;border-radius:8px;object-fit:cover;flex-shrink:0;background:var(--by-card-2);}
.by-cmt-body{min-width:0;flex:1;}
.by-cmt-head{display:flex;gap:8px;align-items:baseline;font-size:12.5px;margin-bottom:2px;}
.by-cmt-head b{font-weight:600;font-size:13px;}
.by-cmt-head span{color:var(--by-text-3);font-size:12px;}
.by-cmt-text{font-size:12.5px;color:var(--by-text-2);line-height:1.5;display:block;}
a.by-cmt-text:hover{color:var(--by-primary);}

/* 看看别的 标签页 */
.by-tab-head{display:flex;gap:16px;margin-bottom:12px;border-bottom:1px solid var(--by-border-soft);}
.by-tab-head button{padding-bottom:8px;font-size:14px;color:var(--by-text-2);position:relative;}
.by-tab-head button.active{color:var(--by-primary);font-weight:600;}
.by-tab-head button.active::after{content:"";position:absolute;left:0;bottom:-1px;width:100%;height:2px;background:var(--by-primary);border-radius:2px;}
.by-rank-list{display:none;flex-direction:column;}
.by-rank-list.active{display:flex;}
.by-rank-list li{display:flex;align-items:center;gap:10px;padding:6px 0;}
.by-rank-no{
  width:18px;height:18px;border-radius:5px;background:var(--by-card-2);color:var(--by-text-3);
  font-size:12px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
}
.by-rank-list li:nth-child(-n+3) .by-rank-no{background:var(--by-primary-soft);color:var(--by-primary);}
.by-rank-list a{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.by-rank-list a:hover{color:var(--by-primary);}

/* ==================================================================
   文章详情页
   ================================================================== */
.by-detail{background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:30px 34px;margin-bottom:18px;}
.by-breadcrumb{font-size:13px;color:var(--by-text-3);margin-bottom:18px;display:flex;gap:8px;flex-wrap:wrap;}
.by-breadcrumb a:hover{color:var(--by-primary);}
.by-detail-head{text-align:center;padding-bottom:20px;margin-bottom:24px;border-bottom:1px solid var(--by-border-soft);}
.by-detail-title{font-size:27px;font-weight:700;line-height:1.4;margin-bottom:14px;}
.by-detail-author{display:flex;align-items:center;justify-content:center;gap:7px;margin-bottom:10px;font-size:14px;}
.by-detail-meta{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;color:var(--by-text-3);font-size:13px;}
.by-detail-meta em{font-style:normal;opacity:.5;}

/* 文章正文：始终保持白天模式（白底黑字），不跟随暗黑模式切换 */
.by-detail-content{font-size:15.5px;line-height:1.9;color:#1f2329;background:#fff;padding:24px;border-radius:12px;}
.by-detail-content p{margin:0 0 18px;color:#1f2329;}
/* 强制正文内容自适应：覆盖编辑器生成的 nowrap 内联样式，防止手机端文字/图片溢出 */
.by-detail-content,.by-detail-content p,.by-detail-content span,.by-detail-content div,
.by-detail-content strong,.by-detail-content b,.by-detail-content em,.by-detail-content font,
.by-detail-content h1,.by-detail-content h2,.by-detail-content h3,.by-detail-content h4,
.by-detail-content h5,.by-detail-content h6,.by-detail-content li,.by-detail-content td,
.by-detail-content th,.by-detail-content a,.by-detail-content label{
  white-space:normal !important;
  text-wrap:wrap !important;
  -webkit-text-wrap-mode:wrap !important;
  text-wrap-mode:wrap !important;
  word-wrap:break-word;
  overflow-wrap:break-word;
}
.by-detail-content img{
  border-radius:8px;margin:16px auto;
  max-width:100% !important;height:auto !important;
}
.by-detail-content video,.by-detail-content iframe,.by-detail-content embed,
.by-detail-content object{max-width:100% !important;}
.by-detail-content p img{max-width:100% !important;width:auto !important;}
.by-detail-content h2,.by-detail-content h3,.by-detail-content h4{margin:28px 0 14px;color:#1f2329;}
.by-detail-content h3{padding-left:11px;border-left:4px solid #6ea8fe;font-size:19px;}
.by-detail-content h2{font-size:22px;}
.by-detail-content img{border-radius:8px;margin:16px auto;}
.by-detail-content a{color:#6ea8fe;}
.by-detail-content blockquote{
  border-left:4px solid #6ea8fe;background:#f7f9fc;padding:12px 18px;
  border-radius:0 8px 8px 0;color:#5f6672;margin:16px 0;
}
.by-detail-content pre{
  background:#f4f6f9;border:1px solid #e8ebf0;border-radius:10px;
  padding:16px;overflow-x:auto;margin:16px 0;font-size:13.5px;line-height:1.6;color:#1f2329;
}
.by-detail-content code{background:#f7f9fc;padding:2px 6px;border-radius:5px;font-size:13.5px;color:#1f2329;}
.by-detail-content pre code{background:none;padding:0;}
.by-detail-content ul,.by-detail-content ol{padding-left:22px;margin-bottom:16px;}
.by-detail-content li{margin-bottom:6px;color:#1f2329;}
.by-detail-content table{width:100%;border-collapse:collapse;margin:16px 0;}
.by-detail-content th,.by-detail-content td{border:1px solid #e8ebf0;padding:8px 12px;color:#1f2329;}
.by-detail-content th{background:#f7f9fc;font-weight:600;}

/* 附件下载区 */
.by-download{border:1px solid var(--by-border);border-radius:var(--by-radius);background:var(--by-card-2);padding:20px;margin:26px 0;}
.by-download-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap;gap:6px;}
.by-download-head h3{font-size:17px;padding-left:11px;position:relative;}
.by-download-head h3::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:4px;height:16px;background:var(--by-primary);border-radius:2px;}
.by-download-head span{font-size:12.5px;color:var(--by-text-3);}
.by-download-item{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:10px;padding:13px 16px;margin-bottom:10px;
}
.by-download-item:last-child{margin-bottom:0;}
.by-file-info{display:flex;align-items:center;gap:12px;min-width:0;}
.by-file-icon{color:var(--by-primary);display:flex;}
.by-file-meta{display:flex;flex-direction:column;min-width:0;}
.by-file-name{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.by-file-size{font-size:12.5px;color:var(--by-text-3);}

/* 附件权限标签 */
.by-attach-tag{font-size:12px;padding:2px 10px;border-radius:20px;font-weight:500;}
.by-attach-tag-login{background:var(--by-primary-soft);color:var(--by-primary);}
.by-attach-tag-pay{background:#fff3e0;color:#e67e22;}
.by-pay-btn{background:linear-gradient(135deg,#ff9a56,#ff6b6b);color:#fff!important;}
.by-pay-btn:hover{filter:brightness(1.08);}
.by-pay-box{margin-top:16px;padding:24px;background:var(--by-card);border:1px dashed var(--by-border);border-radius:12px;text-align:center;}
.by-pay-qrcode{max-width:260px;width:100%;margin:0 auto 14px;border-radius:10px;}
.by-pay-notice{font-size:14px;color:var(--by-text-2);margin:0;}

.by-endline{display:flex;align-items:center;gap:14px;margin:28px 0 20px;color:var(--by-text-3);font-size:13px;}
.by-endline::before,.by-endline::after{content:"";flex:1;height:1px;background:var(--by-border);}
.by-detail-tags{margin-bottom:16px;}
.by-cc{
  display:flex;gap:9px;align-items:flex-start;font-size:13px;color:var(--by-text-2);
  border-top:1px solid var(--by-border-soft);padding-top:18px;
}
.by-cc svg{flex-shrink:0;margin-top:3px;color:var(--by-text-3);}
.by-detail-foot{display:flex;align-items:center;justify-content:space-between;margin-top:18px;}
.by-useful{
  display:inline-flex;align-items:center;gap:6px;padding:6px 16px;border-radius:20px;
  background:var(--by-card-2);border:1px solid var(--by-border);color:var(--by-text-2);font-size:13.5px;
}
.by-useful.actived{color:var(--by-primary);border-color:var(--by-primary);background:var(--by-primary-soft);}
.by-detail-view{font-size:13px;color:var(--by-text-3);}

/* 相关阅读 */
.by-related{background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:22px 24px;margin-bottom:18px;}
.by-related-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.by-related-item{display:flex;gap:12px;align-items:center;padding:10px;border-radius:10px;transition:background var(--by-transition);}
.by-related-item:hover{background:var(--by-card-2);}
.by-related-item img{width:96px;height:66px;border-radius:8px;object-fit:cover;flex-shrink:0;background:var(--by-card-2);}
.by-related-body{display:flex;flex-direction:column;gap:6px;min-width:0;}
.by-related-title{font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.by-related-item:hover .by-related-title{color:var(--by-primary);}
.by-related-meta{font-size:12px;color:var(--by-text-3);}

/* 上下篇 */
.by-prevnext{display:flex;gap:14px;margin-bottom:18px;}
.by-prevnext>div{flex:1;background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:10px;padding:12px 16px;min-width:0;}
.by-prevnext span{display:block;font-size:12px;color:var(--by-text-3);margin-bottom:3px;}
.by-prevnext a{font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.by-prevnext a:hover{color:var(--by-primary);}
.by-next{text-align:right;}

/* ==================================================================
   独立页面 / 友链
   ================================================================== */
.by-page-banner{
  background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);
  height:130px;display:flex;align-items:center;justify-content:center;margin-bottom:18px;
  background-image:linear-gradient(135deg,var(--by-card) 0%,var(--by-card-2) 100%);
}
.by-page-banner h1{font-size:26px;}
.by-page-card{background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:30px 34px;}
.by-links-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0;}
.by-link-card{
  display:flex;align-items:center;gap:12px;padding:14px;border-radius:10px;background:var(--by-card-2);
  border:1px solid var(--by-border-soft);transition:all var(--by-transition);
}
.by-link-card:hover{border-color:var(--by-primary);transform:translateY(-2px);}
.by-link-card img,.by-link-letter{width:42px;height:42px;border-radius:10px;object-fit:cover;flex-shrink:0;background:var(--by-primary-soft);}
.by-link-letter{display:flex;align-items:center;justify-content:center;color:var(--by-primary);font-size:20px;font-weight:700;}
.by-link-text{display:flex;flex-direction:column;min-width:0;}
.by-link-text b{font-size:14.5px;}
.by-link-text em{font-style:normal;font-size:12.5px;color:var(--by-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.by-links-empty{grid-column:1/-1;text-align:center;color:var(--by-text-3);padding:30px;}
.by-join-btn{display:block;text-align:center;padding:12px;border-radius:10px;background:var(--by-card-2);border:1px solid var(--by-border);color:var(--by-text-2);}
.by-join-btn:hover{color:var(--by-primary);border-color:var(--by-primary);}

/* ==================================================================
   评论区
   ================================================================== */
.by-comments{background:var(--by-card);border:1px solid var(--by-border-soft);border-radius:var(--by-radius);padding:24px;}
.by-cmt-form{margin-bottom:24px;}
.by-cmt-inputrow{display:flex;gap:12px;}
.by-cmt-avatar{width:40px;height:40px;flex-shrink:0;border-radius:10px;overflow:hidden;background:var(--by-card-2);color:var(--by-text-3);display:flex;align-items:center;justify-content:center;}
.by-cmt-avatar img{width:100%;height:100%;object-fit:cover;}
.by-cmt-main{flex:1;min-width:0;}
.by-cmt-main textarea{
  width:100%;background:var(--by-input);border:1px solid var(--by-border);border-radius:10px;
  padding:12px 14px;color:var(--by-text);resize:vertical;line-height:1.6;
}
.by-cmt-main textarea:focus{border-color:var(--by-primary);}
.by-cmt-fields{display:flex;gap:10px;margin-top:10px;}
.by-cmt-fields input{flex:1;min-width:0;background:var(--by-input);border:1px solid var(--by-border);border-radius:8px;padding:9px 12px;color:var(--by-text);}
.by-cmt-verify{display:flex;gap:10px;align-items:center;margin-top:10px;}
.by-cmt-verify input{width:140px;background:var(--by-input);border:1px solid var(--by-border);border-radius:8px;padding:9px 12px;color:var(--by-text);}
.by-cmt-verify img{height:38px;border-radius:8px;cursor:pointer;}
.by-cmt-bar{display:flex;align-items:center;justify-content:space-between;margin-top:10px;flex-wrap:wrap;gap:8px;}
.by-cmt-tools{display:flex;gap:6px;}
.by-cmt-tools button{font-size:13px;color:var(--by-text-2);padding:5px 12px;border-radius:7px;background:var(--by-card-2);border:1px solid var(--by-border-soft);}
.by-cmt-tools button:hover{color:var(--by-primary);border-color:var(--by-primary);}
.by-reply-tip{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--by-primary);margin-bottom:8px;}
.by-reply-tip button{font-size:12px;color:var(--by-text-3);text-decoration:underline;}

.by-cmt-list .by-cmt-item{display:flex;gap:12px;padding:16px 0;border-bottom:1px dashed var(--by-border-soft);}
.by-cmt-useravatar img{width:40px;height:40px;border-radius:10px;object-fit:cover;flex-shrink:0;background:var(--by-card-2);}
.by-cmt-content{flex:1;min-width:0;}
.by-cmt-info{display:flex;align-items:center;gap:8px;margin-bottom:4px;}
.by-cmt-info b{font-size:14px;}
.by-badge-master{background:var(--by-primary-soft);color:var(--by-primary);font-size:11px;padding:1px 7px;border-radius:5px;}
.by-floor{font-size:11.5px;color:var(--by-text-3);}
.by-cmt-text{font-size:14.5px;line-height:1.7;word-break:break-word;}
.by-cmt-foot{display:flex;gap:14px;margin-top:5px;font-size:12.5px;color:var(--by-text-3);}
.by-reply-btn{font-size:12.5px;color:var(--by-text-3);}
.by-reply-btn:hover{color:var(--by-primary);}
.by-cmt-children{
  margin-top:12px;padding:12px 14px;background:var(--by-card-2);border-radius:10px;
  display:flex;flex-direction:column;
}
.by-cmt-children .by-cmt-item{padding:10px 0;border-bottom:1px dashed var(--by-border);}
.by-cmt-children .by-cmt-item:last-child{border-bottom:0;padding-bottom:0;}
.by-cmt-empty{text-align:center;color:var(--by-text-3);padding:30px 0;}

/* ==================================================================
   分页
   ================================================================== */
.by-pagination{display:flex;justify-content:center;gap:6px;margin-top:26px;flex-wrap:wrap;}
.by-pagination a,.by-pagination span{
  min-width:36px;height:36px;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;background:var(--by-card);border:1px solid var(--by-border-soft);font-size:14px;color:var(--by-text-2);
}
.by-pagination a:hover{color:var(--by-primary);border-color:var(--by-primary);}
.by-pagination .current{background:var(--by-primary);color:#fff;border-color:var(--by-primary);}

/* ==================================================================
   登录 / 注册弹窗
   ================================================================== */
.by-modal{
  position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;
  background:var(--by-mask);backdrop-filter:blur(3px);padding:18px;
}
.by-modal.open{display:flex;}
.by-modal-box{
  width:100%;max-width:400px;background:var(--by-card);border:1px solid var(--by-border);
  border-radius:16px;padding:28px 26px;position:relative;box-shadow:0 18px 60px rgba(0,0,0,.4);
  animation:byPop .25s ease;
}
@keyframes byPop{from{transform:translateY(16px) scale(.97);opacity:0;}to{transform:none;opacity:1;}}
.by-modal-close{position:absolute;right:16px;top:14px;font-size:24px;color:var(--by-text-3);line-height:1;}
.by-modal-title{font-size:21px;margin-bottom:4px;}
.by-modal-switch{font-size:13px;color:var(--by-primary);position:absolute;right:26px;top:32px;}
.by-auth-form{margin-top:18px;display:flex;flex-direction:column;gap:13px;}
.by-input{position:relative;display:flex;align-items:center;}
.by-input svg{position:absolute;left:13px;color:var(--by-text-3);}
.by-input input{
  width:100%;background:var(--by-input);border:1px solid var(--by-border);border-radius:10px;
  padding:11px 40px 11px 38px;color:var(--by-text);
}
.by-input input:focus{border-color:var(--by-primary);}
.by-pwd-eye{position:absolute;right:10px;color:var(--by-text-3);display:flex;}
.by-form-row{font-size:13px;}
.by-check{display:inline-flex;align-items:center;gap:6px;color:var(--by-text-2);cursor:pointer;}
.by-modal-note{font-size:12px;color:var(--by-text-3);text-align:center;}
.by-mask{display:none;}
.by-mask.menu-open{display:block;position:fixed;inset:0;z-index:98;background:var(--by-mask);}

/* 全局提示 toast */
.by-toast{
  position:fixed;top:76px;left:50%;transform:translateX(-50%);z-index:1200;
  padding:11px 22px;border-radius:10px;font-size:14px;box-shadow:var(--by-shadow);
  background:var(--by-card);border:1px solid var(--by-border);animation:byPop .25s ease;
}
.by-toast-good{border-color:#52c41a;color:#52c41a;}
.by-toast-bad{border-color:#ff6b6b;color:#ff6b6b;}

/* ==================================================================
   页脚
   ================================================================== */
.by-footer{background:var(--by-footer);border-top:1px solid var(--by-border-soft);padding:34px 0;}
.by-footer-inner{display:flex;gap:30px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;}
.by-logo-footer{font-size:22px;margin-bottom:10px;}
.by-logo-footer::after{display:none;}
.by-footer-brand p{font-size:12.5px;color:var(--by-text-3);margin-bottom:5px;}
/* 友链模块 */
.by-footer-links{padding:14px 18px;border-radius:10px;}
.by-footer-links-title{font-size:14px;font-weight:600;margin:0 0 10px 0;}
.by-footer-links-list{display:flex;gap:8px 18px;flex-wrap:wrap;}
.by-footer-links-list a{font-size:13px;text-decoration:none;transition:opacity .2s;}
.by-footer-links-list a:hover{opacity:.7;text-decoration:underline;}
/* 中间列友链（居中） */
.by-footer-links-mid{max-width:480px;margin:0 auto;text-align:center;}
.by-footer-links-mid .by-footer-links-list{justify-content:center;}
.by-footer-mid{flex:1;min-width:240px;}
.by-footer-nav{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:10px;font-size:14px;}
.by-footer-nav a:hover{color:var(--by-primary);}
.by-footer-mid p{font-size:12.5px;color:var(--by-text-3);margin-bottom:5px;}
.by-footer-icons{display:flex;gap:10px;}

/* 回到顶部 */
.by-backtop{
  position:fixed;right:24px;bottom:30px;z-index:90;width:44px;height:44px;border-radius:50%;
  background:var(--by-card);border:1px solid var(--by-border);color:var(--by-primary);
  display:flex;align-items:center;justify-content:center;box-shadow:var(--by-shadow);
  opacity:0;visibility:hidden;transition:all var(--by-transition);
}
.by-backtop.show{opacity:1;visibility:visible;}
.by-backtop:hover{background:var(--by-primary);color:#fff;}

/* 404 */
.by-404{text-align:center;padding:90px 20px;background:var(--by-card);border-radius:var(--by-radius);}
.by-404-code{font-size:88px;font-weight:800;color:var(--by-primary);line-height:1;margin-bottom:16px;}
.by-404 p{color:var(--by-text-2);margin-bottom:24px;}

/* ==================================================================
   附件下载：折叠展开
   ================================================================== */
.by-download-collapsible{margin:24px 0;}
.by-download-toggle{
  display:flex;align-items:center;gap:10px;cursor:pointer;
  padding:14px 18px;background:var(--by-card);border:1px solid var(--by-border);
  border-radius:var(--by-radius) var(--by-radius) 0 0;user-select:none;
  transition:background var(--by-transition);
}
.by-download-toggle:hover{background:var(--by-card-hover);}
.by-download-arrow{
  display:inline-block;font-size:10px;color:var(--by-text-2);
  transition:transform .25s ease;transform:rotate(-90deg);
}
.by-download-collapsible.open .by-download-arrow{transform:rotate(0deg);}
.by-download-toggle h3{margin:0;font-size:16px;font-weight:600;color:var(--by-text);}
.by-download-toggle .by-download-count{margin-left:auto;font-size:12px;color:var(--by-text-2);}
.by-download-toggle .by-attach-tag{margin-left:auto;}
.by-download-body{
  background:var(--by-card);border:1px solid var(--by-border);border-top:0;
  border-radius:0 0 var(--by-radius) var(--by-radius);padding:16px 18px;
}
.by-download-collapsible.open .by-download-body{display:block !important;}

/* ==================================================================
   附件下载：网盘链接
   ================================================================== */
.by-netdisk-list{margin-top:12px;}
.by-netdisk-title{
  font-size:13px;font-weight:600;color:var(--by-text-2);
  padding:8px 0 6px;border-top:1px dashed var(--by-border);margin-bottom:8px;
}
.by-netdisk-item{
  display:flex;align-items:center;gap:12px;padding:12px;
  background:var(--by-bg);border:1px solid var(--by-border);border-radius:8px;
  margin-bottom:8px;transition:all var(--by-transition);
}
.by-netdisk-item:hover{border-color:var(--by-primary);box-shadow:0 2px 8px rgba(0,0,0,.06);}
.by-nd-icon{
  width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;color:#fff;
}
.by-nd-type-baidu{background:#2932e1;}
.by-nd-type-aliyun{background:#ff6a00;}
.by-nd-type-quark{background:#00b4ff;}
.by-nd-type-lanzou{background:#1aad19;}
.by-nd-type-123pan{background:#7c3aed;}
.by-nd-type-other{background:var(--by-text-2);}
.by-nd-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}
.by-nd-type-tag{
  display:inline-block;padding:1px 6px;background:var(--by-primary-soft);
  color:var(--by-primary);border-radius:4px;font-size:11px;font-weight:500;width:fit-content;
}
.by-nd-name{font-size:14px;color:var(--by-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.by-nd-action{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.by-btn-outline{
  padding:6px 14px;border:1px solid var(--by-border);background:transparent;
  color:var(--by-text-2);border-radius:6px;font-size:13px;cursor:pointer;
  transition:all var(--by-transition);
}
.by-btn-outline:hover{border-color:var(--by-primary);color:var(--by-primary);background:var(--by-primary-soft);}
.by-copy-code.copied{background:#52c41a;color:#fff;border-color:#52c41a;}

/* ==================================================================
   响应式适配（平板 / 手机 / 小屏手机）
   ================================================================== */

/* ---------- 平板竖屏及以下 ---------- */
@media (max-width:1080px){
  .by-sidebar{width:260px;}
  .by-post-thumb{width:140px;height:100px;}
}

/* ---------- 平板 / 大屏手机横屏：侧边栏转横向 ---------- */
@media (max-width:900px){
  .by-layout{flex-direction:column;align-items:stretch;}
  .by-sidebar{
    width:100%;position:static;flex-direction:row;flex-wrap:wrap;gap:14px;
  }
  .by-widget{flex:1 1 280px;}
  .by-master{flex-basis:100%;}
}

/* ==================================================================
   手机端（≤768px）
   ================================================================== */
@media (max-width:768px){

  /* ----- 全局 ----- */
  body{font-size:14px;overflow-x:hidden;}
  .by-container{padding:0 14px;}
  .by-main{padding:calc(var(--by-header-h) + 28px) 0 70px;}
  .by-layout{gap:14px;}

  /* ----- 顶部导航 ----- */
  :root{--by-header-h:54px;}
  .by-header{padding:10px 12px 0;}
  .by-nav{height:54px;gap:10px;border-radius:16px;}
  .by-logo{font-size:18px;letter-spacing:.5px;}
  .by-burger{display:flex;width:32px;height:32px;gap:3px;}
  .by-burger span{width:18px;}
  .by-nav-right{gap:2px;}
  .by-icon-btn{width:34px;height:34px;}
  .by-userbtn{padding:3px 8px 3px 3px;}
  .by-username{display:none;}

  /* 移动端下拉菜单（磨砂卡，浮在导航下方） */
  .by-menu{
    position:fixed;top:calc(var(--by-header-h) + 20px);left:12px;right:12px;
    background:var(--by-nav-bg);
    -webkit-backdrop-filter:saturate(160%) blur(20px);
    backdrop-filter:saturate(160%) blur(20px);
    border:1px solid var(--by-nav-border);
    border-radius:16px;
    max-height:0;overflow:hidden;transition:max-height .3s ease;z-index:99;
    box-shadow:var(--by-nav-shadow);
  }
  .by-menu.open{max-height:calc(100vh - var(--by-header-h) - 30px);overflow-y:auto;-webkit-overflow-scrolling:touch;}
  .by-menu>ul{flex-direction:column;padding:8px 14px;gap:0;flex-wrap:nowrap;}
  .by-menu>ul>li>a{padding:11px 12px;font-size:15px;border-radius:8px;}
  .by-menu>ul>li.by-has-sub>a{padding-right:26px;}
  /* 移动端子菜单展开显示，不需要 hover 桥 */
  .by-menu>ul>li.by-has-sub::after{display:none;}
  .by-menu li ul{
    position:static;display:block;box-shadow:none;border:0;
    padding:0 0 4px 12px;min-width:0;background:transparent;
  }
  .by-menu li ul li{border-bottom:0;}
  .by-menu li ul a{padding:9px 12px;font-size:14px;}

  /* 搜索展开条 */
  .by-searchbar.open{max-height:70px;}
  .by-searchbar form{padding:10px 14px;gap:8px;}
  .by-searchbar input{font-size:15px;}
  .by-searchbar button{padding:7px 16px;font-size:14px;}

  /* ----- 轮播图 ----- */
  .by-banner{height:140px;margin-bottom:14px;border-radius:10px;}
  .by-banner-text{padding:0 20px;}
  .by-banner-text h2{font-size:20px;margin-bottom:4px;}
  .by-banner-text p{font-size:13px;}
  .by-banner-prev,.by-banner-next{width:32px;height:32px;font-size:18px;opacity:1;}
  .by-banner-prev{left:8px;}
  .by-banner-next{right:8px;}
  .by-banner-dots{bottom:8px;right:14px;gap:6px;}
  .by-banner-dots button{width:6px;height:6px;}
  .by-banner-dots button.active{width:16px;}

  /* ----- 排序条 ----- */
  .by-sortbar{gap:10px;margin-bottom:12px;font-size:13px;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch;padding-bottom:2px;}
  .by-sortbar::-webkit-scrollbar{display:none;}
  .by-sortbar button{font-size:13px;padding:4px 8px;flex-shrink:0;}

  /* ----- 文章卡片列表 ----- */
  .by-post-list{gap:12px;}
  .by-post-card{flex-direction:column;gap:12px;padding:12px;border-radius:10px;}
  .by-post-thumb{width:100%;height:180px;border-radius:8px;}
  .by-post-title{font-size:16px;margin-bottom:6px;}
  .by-post-excerpt{font-size:13px;margin-bottom:8px;}
  .by-post-tags{margin-bottom:6px;}
  .by-post-tags .by-tag{padding:2px 8px;font-size:11px;margin:0 4px 4px 0;}
  .by-post-meta{margin-top:6px;font-size:11.5px;gap:8px;}
  .by-top-flag{font-size:10px;padding:2px 7px;}

  /* ----- 侧边栏：关键修复，手机端强制单列 ----- */
  .by-sidebar{flex-direction:column;flex-wrap:nowrap;gap:12px;}
  .by-widget{flex:1 1 100%!important;width:100%;padding:14px;border-radius:10px;}
  .by-master{flex-basis:100%!important;padding:16px 14px;}
  .by-master-avatar{width:56px;height:56px;margin-bottom:8px;}
  .by-master-name{font-size:15px;margin-bottom:2px;}
  .by-master-intro{font-size:12px;margin-bottom:10px;}
  .by-master-icons{gap:8px;}
  .by-master-icons .by-circle{width:30px;height:30px;}
  .by-widget-title{font-size:15px;margin-bottom:12px;padding-left:8px;}
  .by-widget-title::before{width:3px;height:14px;}
  .by-mini-list li{margin-bottom:10px;}
  .by-mini-item{gap:8px;}
  .by-mini-item img{width:56px;height:42px;border-radius:6px;}
  .by-mini-title{font-size:13px;}
  .by-mini-meta{font-size:11px;}
  .by-tagcloud{gap:6px;}
  .by-tagcloud a{font-size:12px;padding:3px 8px;}
  .by-cmt-list li{padding:8px 0;gap:8px;}
  .by-cmt-avatar{width:30px;height:30px;border-radius:6px;}
  .by-cmt-head{font-size:12px;gap:6px;}
  .by-cmt-head b{font-size:12.5px;}
  .by-cmt-head span{font-size:11px;}
  .by-cmt-text{font-size:12px;}
  .by-tab-head{gap:12px;margin-bottom:10px;}
  .by-tab-head button{font-size:13px;padding-bottom:6px;}
  .by-rank-list li{padding:5px 0;gap:8px;}
  .by-rank-no{width:16px;height:16px;font-size:11px;border-radius:4px;}
  .by-rank-list a{font-size:13px;}

  /* ----- 归档 / 搜索头部 ----- */
  .by-archive-head{padding:18px 16px;margin-bottom:14px;border-radius:10px;}
  .by-archive-head h1{font-size:19px;margin-bottom:4px;}
  .by-archive-head p{font-size:13px;}
  .by-bigsearch{padding:12px;border-radius:10px;gap:8px;}
  .by-bigsearch input{padding:10px 12px;font-size:14px;}
  .by-bigsearch button{padding:0 18px;font-size:14px;}
  .by-search-stat{padding:10px 4px;font-size:13px;}
  .by-empty{padding:50px 20px;border-radius:10px;font-size:14px;}

  /* ----- 文章详情页 ----- */
  .by-detail,.by-page-card{padding:18px 14px;border-radius:10px;margin-bottom:14px;}
  .by-breadcrumb{font-size:12px;margin-bottom:14px;gap:6px;}
  .by-detail-head{padding-bottom:16px;margin-bottom:18px;}
  .by-detail-title{font-size:20px;margin-bottom:12px;}
  .by-detail-author{font-size:13px;gap:6px;margin-bottom:8px;}
  .by-detail-meta{font-size:12px;gap:8px;}
  .by-detail-content{font-size:14.5px;line-height:1.8;padding:16px 14px;border-radius:10px;}
  .by-detail-content p{margin-bottom:14px;}
  .by-detail-content h2{font-size:19px;margin:22px 0 12px;}
  .by-detail-content h3{font-size:17px;padding-left:9px;margin:20px 0 10px;}
  .by-detail-content h4{font-size:15px;margin:18px 0 8px;}
  .by-detail-content img{border-radius:6px;margin:12px auto;}
  .by-detail-content blockquote{padding:10px 14px;margin:14px 0;font-size:14px;}
  .by-detail-content pre{padding:12px;font-size:12.5px;margin:14px 0;border-radius:8px;}
  .by-detail-content code{font-size:12.5px;padding:2px 5px;}
  .by-detail-content ul,.by-detail-content ol{padding-left:18px;margin-bottom:14px;}
  .by-detail-content li{margin-bottom:5px;}
  .by-detail-content table{font-size:13px;margin:14px 0;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .by-detail-content th,.by-detail-content td{padding:6px 10px;white-space:nowrap;}

  /* 下载区 */
  .by-download{padding:14px;margin:20px 0;border-radius:10px;}
  .by-download-head{margin-bottom:12px;}
  .by-download-head h3{font-size:15px;padding-left:8px;}
  .by-download-head h3::before{width:3px;height:14px;}
  .by-download-head span{font-size:12px;}
  .by-download-item{flex-direction:column;align-items:stretch;gap:10px;padding:12px;}
  .by-file-info{gap:10px;}
  .by-file-name{font-size:13.5px;}
  .by-file-size{font-size:12px;}
  .by-download-item .by-btn-primary{width:100%;text-align:center;padding:10px;}
  .by-pay-box{padding:16px;margin-top:12px;border-radius:10px;}
  .by-pay-qrcode{max-width:200px;}
  .by-pay-notice{font-size:13px;}
  .by-endline{margin:20px 0 16px;font-size:12px;gap:10px;}
  .by-detail-tags{margin-bottom:12px;}
  .by-cc{font-size:12px;gap:7px;padding-top:14px;line-height:1.6;}
  .by-detail-foot{margin-top:14px;flex-wrap:wrap;gap:10px;}
  .by-useful{font-size:13px;padding:6px 14px;}
  .by-detail-view{font-size:12px;}

  /* 折叠下载 */
  .by-download-collapsible{margin:18px 0;}
  .by-download-toggle{padding:12px 14px;border-radius:10px 10px 0 0;}
  .by-download-toggle h3{font-size:15px;}
  .by-download-body{padding:12px 14px;border-radius:0 0 10px 10px;}
  .by-netdisk-item{flex-wrap:wrap;padding:10px;gap:10px;}
  .by-nd-info{flex:1 1 calc(100% - 48px);}
  .by-nd-action{width:100%;justify-content:flex-end;}
  .by-btn-outline{padding:6px 12px;font-size:12.5px;}

  /* 相关阅读 */
  .by-related{padding:16px 14px;margin-bottom:14px;border-radius:10px;}
  .by-block-title{font-size:16px;margin-bottom:12px;padding-left:10px;}
  .by-block-title::before{width:3px;height:14px;}
  .by-related-grid{grid-template-columns:1fr;gap:10px;}
  .by-related-item{padding:10px;gap:10px;border-radius:8px;min-width:0;max-width:100%;overflow:hidden;}
  .by-related-item img{width:80px;height:56px;border-radius:6px;}
  .by-related-body{min-width:0;flex:1;max-width:calc(100% - 90px);overflow:hidden;}
  .by-related-title{font-size:13.5px;word-break:break-word;overflow-wrap:break-word;}
  .by-related-meta{font-size:11px;}

  /* 上下篇：隐藏空卡片 */
  .by-prevnext{flex-direction:column;gap:8px;margin-bottom:14px;}
  .by-prevnext>div{padding:10px 12px;border-radius:8px;min-width:0;}
  .by-prevnext>div:not(:has(a)){display:none;}
  .by-prevnext span{font-size:11px;margin-bottom:2px;}
  .by-prevnext a{font-size:13px;word-break:break-all;}
  .by-next{text-align:left;}

  /* ----- 独立页面 / 友链 ----- */
  .by-page-banner{height:100px;margin-bottom:14px;border-radius:10px;}
  .by-page-banner h1{font-size:22px;}
  .by-links-grid{grid-template-columns:repeat(2,1fr);gap:10px;margin:16px 0;}
  .by-link-card{padding:10px;gap:8px;border-radius:8px;}
  .by-link-card img,.by-link-letter{width:36px;height:36px;border-radius:8px;font-size:17px;}
  .by-link-text b{font-size:13px;}
  .by-link-text em{font-size:11.5px;}
  .by-join-btn{padding:11px;font-size:14px;border-radius:8px;}

  /* ----- 评论区 ----- */
  .by-comments{padding:16px 14px;border-radius:10px;}
  .by-cmt-form{margin-bottom:20px;}
  .by-cmt-inputrow{gap:10px;}
  .by-cmt-avatar{width:36px;height:36px;border-radius:8px;}
  .by-cmt-main textarea{padding:10px 12px;font-size:14px;border-radius:8px;}
  .by-cmt-fields{flex-direction:column;gap:8px;margin-top:8px;}
  .by-cmt-fields input{padding:9px 12px;font-size:14px;}
  .by-cmt-verify{flex-wrap:wrap;gap:8px;margin-top:8px;}
  .by-cmt-verify input{width:100%;flex:1;min-width:120px;}
  .by-cmt-verify img{height:38px;}
  .by-cmt-bar{margin-top:10px;gap:8px;flex-direction:column;align-items:stretch;}
  .by-cmt-tools{gap:6px;flex-wrap:nowrap;width:100%;}
  .by-cmt-tools button{font-size:12px;padding:7px 4px;flex:1;min-width:0;text-align:center;white-space:nowrap;}
  .by-cmt-bar .by-btn-primary{width:100%;padding:10px;font-size:14px;}
  .by-cmt-list .by-cmt-item{padding:12px 0;gap:10px;}
  .by-cmt-useravatar img{width:36px;height:36px;border-radius:8px;}
  .by-cmt-info{gap:6px;flex-wrap:wrap;margin-bottom:3px;}
  .by-cmt-info b{font-size:13px;}
  .by-badge-master{font-size:10px;padding:1px 6px;}
  .by-floor{font-size:11px;}
  .by-cmt-text{font-size:13.5px;line-height:1.65;}
  .by-cmt-foot{gap:12px;font-size:12px;margin-top:4px;}
  .by-cmt-children{margin-top:10px;padding:10px 12px;border-radius:8px;}
  .by-cmt-empty{padding:24px 0;font-size:13px;}

  /* ----- 分页 ----- */
  .by-pagination{gap:6px;margin-top:20px;}
  .by-pagination a,.by-pagination span{
    min-width:34px;height:34px;padding:0 8px;font-size:13px;border-radius:7px;
  }

  /* ----- 登录 / 注册弹窗 ----- */
  .by-modal{padding:14px;}
  .by-modal-box{padding:22px 18px;border-radius:14px;}
  .by-modal-close{right:12px;top:10px;font-size:22px;}
  .by-modal-title{font-size:19px;}
  .by-modal-switch{top:28px;right:18px;font-size:12px;}
  .by-auth-form{margin-top:14px;gap:11px;}
  .by-input input{padding:10px 40px 10px 38px;font-size:14px;}
  .by-form-row{font-size:12.5px;}
  .by-modal-note{font-size:11.5px;}

  /* toast */
  .by-toast{top:64px;padding:10px 18px;font-size:13px;max-width:calc(100% - 28px);text-align:center;}

  /* ----- 页脚 ----- */
  .by-footer{padding:22px 0;}
  .by-footer-inner{flex-direction:column;gap:16px;text-align:center;}
  .by-logo-footer{font-size:20px;margin-bottom:8px;}
  .by-footer-brand p{font-size:12px;margin-bottom:3px;}
  .by-footer-mid{min-width:100%;}
  .by-footer-links{padding:12px 14px;border-radius:8px;}
  .by-footer-links-title{font-size:13px;margin-bottom:8px;}
  .by-footer-links-list{justify-content:center;gap:6px 14px;}
  .by-footer-links-list a{font-size:12.5px;}
  .by-footer-nav{justify-content:center;gap:14px;font-size:13px;margin-bottom:8px;}
  .by-footer-icons{justify-content:center;}

  /* 回到顶部 */
  .by-backtop{width:40px;height:40px;right:16px;bottom:20px;}

  /* 404 */
  .by-404{padding:60px 16px;border-radius:10px;}
  .by-404-code{font-size:64px;margin-bottom:12px;}
  .by-404 p{font-size:14px;margin-bottom:18px;}
}

/* ==================================================================
   小屏手机（≤480px）
   ================================================================== */
@media (max-width:480px){
  .by-container{padding:0 12px;}
  .by-main{padding:12px 0 26px;}

  /* 导航更紧凑 */
  .by-nav{gap:6px;}
  .by-logo{font-size:16px;}
  .by-icon-btn{width:32px;height:32px;}
  .by-icon-btn svg{width:16px;height:16px;}

  /* 轮播 */
  .by-banner{height:120px;}
  .by-banner-text{padding:0 16px;}
  .by-banner-text h2{font-size:17px;}
  .by-banner-text p{font-size:12px;}

  /* 文章卡片 */
  .by-post-thumb{height:160px;}
  .by-post-card{padding:10px;gap:10px;}
  .by-post-title{font-size:15px;}
  .by-post-excerpt{font-size:12.5px;-webkit-line-clamp:2;}
  .by-post-meta{font-size:11px;flex-wrap:wrap;}

  /* 文章详情 */
  .by-detail,.by-page-card{padding:14px 12px;}
  .by-detail-title{font-size:18px;}
  .by-detail-meta{gap:6px;font-size:11px;}
  .by-detail-content{font-size:14px;padding:14px 12px;}
  .by-detail-content h2{font-size:17px;}
  .by-detail-content h3{font-size:15.5px;}
  .by-detail-content pre{font-size:12px;padding:10px;}

  /* 友链单列 */
  .by-links-grid{grid-template-columns:1fr;}

  /* 分页 */
  .by-pagination a,.by-pagination span{min-width:32px;height:32px;font-size:12px;}

  /* 弹窗 */
  .by-modal-box{padding:20px 16px;}
}

/* ==================================================================
   超小屏手机（≤360px）
   ================================================================== */
@media (max-width:360px){
  .by-post-thumb{height:140px;}
  .by-banner{height:105px;}
  .by-banner-text h2{font-size:15px;}
  .by-detail-title{font-size:17px;}
  .by-logo{font-size:15px;letter-spacing:0;}
}

/* ==================================================================
   触摸设备：移除 hover 效果，避免点击后残留
   ================================================================== */
@media (hover:none) and (pointer:coarse){
  .by-post-card:hover{transform:none;box-shadow:none;}
  .by-post-card:hover .by-post-thumb img{transform:none;}
  .by-link-card:hover{transform:none;}
  .by-banner-prev,.by-banner-next{opacity:.7;}
  .by-menu li:hover>ul{display:block;}
}

/* ==================================================================
   刘海屏 / 全面屏安全区域
   ================================================================== */
@supports (padding:max(0px)){
  @media (max-width:768px){
    .by-header{padding-top:calc(10px + env(safe-area-inset-top));}
    .by-menu{top:calc(var(--by-header-h) + 20px + env(safe-area-inset-top));}
    .by-footer{padding-bottom:calc(22px + env(safe-area-inset-bottom));}
    .by-backtop{bottom:calc(20px + env(safe-area-inset-bottom));}
  }
}

/* ==================================================================
   全局防横向溢出
   ================================================================== */
html,body{overflow-x:hidden;max-width:100%;}
.by-detail-content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.by-detail-content pre{overflow-x:auto;-webkit-overflow-scrolling:touch;}
img{max-width:100%;}

.by-searchbar{border-color:transparent!important;}
.by-searchbar.open{border-color:var(--by-nav-border)!important;}
.by-searchbar{border:0!important;}
.by-searchbar.open{border:1px solid var(--by-nav-border)!important;}

/* 字体与字号整体优化 */
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","HarmonyOS Sans SC","Source Han Sans SC","Noto Sans CJK SC",sans-serif !important;
  font-size:16px !important;
  line-height:1.78;
  letter-spacing:.2px;
}
.by-nav{font-size:16px;}
.by-menu>ul>li>a{font-size:16px;padding:8px 14px;}
.by-logo{font-size:22px;}
.by-searchbar input{font-size:16px;}
.by-post-card h3,.by-detail-title{font-size:16px;}
.by-post-card p,.by-detail-content p{font-size:14px;}
.by-sidebar .by-tab-head button{font-size:15px;}
.by-tag{font-size:13px;}
.by-userbtn{font-size:14px;}

/* 导航+下拉菜单 统一中性灰磨砂 */
.by-nav{
  background:rgba(210,213,218,.6) !important;
  border-color:rgba(255,255,255,.45) !important;
}
.by-menu li ul{
  background:rgba(235,237,240,.85) !important;
  -webkit-backdrop-filter:blur(20px) saturate(160%) !important;
  backdrop-filter:blur(20px) saturate(160%) !important;
  border:1px solid rgba(255,255,255,.5) !important;
  border-radius:12px !important;
  box-shadow:0 8px 28px rgba(31,33,38,.12) !important;
}
.by-menu li ul li{border-bottom-color:rgba(0,0,0,.06) !important;}
.by-menu li ul a{color:#2c2f36 !important;}
.by-menu li ul a:hover{background:rgba(255,255,255,.6) !important;color:#000 !important;}
.by-userdrop{
  background:rgba(235,237,240,.9) !important;
  -webkit-backdrop-filter:blur(20px) !important;
  backdrop-filter:blur(20px) !important;
  border:1px solid rgba(255,255,255,.5) !important;
}
.by-userdrop a{color:#2c2f36 !important;}
.by-userdrop a:hover{background:rgba(255,255,255,.6) !important;}

.by-nav{background:rgba(210,213,218,.6)!important;border-color:rgba(255,255,255,.45)!important;}

html[data-theme="light"]{--by-bg:#dcdfe4;--by-bg-2:#d2d5da;--by-footer:#e3e5e9;}


/* diary article scroll area */
@media (min-width:769px){.by-detail-content{max-height:calc(100vh - 120px);overflow-y:auto;-webkit-overflow-scrolling:touch}}
.by-detail-content::-webkit-scrollbar{width:8px}
.by-detail-content::-webkit-scrollbar-thumb{background:#c8cdd4;border-radius:4px}

/* diary compact post bottom */
.by-download{padding:12px;margin:10px 0 8px}
.by-download-head{margin-bottom:8px}
.by-download-head h3{font-size:15px}
.by-netdisk-item{padding:8px;gap:8px;margin-bottom:6px}
.by-endline{margin:14px 0 6px}
.by-detail-tags{margin-bottom:8px}
.by-tag{padding:2px 10px;font-size:12.5px;margin:0 5px 5px 0}
.by-detail-foot{justify-content:flex-end;margin-top:10px}

/* diary download card beautify */
.by-download{box-shadow:0 2px 10px rgba(0,0,0,.06)}
.by-download-head h3{font-weight:700}
.by-nd-icon{border-radius:50%;width:40px;height:40px;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.by-nd-icon svg{width:20px;height:20px}
.by-nd-type-tag{border-radius:20px;padding:2px 9px;font-size:11px}
.by-nd-name{font-size:14.5px;font-weight:600}
.by-nd-action .by-btn-primary{border-radius:9px;box-shadow:0 2px 6px rgba(0,0,0,.12);padding:7px 22px;font-weight:500}
/* prevnext single-line harden */
.by-prevnext a{max-width:100%;display:block}

/* diary gray unified */
.by-detail{background:var(--by-card-2)}
.by-detail-content{background:var(--by-card-2);border:1px solid var(--by-border-soft)}
.by-detail-content code{background:#e8ebf0}

/* diary gray unified v142 - home & sidebar & article bottom */
.by-post-card{background:var(--by-card-2)}
.by-widget{background:var(--by-card-2)}
.by-bigsearch{background:var(--by-card-2)}
.by-related{background:var(--by-card-2)}
.by-prevnext>div{background:var(--by-card-2)}
.by-comments{background:var(--by-card-2)}
.by-page-card{background:var(--by-card-2)}
.by-archive-head{background:var(--by-card-2)}
.by-toolbar,.by-sortbar,.by-list-head{background:var(--by-card-2);border:1px solid var(--by-border-soft);border-radius:var(--by-radius)}
.by-in-article{margin:20px 0}

/* diary article typography beautify */
.by-detail-content{font-family:inherit}
.by-detail-content p{
  color:var(--by-text) !important;font-size:15.5px !important;line-height:1.9 !important;
  margin:0 0 18px !important;padding:0 !important;font-family:inherit !important;
  background:transparent !important;word-break:break-word !important;white-space:normal !important;
}
.by-detail-content h2,.by-detail-content h3,.by-detail-content h4{
  color:var(--by-text) !important;font-family:inherit !important;background:transparent !important;
  margin:28px 0 14px !important;padding-left:12px !important;border-left:4px solid var(--by-primary) !important;
  font-weight:700 !important;line-height:1.5 !important;
}
.by-detail-content h2{font-size:22px !important}
.by-detail-content h3{font-size:19px !important}
.by-detail-content h4{font-size:17px !important}
.by-detail-content img{background:transparent !important;border-radius:8px !important;max-width:100% !important;height:auto !important}
.by-detail-content a{color:var(--by-primary) !important}
.by-detail-content blockquote{
  background:var(--by-bg-2) !important;border-left:4px solid var(--by-primary) !important;
  margin:18px 0 !important;padding:12px 16px !important;border-radius:8px !important;
  color:var(--by-text-2) !important;font-size:14.5px !important;font-family:inherit !important;
}
.by-detail-content pre{
  background:#1f2329 !important;color:#e6edf3 !important;border-radius:10px !important;
  padding:16px 18px !important;overflow-x:auto !important;line-height:1.6 !important;
  font-size:14px !important;margin:16px 0 !important;font-family:Consolas,Monaco,monospace !important;
}
.by-detail-content code{background:#e8ebf0 !important;color:#c7254e !important;padding:2px 6px !important;border-radius:5px !important;font-size:13.5px !important}
.by-detail-content pre code{background:none !important;color:inherit !important;padding:0 !important;font-size:14px !important}
.by-detail-content ul,.by-detail-content ol{padding-left:22px !important;margin:0 0 16px !important;color:var(--by-text) !important;background:transparent !important}
.by-detail-content li{margin-bottom:6px !important;line-height:1.8 !important}
.by-detail-content table{width:100% !important;border-collapse:collapse !important;margin:16px 0 !important;background:transparent !important}
.by-detail-content th{background:var(--by-bg-2) !important;font-weight:600 !important}
.by-detail-content th,.by-detail-content td{border:1px solid var(--by-border) !important;padding:8px 12px !important;color:var(--by-text) !important}
.by-detail-content hr{border:0 !important;border-top:1px solid var(--by-border) !important;margin:24px 0 !important}

/* diary wider layout */
@media (min-width:1600px){:root{--by-maxw:1400px}}
@media (min-width:1200px) and (max-width:1599px){:root{--by-maxw:1300px}}

/* diary banner & sortbar fix */
.by-banner{height:240px}
.by-banner-slide{background-size:cover !important;background-position:center !important;background-repeat:no-repeat !important}
.by-sortbar{background:transparent !important;border:0 !important;border-radius:0 !important;padding:0 !important;box-shadow:none !important}

/* diary article head minimal */
.by-detail-head{padding-bottom:12px;margin-bottom:16px}
.by-detail-title{font-size:26px}

/* diary tag borderless */
.by-tag{border:0;background:var(--by-primary-soft);color:var(--by-primary)}
.by-tag:hover{background:var(--by-primary);color:#fff !important}

/* diary detail borderless */
.by-detail{border:0 !important;box-shadow:0 1px 4px rgba(0,0,0,.05)}
.by-detail-head{border-bottom:0 !important}

/* diary tag gray hover green */
.by-tag{background:var(--by-card-2) !important;color:var(--by-text-2) !important}
.by-tag:hover{background:var(--by-primary) !important;color:#fff !important}

/* diary article seamless */
.by-detail{background:transparent !important;border:0 !important;box-shadow:none !important;padding:20px 26px !important;margin-bottom:20px}

/* diary tag restore original border */
.by-tag{border:1px solid var(--by-border-soft) !important;background:var(--by-card-2) !important;color:var(--by-text-2) !important}
.by-tag:hover{background:var(--by-card-2) !important;color:var(--by-primary) !important;border-color:var(--by-primary) !important}

/* diary sidebar seamless */
.by-widget{border:0 !important;box-shadow:none !important}
.by-master{padding:12px 6px}

/* diary two column post list */
.by-post-list{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.by-post-tags{flex-wrap:nowrap !important;overflow:hidden !important;white-space:nowrap !important}
.by-post-tags .by-tag{flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:767px){.by-post-list{grid-template-columns:1fr}}

/* diary two column card fix + smooth transitions */
.by-post-list .by-post-card{flex-direction:column;gap:14px}
.by-post-list .by-post-thumb{width:100%;height:150px}
a,.by-btn,.by-tag,.by-circle,.by-banner-prev,.by-banner-next,.by-banner-dots button,.by-menu a,.by-submenu li a{transition:all .25s ease}
.by-submenu{display:block !important;opacity:0;visibility:hidden;transform:translateY(8px);transition:all .25s ease;pointer-events:none}
.by-has-sub:hover .by-submenu,.by-has-sub:focus-within .by-submenu{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
.by-menu>ul>li.by-has-sub:hover>a::after{transition:transform .25s ease}

/* diary two column refined v2 */
.by-post-list{grid-template-columns:repeat(2,1fr);gap:18px}
.by-post-list .by-post-card{flex-direction:column;gap:12px;padding:14px;min-width:0}
.by-post-list .by-post-thumb{width:100%;height:120px;flex-shrink:0;border-radius:8px}
.by-post-list .by-post-body{min-width:0}
.by-post-list .by-post-title{font-size:16px;margin-bottom:6px;line-height:1.45}
.by-post-list .by-post-title a{-webkit-line-clamp:2}
.by-post-list .by-post-excerpt{font-size:13px;line-height:1.55;margin-bottom:8px}
.by-post-list .by-post-tags{gap:0}
.by-post-list .by-post-tags .by-tag{font-size:11px;padding:1px 8px;margin-right:5px}
.by-post-list .by-post-meta{margin-top:8px;font-size:12px}
@media (max-width:767px){.by-post-list{grid-template-columns:1fr}}

/* diary two column card left-thumb v3 */
.by-post-list .by-post-card{flex-direction:row;gap:12px;padding:12px;min-width:0;align-items:stretch}
.by-post-list .by-post-thumb{width:110px;flex-shrink:0;border-radius:8px;min-height:92px;align-self:stretch}
.by-post-list .by-post-thumb img{object-fit:cover;height:100%}
.by-post-list .by-post-body{min-width:0;flex:1;display:flex;flex-direction:column}
.by-post-list .by-post-title{font-size:15px;margin-bottom:6px;line-height:1.4}
.by-post-list .by-post-title a{-webkit-line-clamp:2}
.by-post-list .by-post-excerpt{font-size:12.5px;line-height:1.5;margin-bottom:6px}
.by-post-list .by-post-tags{gap:0;margin-bottom:0}
.by-post-list .by-post-tags .by-tag{font-size:11px;padding:1px 7px;margin-right:4px}
.by-post-list .by-post-meta{margin-top:auto;padding-top:6px;font-size:11.5px}
@media (max-width:767px){.by-post-list{grid-template-columns:1fr}}

/* diary two column thumb landscape v4 */
.by-post-list .by-post-thumb{width:120px;height:88px;align-self:center;border-radius:8px;flex-shrink:0}
.by-post-list .by-post-thumb img{object-fit:cover;width:100%;height:100%}

/* diary two column thumb fill v5 */
.by-post-list .by-post-thumb{width:170px;align-self:stretch;border-radius:8px;flex-shrink:0;min-height:110px}
.by-post-list .by-post-thumb img{object-fit:cover;width:100%;height:100%}

/* diary sidebar hot align with post list */
.by-sidebar .by-widget:nth-of-type(2){margin-top:50px}

/* diary post card ratio like ref */
.by-post-list .by-post-thumb{width:240px;min-height:130px}

/* diary card compact ratio */
.by-post-list .by-post-thumb{width:200px;height:118px;align-self:center;min-height:0}
.by-post-list .by-post-title{font-size:15px;margin-bottom:4px;line-height:1.4}
.by-post-list .by-post-excerpt{font-size:12.5px;line-height:1.5;margin-bottom:6px}
.by-post-list .by-post-meta{margin-top:auto;padding-top:4px}

/* diary sidebar hot align v2 */
.by-sidebar .by-widget:nth-of-type(2){margin-top:33px}

/* diary sidebar align v3: master=h banner, hot=post cards */
.by-master{min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.by-sidebar .by-widget:nth-of-type(2){margin-top:50px}
@media (max-width:768px){.by-master{min-height:auto;display:block}}

/* diary master card redesign v6 */
.by-master{position:relative;overflow:hidden;background:linear-gradient(160deg,var(--by-card-2),rgba(1,193,94,.07))}
.by-master::before{content:"";position:absolute;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(1,193,94,.16),transparent 70%);top:-50px;right:-50px;pointer-events:none}
.by-master::after{content:"";position:absolute;width:130px;height:130px;border-radius:50%;background:radial-gradient(circle,rgba(0,212,255,.10),transparent 70%);bottom:-40px;left:-40px;pointer-events:none}
.by-master-avatar{border:2px solid var(--by-primary);box-shadow:0 0 0 4px rgba(1,193,94,.14),0 6px 16px rgba(1,193,94,.22)}
.by-master-name{
  background:linear-gradient(90deg,var(--by-primary) 0%,#00d4ff 25%,var(--by-primary) 55%,#00d4ff 80%,var(--by-primary) 100%);
  background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;
  animation:byFlow 3.5s linear infinite;
}
@keyframes byFlow{0%{background-position:0% center}100%{background-position:200% center}}
.by-master-intro{letter-spacing:2px}
.by-master-icons .by-circle{background:linear-gradient(135deg,var(--by-primary),#00d4ff);color:#fff;border:0;box-shadow:0 4px 10px rgba(1,193,94,.25)}
.by-master-icons .by-circle:hover{transform:translateY(-3px);box-shadow:0 8px 18px rgba(1,193,94,.38)}

/* diary header nebula */
.by-nav{
  background:linear-gradient(120deg,rgba(1,193,94,.16),rgba(0,212,255,.13),rgba(106,168,254,.16),rgba(1,193,94,.13)) !important;
  background-size:300% 300% !important;
  animation:byNebula 10s ease infinite !important;
}
@keyframes byNebula{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}

/* diary master contact button */
.by-master-contact{display:inline-block;padding:6px 20px;border-radius:20px;background:linear-gradient(135deg,var(--by-primary),#00d4ff);color:#fff;font-size:12.5px;letter-spacing:2px;box-shadow:0 4px 10px rgba(1,193,94,.25);transition:all .25s ease}
.by-master-contact:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(1,193,94,.4);color:#fff}

/* diary master qq wx icons */
.by-master-icons .by-circle-qq,.by-master-icons .by-circle-wx{background:linear-gradient(135deg,var(--by-primary),#00d4ff);color:#fff;border:0;box-shadow:0 4px 10px rgba(1,193,94,.25)}
.by-master-icons .by-circle-qq:hover,.by-master-icons .by-circle-wx:hover{transform:translateY(-3px);box-shadow:0 8px 18px rgba(1,193,94,.38);color:#fff}

/* diary footer seamless */
.by-footer{background:var(--by-bg) !important;border-top:1px solid var(--by-border-soft)}

/* diary footer flow line */
.by-footer{position:relative;border-top:0 !important}
.by-footer::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--by-primary),#00d4ff,var(--by-primary),transparent);background-size:200% 100%;animation:byFlowLine 4s linear infinite;pointer-events:none}
@keyframes byFlowLine{0%{background-position:0% 0}100%{background-position:200% 0}}

/* diary header nebula v2 unified green */
.by-nav{
  background:linear-gradient(120deg,rgba(1,193,94,.16),rgba(1,193,94,.04),rgba(1,193,94,.16)) !important;
  background-size:300% 300% !important;
  animation:byNebula 10s ease infinite !important;
}

/* diary header dark aurora v2 */
.by-nav{background:#1f2429 !important;position:relative;overflow:hidden}
.by-nav::before{content:"";position:absolute;inset:0;border-radius:18px;pointer-events:none;background:radial-gradient(ellipse 120% 80% at 20% -30%,rgba(1,193,94,.45),transparent 55%),radial-gradient(ellipse 100% 70% at 80% -30%,rgba(0,212,255,.38),transparent 55%),radial-gradient(ellipse 140% 90% at 50% 130%,rgba(106,168,254,.28),transparent 60%);animation:byAurora 7s ease-in-out infinite}
@keyframes byAurora{0%,100%{transform:translateX(-4%)}50%{transform:translateX(4%)}}
.by-nav .by-logo,.by-nav .by-menu a,.by-nav .by-nav-right .by-icon-btn,.by-nav .by-username,.by-nav .by-userbtn span{color:#fff !important}
.by-nav .by-menu a:hover,.by-nav .by-logo:hover{color:var(--by-primary) !important}
.by-nav .by-burger span{background:#fff !important}

/* diary header dark aurora v3 fixed */
.by-nav{background:rgba(36,42,48,.66) !important;position:relative;isolation:isolate;overflow:visible !important;-webkit-backdrop-filter:saturate(160%) blur(20px) !important;backdrop-filter:saturate(160%) blur(20px) !important}
.by-nav::before{content:"";position:absolute;inset:0;border-radius:18px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 120% 80% at 20% -30%,rgba(1,193,94,.5),transparent 55%),radial-gradient(ellipse 100% 70% at 80% -30%,rgba(0,212,255,.42),transparent 55%),radial-gradient(ellipse 140% 90% at 50% 130%,rgba(106,168,254,.32),transparent 60%);background-size:200% 100%;animation:byAurora 7s ease-in-out infinite}
@keyframes byAurora{0%{background-position:0% 0}50%{background-position:100% 0}100%{background-position:0% 0}}

/* diary submenu unify dark */
.by-menu li ul{background:rgba(36,42,48,.95) !important;border:1px solid rgba(255,255,255,.09) !important;box-shadow:0 10px 28px rgba(0,0,0,.4) !important}
.by-menu li ul li{border-bottom:1px solid rgba(255,255,255,.07) !important}
.by-menu li ul a{color:rgba(255,255,255,.88) !important}
.by-menu li ul a:hover{color:var(--by-primary) !important;background:rgba(1,193,94,.1) !important}

/* diary footer redesign v2 */
.by-footer-inner{flex-direction:column;align-items:center;text-align:center;gap:8px}
.by-footer-brand{display:flex;flex-direction:column;align-items:center;gap:4px}
.by-footer-mid{flex:none;min-width:0;width:100%;max-width:560px;display:flex;justify-content:center}
.by-footer-links-mid{margin:0 auto}
.by-footer-icons{justify-content:center}
.by-logo-footer{background:linear-gradient(90deg,var(--by-primary),#00d4ff,var(--by-primary)) 200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;animation:byFlow 3.5s linear infinite}
.by-footer-brand p{margin:0}
.by-footer-icons .by-circle{background:linear-gradient(135deg,var(--by-primary),#00d4ff);color:#fff;border:0;box-shadow:0 4px 10px rgba(1,193,94,.25)}
.by-footer-icons .by-circle:hover{transform:translateY(-3px);box-shadow:0 8px 18px rgba(1,193,94,.38);color:#fff}

/* diary login modal bg = master card */
.by-modal-box{background:linear-gradient(160deg,var(--by-card-2),rgba(1,193,94,.07)) !important;overflow:hidden}
.by-modal-box::before{content:"";position:absolute;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(1,193,94,.16),transparent 70%);top:-50px;right:-50px;pointer-events:none;z-index:0}
.by-modal-box::after{content:"";position:absolute;width:130px;height:130px;border-radius:50%;background:radial-gradient(circle,rgba(0,212,255,.10),transparent 70%);bottom:-40px;left:-40px;pointer-events:none;z-index:0}
.by-modal-box>*{position:relative;z-index:1}

/* diary main compact v2 */
.by-main{min-height:calc(100vh - 340px)}
.by-footer{padding:24px 0}
.by-pagination{margin-top:18px}

/* diary login modal v2 solid */
.by-modal-box{background:linear-gradient(160deg,var(--by-card-2),rgba(1,193,94,.16)) !important}
.by-modal-box::before{width:120px;height:120px;background:radial-gradient(circle,rgba(1,193,94,.10),transparent 70%)}
.by-modal-switch{color:#017a45 !important;font-weight:600}

/* diary footer tight top */
.by-footer{padding:12px 0 20px}
.by-logo-footer{font-size:20px;margin-bottom:2px}
.by-footer-brand{gap:2px}

/* diary login modal v3 switch+note */
.by-modal-switch{position:static;display:block;text-align:center;margin:10px 0 4px;font-size:14px;font-weight:600;color:var(--by-primary)}
.by-modal-note{font-size:12.5px;color:var(--by-text-2);line-height:1.6}

/* diary card thumb v2 bigger top-aligned */
.by-post-list .by-post-thumb{width:220px;height:150px;align-self:flex-start}

/* diary card thumb v3 taller */
.by-post-list .by-post-thumb{width:220px;height:180px;align-self:flex-start}

/* diary card meta compact v2 */
.by-post-list .by-post-meta{margin-top:8px;padding-top:0;font-size:11.5px}

/* diary card thumb v4 230x150 */
.by-post-list .by-post-thumb{width:230px;height:150px;align-self:flex-start}

/* diary login modal v4 close+title */
.by-modal-close{right:16px;top:16px;font-size:13px;color:var(--by-text-2);background:var(--by-card-2);border:1px solid var(--by-border-soft);border-radius:8px;padding:4px 10px;line-height:1.4;width:auto;height:auto}
.by-modal-close:hover{color:var(--by-primary);border-color:var(--by-primary)}
.by-modal-title{text-align:center}

/* diary card thumb v5 220x160 */
.by-post-list .by-post-thumb{width:220px;height:160px;align-self:flex-start}

/* diary login modal v5 fix close+opaque */
.by-modal-close{position:absolute !important;right:16px !important;top:16px !important}
.by-modal-box{background:var(--by-card-2) !important}

/* diary card thumb v6 210x145 */
.by-post-list .by-post-thumb{width:210px;height:145px;align-self:flex-start}

/* diary card thumb v7 210x140 */
.by-post-list .by-post-thumb{width:210px;height:140px;align-self:flex-start}

/* diary tag visible v2 */
.by-tag{color:var(--by-text);border-color:rgba(1,193,94,.45);background:rgba(1,193,94,.07)}
.by-tag:hover{background:rgba(1,193,94,.12)}

/* diary card align fix */
.by-post-list .by-post-title{min-height:42px}
.by-post-list .by-post-excerpt{min-height:42px}

/* diary: master card flow border v193 */
.by-master{position:relative;box-shadow:0 8px 28px rgba(17,24,39,.12),0 2px 8px rgba(17,24,39,.08)!important}
.by-master-flow{position:absolute;inset:0;border:0;border-radius:inherit;pointer-events:none;z-index:1}
.by-flow-q1,.by-flow-q2{position:absolute;width:5px;height:5px;border-radius:50%;pointer-events:none;z-index:1}
.by-flow-q1{background:#01c15e;box-shadow:0 0 5px 1px rgba(1,193,94,.7),0 0 11px 2px rgba(1,193,94,.28)}
.by-flow-q2{background:#00d4ff;box-shadow:0 0 5px 1px rgba(0,212,255,.7),0 0 11px 2px rgba(0,212,255,.28)}
.by-flow-q1{animation:byFlowQ1 5s linear infinite}
.by-flow-q2{animation:byFlowQ2 5s linear infinite}
@keyframes byFlowQ1{0%,100%{top:-2.5px;left:-2.5px}25%{top:-2.5px;left:calc(100% - 2.5px)}50%{top:calc(100% - 2.5px);left:calc(100% - 2.5px)}75%{top:calc(100% - 2.5px);left:-2.5px}}
@keyframes byFlowQ2{0%,100%{top:-2.5px;left:calc(100% - 2.5px)}25%{top:calc(100% - 2.5px);left:calc(100% - 2.5px)}50%{top:calc(100% - 2.5px);left:-2.5px}75%{top:-2.5px;left:-2.5px}}

/* diary: nav userbox unified v197 */
.by-userbtn{background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.14)!important}
.by-username{font-size:14px!important;font-weight:500!important}
.by-avatar-xs{border:1.5px solid rgba(255,255,255,.35)!important}

/* diary: hot item card unify v198 */
.by-mini-item{padding:8px;border-radius:10px;background:transparent;transition:all var(--by-transition)}
.by-mini-item img{width:96px;height:72px;border-radius:8px;transition:transform .4s ease}
.by-mini-item:hover{background:var(--by-card-hover);transform:translateY(-2px);box-shadow:var(--by-shadow)}
.by-mini-item:hover img{transform:scale(1.06)}

/* diary: sidebar block align v202 */
.by-aside{display:flex;flex-direction:column}
.by-aside .by-widget:last-child{flex:1}


/* ==================================================================
   文章页优化补丁（基于线上 v204 真实 CSS 追加）
   1. 桌面端取消正文高度限制（原来正文锁在视口内、内部滚动看不全）
   2. 标题区居左、去分割线
   3. 正文去双层白卡
   4. 隐藏正文里与页面标题重复的 h1
   5. 表格/代码块/下载卡片/相关阅读精致化
   ================================================================== */
@media (min-width:769px){
  .by-detail-content{max-height:none !important;overflow-y:visible !important;}
}
/* 标题区：居左、一体化、去分割线 */
.by-detail-head{text-align:left;border-bottom:0;padding-bottom:0;margin-bottom:22px;}
.by-detail-title{font-size:26px;letter-spacing:-.3px;line-height:1.42;}
.by-detail-author{justify-content:flex-start;}
.by-detail-meta{justify-content:flex-start;}
/* 外层卡片：去边框、柔和阴影、大圆角 */
.by-detail{border:0;border-radius:20px;padding:36px 40px 26px;box-shadow:0 12px 48px rgba(15,23,42,.06),0 2px 8px rgba(15,23,42,.04);}
/* 正文融入外层，去内层白卡 */
.by-detail-content{background:transparent !important;padding:0 !important;border-radius:0 !important;}
/* 隐藏正文内与页面标题重复的 h1 */
.by-detail-content h1{display:none !important;}
/* 表格：圆角、无竖线、表头浅绿（!important 覆盖文章内联 border/padding） */
.by-detail-content table{width:fit-content !important;max-width:100% !important;table-layout:auto !important;border-collapse:separate !important;border-spacing:0 !important;border:1px solid var(--by-border-soft) !important;border-radius:12px;}
.by-detail-content th:first-child,.by-detail-content td:first-child{white-space:nowrap !important;}
.by-detail-content th,.by-detail-content td{border:0 !important;border-bottom:1px solid var(--by-border-soft) !important;padding:11px 15px !important;}
.by-detail-content th{background:var(--by-primary-soft) !important;font-weight:600;}
.by-detail-content th:first-child{border-top-left-radius:11px;}
.by-detail-content th:last-child{border-top-right-radius:11px;}
.by-detail-content tbody tr:last-child td{border-bottom:0;}
/* 代码块：深色质感（覆盖文章内联样式） */
.by-detail-content pre{background:#0f172a !important;border:0 !important;border-radius:12px !important;color:#e2e8f0 !important;}
.by-detail-content pre code{color:#e2e8f0 !important;background:none !important;}
/* 图片 */
.by-detail-content img{border-radius:12px;}
/* 下载卡片：去硬边框 */
.by-download{border:0;background:var(--by-card-2);border-radius:14px;}
.by-download-item{border:0;box-shadow:0 2px 10px rgba(15,23,42,.05);}
/* 相关阅读：去边框 + 柔和阴影 */
.by-related{border:0;border-radius:20px;box-shadow:0 12px 48px rgba(15,23,42,.05);}
/* 移动端：正文 padding 归零后由外层卡片承担边距，保持呼吸感 */
@media (max-width:768px){
  /* 移动端表格：自适应宽度+文字换行，不让表头被挤成竖排，也不横向溢出 */
  .by-detail-content table{display:table !important;width:100% !important;table-layout:auto !important;border-collapse:collapse !important;border-radius:0 !important;border:0 !important;overflow:visible !important;}
  .by-detail-content th,.by-detail-content td{padding:7px 9px !important;font-size:13px !important;white-space:normal !important;word-break:break-word !important;border-bottom:1px solid var(--by-border-soft) !important;}
  .by-detail-content th:first-child,.by-detail-content td:first-child{min-width:54px !important;}
  .by-detail-content th:first-child,.by-detail-content th:last-child{border-radius:0 !important;}
  .by-detail{padding:22px 16px 18px;border-radius:16px;}
  .by-detail-title{font-size:20px;line-height:1.45;}
  .by-detail-head{margin-bottom:16px;}
}


/* ==================================================================
   侧栏 & 封面优化补丁（v206）
   1) 侧栏收窄 2) 卡片去边框+统一圆角 3) 热门排行式 4) 标签紧凑
   5) 文章封面（海报）限高，不再霸屏
   ================================================================== */
@media (min-width:901px){.by-sidebar{width:280px;}}
/* 卡片统一：无边框、白底、16px 圆角、柔和阴影 */
.by-widget{border:0 !important;border-radius:16px !important;padding:18px 16px !important;box-shadow:0 10px 30px rgba(15,23,42,.05);}
.by-widget-title{font-size:14px !important;margin-bottom:14px !important;letter-spacing:.2px;}
/* 热门：行分隔 + 标题中性色（不再一片绿）+ 两行截断 */
.by-mini-list{list-style:none;margin:0;padding:0;}
.by-mini-list li+li{border-top:1px solid var(--by-border-soft);}
.by-mini-item{display:flex;gap:10px;align-items:center;padding:10px 4px !important;border-radius:8px;}
.by-mini-item img{width:72px !important;height:48px !important;border-radius:8px;object-fit:cover;flex-shrink:0;}
.by-mini-body{gap:3px !important;}
.by-mini-title{color:var(--by-text) !important;font-size:13px !important;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500;}
.by-mini-meta{font-size:11px !important;color:var(--by-text-3) !important;}
.by-mini-item:hover .by-mini-title{color:var(--by-primary) !important;}
/* 标签：紧凑胶囊、悬停变绿 */
.by-tagcloud{gap:8px !important;}
.by-tagcloud a{font-size:12px !important;padding:5px 10px !important;border-radius:8px !important;background:var(--by-bg-soft,#f4f5f7) !important;color:var(--by-text-2) !important;border:0 !important;line-height:1.4;transition:all .18s;}
.by-tagcloud a:hover{background:var(--by-primary-soft) !important;color:var(--by-primary) !important;}
.by-tagcloud a em{color:var(--by-text-3);font-style:normal;font-size:11px;}
/* 文章封面（海报）限高，居中不裁切 */
.by-detail-content figure.article-cover{text-align:center;margin:0 0 20px !important;}
.by-detail-content figure.article-cover img{width:auto !important;max-width:100% !important;max-height:400px !important;border-radius:12px;margin:0 auto;display:block;object-fit:contain;}
@media (max-width:768px){
  .by-detail-content figure.article-cover img{max-height:220px !important;}
}

/* 封面 figure 去掉多余外框，只留图片本身 */
.by-detail-content figure.article-cover{border:0 !important;background:transparent !important;padding:0 !important;box-shadow:none !important;overflow:visible !important;}

/* ==================================================================
   导航栏配色重做（v209）
   去掉绿/青/蓝紫极光流动，改浅色磨砂 + 绿色点缀，与白卡正文协调
   ================================================================== */
.by-nav{
  background:rgba(255,255,255,.86) !important;
  animation:none !important;
  border:1px solid rgba(15,23,42,.05) !important;
  box-shadow:0 6px 24px rgba(15,23,42,.07) !important;
}
.by-nav::before{display:none !important;}
.by-nav .by-logo,
.by-nav .by-menu a,
.by-nav .by-nav-right .by-icon-btn,
.by-nav .by-username,
.by-nav .by-userbtn span{color:#1f2125 !important;}
.by-nav .by-menu a:hover,
.by-nav .by-logo:hover{color:var(--by-primary) !important;}
.by-nav .by-burger span{background:#1f2125 !important;}
.by-logo::after{background:var(--by-primary) !important;height:2px;}

/* 下拉菜单：改白色卡片 + 深色文字，与新导航统一（v210） */
.by-menu li ul{background:#fff !important;border:1px solid rgba(15,23,42,.06) !important;box-shadow:0 12px 32px rgba(15,23,42,.12) !important;}
.by-menu li ul li{border-bottom:1px solid var(--by-border-soft) !important;}
.by-menu li ul a{color:#2c2f36 !important;}
.by-menu li ul a:hover{background:rgba(1,193,94,.08) !important;color:var(--by-primary) !important;}
.by-submenu{background:#fff !important;border:1px solid rgba(15,23,42,.06) !important;box-shadow:0 12px 32px rgba(15,23,42,.12) !important;}
.by-submenu li a{color:#2c2f36 !important;}
