/* ==========================================================================
   reflow3 响应式重制版 (Responsive Redesign)
   基于原 reflow3 蓝色主题，适配移动端 / 平板 / 桌面
   ========================================================================== */
@charset "utf-8";

:root {
  --primary:   #2f6fb3;
  --primary-light: #5EAAE4;
  --primary-soft:  #A3D0F2;
  --soft-100:  #eef5fc;
  --bg:        #eef1f5;
  --card:      #ffffff;
  --text:      #2b2f36;
  --muted:     #7a8494;
  --border:    #e3e8ef;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.05);
  --maxw:      1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* 纵向 flex + min-height:100vh，让页脚在内容不足时也吸底 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; border: 0; display: block; }
a { text-decoration: none; color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-light); }
ul { list-style: none; }
.clear { clear: both; }

/* ---------- 顶部 ---------- */
#headerbg { background: linear-gradient(135deg, #2f6fb3 0%, #5EAAE4 100%); color: #fff; }
.header { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.logo h1 { font-size: 26px; line-height: 1.2; }
.logo h1 a { color: #fff; }
.logo h3 { font-size: 14px; font-weight: 400; color: rgba(255,255,255,.82); margin-top: 4px; }

/* 搜索 */
.search { max-width: 300px; width: 100%; display: flex; }
.search input[type="text"] { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.5); border-radius: 8px 0 0 8px; background: rgba(255,255,255,.96); color: #333; font-size: 14px; outline: none; }
.search input[type="button"] { height: 40px; padding: 0 18px; border: 0; border-radius: 0 8px 8px 0; background: var(--primary-soft); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s; }
.search input[type="button"]:hover { background: var(--primary); }
.search input[type="text"]:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.28); }

/* 导航 与正文左边缘对齐 */
.nevbarbg { background: #fff; box-shadow: 0 2px 6px rgba(20,40,80,.05); position: sticky; top: 0; z-index: 50; }
.navbar { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; }
.navbar ul { display: flex; flex-wrap: wrap; }
.navbar ul li a { display: block; padding: 14px 16px; color: var(--text); font-size: 15px; font-weight: 500; }
.navbar ul li a:hover, .navbar ul li a.on { color: var(--primary); background: var(--soft-100); }
/* 窄屏桌面/平板：收紧导航内边距，保证菜单项单行排下 */
@media (min-width: 641px) and (max-width: 820px) {
  .navbar ul li a { padding: 14px 8px; font-size: 14px; }
}
.nav-logo { display: none; }

/* 移动端汉堡菜单 */
.nav-toggle { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; border-radius: 2px; transition: .3s; }

/* ---------- 布局 ---------- */
#content { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 40px; display: flex; align-items: stretch; gap: 24px; flex: 1 0 auto; width: 100%; }
#main { flex: 1 1 auto; min-width: 0; }
#sidebar { flex: 0 0 300px; width: 300px; }

/* 内容较少的页面（登入/报错等）：PC 上主体块纵向撑满，一路顶到页脚，
   不在下方留大片空白背景；手机/平板保持原有自然高度 */
@media (min-width: 901px) {
  #main.main-fill { display: flex; flex-direction: column; }
  #main.main-fill > :last-child { flex: 1 1 auto; margin-bottom: 0; }
  body:has(#main.main-fill) #content { padding-bottom: 0; }
  body:has(#main.main-fill) #footer { margin-top: 0; }
}

/* 公告栏 */
.notice { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 20px; border-left: 4px solid var(--primary-light); }
.notice b { color: var(--primary); font-size: 15px; }
.notice div { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ---------- 文章列表 ---------- */
.post { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 20px; transition: transform .18s, box-shadow .18s; }
.post:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,40,80,.12); }
.postistop { border-left: 4px solid var(--primary); display: flex; align-items: center; padding: 18px 28px; }
.post_time { display: none; }
.post h2 { font-size: 21px; line-height: 1.45; margin-bottom: 12px; font-weight: 700; }
.post h2 a { color: var(--text); }
.post h2 a:hover { color: var(--primary); }
.post_content { color: #3b424e; font-size: 15px; line-height: 1.85; overflow-wrap: break-word; overflow: hidden; }
.post_content p { margin-bottom: 10px; }
.post_content img { border-radius: 8px; }
.post_content a { color: var(--primary); }
.post_content a:hover { text-decoration: underline; }
.post_content ul, .post_content ol { margin-left: 2em; }
.post_content li { list-style: inherit; }
.post_content li p { margin: 5px 0; }
.post_thumb a img { width: 300px; height: 188px; object-fit: cover; border-radius: 10px; }

/* 关于页等的顶部横幅图（不再浮动，避免正文被挤成两截） */
.post-banner { margin-bottom: 18px; }
.post-banner img { width: 100%; height: 240px; object-fit: cover; border-radius: 10px; }
@media (max-width: 640px) { .post-banner img { height: 180px; } }

/* 发展历程时间线（关于本站等页面用） */
.timeline { position: relative; margin-top: 6px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--soft-100); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary-light); }
.tl-date { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .5px; }
.tl-body h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 2px 0 4px; }
.tl-body p { font-size: 13px; line-height: 1.75; color: var(--muted); }
@media (max-width: 640px) {
  .timeline { padding-left: 22px; }
  .tl-item::before { left: -21px; top: 4px; width: 11px; height: 11px; }
}

/* 独立页面里的留言列表（.commentlists） */
.commentlists li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.commentlists li:last-child { border-bottom: 0; }
.comment-author { font-size: 14px; color: var(--text); }
.comment-author strong { color: var(--primary); font-weight: 600; }
.comment-date { font-size: 12px; color: var(--muted); margin-left: 8px; }
.comment-content { margin-top: 3px; font-size: 14px; line-height: 1.8; color: #3b424e; }
/* 留言下方的站长回复 */
.comment-reply { margin-top: 10px; padding: 10px 14px; background: var(--soft-100); border-left: 3px solid var(--primary-light); border-radius: 0 8px 8px 0; }
.comment-reply .reply-head { font-size: 13px; }
.comment-reply .reply-head b { color: var(--primary); font-weight: 600; }
.comment-reply .reply-body { margin-top: 3px; font-size: 13px; line-height: 1.75; color: #3b424e; }
@media (max-width: 640px) { .comment-reply { padding: 9px 12px; } }

.post_info { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); text-align: right; }
.post_info address { font-style: normal; line-height: 1.9; }
.post_info a { color: var(--muted); }
.post_info a:hover { color: var(--primary); }
.post_info address time a { color: var(--primary); }
.post_info time a { color: inherit; }
/* 信息行：有标签时靠左，其余信息靠右 */
.post_info address:has(.info-tags) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.info-tags a { display: inline-block; margin-right: 6px; padding: 0 10px; font-size: 12px; line-height: 1.9; border-radius: 20px; background: var(--soft-100); color: var(--primary); }
.info-tags a:last-child { margin-right: 0; }
.info-tags a:hover { background: var(--primary); color: #fff; }

/* 分页 */
.pagebar { text-align: center; padding: 8px 0 4px; }
.pagebar a, .pagebar span { display: inline-block; min-width: 34px; padding: 6px 12px; margin: 3px; background: var(--card); color: var(--text); border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.6; }
.pagebar a:hover { background: var(--soft-100); color: var(--primary); }
.pagebar .now-page { background: var(--primary); color: #fff; font-weight: 700; }

/* ---------- 侧栏 ---------- */
.function { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 20px; }
.function_t { font-size: 16px; font-weight: 700; color: var(--primary); padding-bottom: 10px; margin-bottom: 8px; border-bottom: 2px solid var(--soft-100); }
.function_c { color: var(--muted); font-size: 14px; }
.function_c ul li { line-height: 1.9; padding: 3px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.function_c ul li a { color: var(--text); }
.function_c ul li a:hover { color: var(--primary); }
.function_c ul li em { color: var(--muted); font-size: 13px; }

/* ---------- 热门搜索 ---------- */
.hotsearch { counter-reset: hs; list-style: none; margin: 0; padding: 0; }
.hotsearch li { display: flex; align-items: center; gap: 9px; padding: 6px 0; line-height: 1.6; }
.hotsearch li::before { counter-increment: hs; content: counter(hs); flex: 0 0 20px; height: 20px; line-height: 20px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; background: #c6d0dc; border-radius: 6px; }
.hotsearch li:nth-child(1)::before { background: #e54d42; }
.hotsearch li:nth-child(2)::before { background: #f0932b; }
.hotsearch li:nth-child(3)::before { background: #f6c344; }
.hotsearch li a { flex: 1 1 auto; min-width: 0; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hotsearch li a:hover { color: var(--primary); }
.hotsearch li em { flex: 0 0 auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 正文页 ---------- */
.post_body .post_content { margin-top: 14px; }
.post_tags { margin-top: 16px; }
.post_nav { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 18px; margin-bottom: 10px; font-size: 14px; }
.post_nav a { color: var(--text); }
.post_nav a:hover { color: var(--primary); }

/* 相关文章 */
.mutuality, .relatedbox, .commentlist, .commentpost { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 20px; }
.relatedbox h4, .commentlist h4, .commentpost h4 { color: var(--primary); margin-bottom: 10px; }
.relatedbox ol { margin-left: 1.4em; }
.relatedbox li { list-style: decimal; margin: 4px 0; }

/* 相关文章列表（AJAX 填充的 .rel-item 结构） */
.relatedbox .rel-item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--border); color: var(--text); text-decoration: none; }
.relatedbox .rel-item:first-child { padding-top: 2px; }
.relatedbox .rel-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.relatedbox .rel-body { flex: 1; min-width: 0; }
.relatedbox .rel-title { font-size: 15px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relatedbox .rel-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.relatedbox .rel-go { flex-shrink: 0; color: #c3cad4; font-size: 18px; line-height: 1; transition: color .15s, transform .15s; }
.relatedbox .rel-item:hover .rel-title { color: var(--primary); }
.relatedbox .rel-item:hover .rel-go { color: var(--primary); transform: translateX(2px); }

/* ---------- 评论列表 ---------- */
.commentlist h4, .commentpost h4 { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.commentlist .msg { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.commentlist .msg:has(+ .pagebar) { border-bottom: 0; }
.commentlist .pagebar:empty { display: none; }
.msgimg { flex: 0 0 44px; margin: 2px 0 0; }
.msgimg .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--soft-100); }
.msgtxt { flex: 1 1 auto; min-width: 0; }

/* 昵称行：楼号徽标 + 昵称，时间与操作另起一行 */
.msgname { font-weight: 600; line-height: 1.6; }
.msgname > span:first-child { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; padding: 0 5px; margin-right: 6px; text-align: center; background: var(--soft-100); border-radius: 6px; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.msgname .dot { font-weight: 400; color: var(--muted); font-size: 12px; margin-right: 4px; }
.msgname > span:last-child { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: var(--muted); }
.msgname > span:last-child a { margin-left: 6px; }

.msgarticle { margin-top: 8px; color: #3b424e; line-height: 1.8; overflow-wrap: break-word; }
.msgarticle p { margin-bottom: 6px; }

/* 我顶 / 我踩 / 举报 / 回复 */
.msgtxt > div:not(.msgname):not(.msgarticle) { margin-top: 10px; font-size: 13px; color: var(--muted); }
.msgtxt > div:not(.msgname):not(.msgarticle) a { color: var(--muted); }
.msgtxt > div:not(.msgname):not(.msgarticle) a:hover { color: var(--primary); }

/* ---------- 发表评论表单 ---------- */
.commentpost form { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 16px; }
.commentpost form p { flex: 1 1 100%; display: flex; flex-direction: column-reverse; gap: 6px; margin-bottom: 16px; }
.commentpost form p:has(input[type="text"]) { flex: 1 1 220px; }
.commentpost form p:has(> label:only-child) { margin-bottom: 6px; }
.commentpost form p:has(input[type="button"]),
.commentpost form p:has(input[type="submit"]) { flex: 0 1 100%; align-items: flex-start; margin-bottom: 12px; }
.commentpost form label { font-size: 13px; color: var(--muted); }
.commentpost form input[type="text"] { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.commentpost form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; line-height: 1.7; min-height: 130px; outline: none; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.commentpost form input[type="text"]:focus, .commentpost form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,179,.12); }
.commentpost .postbottom { margin: 0; font-size: 13px; color: var(--muted); }
.button, .commentpost input[type="button"] { background: var(--primary); color: #fff; border: 0; padding: 10px 26px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.button:hover, .commentpost input[type="button"]:hover { background: var(--primary-light); }

/* ---------- 文章归档 ---------- */
.archive-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.archive-nav a { display: inline-block; background: var(--card); color: var(--text); padding: 7px 16px; border-radius: 20px; font-size: 14px; box-shadow: var(--shadow); }
.archive-nav a:hover, .archive-nav a.on { background: var(--primary); color: #fff; }

.archive-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px 26px; }

.archive-year { display: flex; align-items: center; gap: 14px; margin: 26px 0 14px; scroll-margin-top: 80px; }
.archive-year:first-child { margin-top: 0; }
.archive-year b { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: 1px; }
.archive-year i { flex: 1 1 auto; height: 1px; background: var(--border); }
.archive-year span { font-size: 13px; color: var(--muted); }

.archive-group { position: relative; padding-left: 30px; margin-bottom: 12px; scroll-margin-top: 80px; }
.archive-group::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: -12px; width: 2px; background: var(--soft-100); }
.archive-group:last-child::before { bottom: 0; }
.archive-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.archive-head::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary-light); }
.archive-head .hm { font-size: 16px; font-weight: 700; color: var(--text); }
.archive-head .hc { font-size: 12px; color: var(--muted); background: var(--soft-100); padding: 1px 10px; border-radius: 20px; }

.archive-list li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.archive-list li:last-child { border-bottom: 0; }
.archive-list .ad { flex: 0 0 46px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.archive-list .at { flex: 1 1 auto; min-width: 0; color: var(--text); }
.archive-list .at:hover { color: var(--primary); }
.archive-list .ac { flex: 0 0 auto; font-size: 12px; color: var(--muted); background: var(--soft-100); padding: 1px 10px; border-radius: 20px; }

@media (max-width: 640px) {
  .archive-nav { gap: 6px; margin-bottom: 14px; }
  .archive-nav a { padding: 6px 13px; font-size: 13px; }
  .archive-box { padding: 16px 14px 18px; }
  .archive-year b { font-size: 20px; }
  .archive-group { padding-left: 24px; }
  .archive-group::before { left: 5px; }
  .archive-head::before { left: -1px; }
  .archive-list li { flex-wrap: wrap; row-gap: 2px; }
  .archive-list .ad { flex: 0 0 44px; }
  .archive-list .ac { margin-left: auto; }
  .archive-list .at { flex: 1 1 100%; order: 2; }
}

/* 商品(淘客)页简支持 */
.shop_content { overflow: hidden; }
.shop_content img { border-radius: 8px; }

/* ---------- 底部 ---------- */
#footer { background: linear-gradient(135deg, #274a75 0%, #2f6fb3 100%); color: rgba(255,255,255,.85); margin-top: 40px; }
#footer::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, #5EAAE4, #A3D0F2, rgba(255,255,255,.1)); }
#footer .copyright { max-width: var(--maxw); margin: 0 auto; padding: 30px 20px 44px; font-size: 13px; line-height: 2; }
#footer .copyright a { color: var(--primary-soft); }
#footer .copyright a:hover { color: #fff; }

/* 返回顶部浮动按钮 */
#goTopBtn {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; box-shadow: 0 4px 12px rgba(20,40,80,.25);
  transition: background .2s, transform .2s;
}
#goTopBtn:hover { background: var(--primary-light); transform: translateY(-3px); }
@media (max-width: 640px) { #goTopBtn { right: 14px; bottom: 18px; } }

/* 锚点偏移，避免被吸顶导航遮住 */
#comment, .relatedbox h4, .commentlist h4, h2, h3, h4 { scroll-margin-top: 70px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  #content { flex-direction: column; gap: 18px; }
  #sidebar { flex: 1 1 auto; width: 100%; }
  #main { width: 100%; }
  .post_thumb a img { max-width: 100%; width: 100%; height: 220px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .header { flex-direction: column; align-items: stretch; padding: 20px 16px; text-align: center; }
  .logo { text-align: center; }
  .search { max-width: 100%; }
  #content { padding: 14px; }

  /* 折叠导航：logo 左、汉堡右，空间用满 */
  .navbar { height: 50px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; position: relative; }
  .nav-logo { display: block; order: 1; font-size: 15px; font-weight: 700; color: var(--primary); white-space: nowrap; letter-spacing: 1px; }
  .nav-toggle { position: static; transform: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-left: auto; margin-right: -4px; order: 2; flex-shrink: 0; }
  .nav-toggle span { margin: 0 auto; }
  .navbar ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 8px 16px rgba(0,0,0,.08); order: 3; }
  .navbar ul li a { padding: 15px 20px; border-top: 1px solid var(--border); }
  .nevbarbg.nav-open .navbar ul { display: flex; }
  .nevbarbg.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nevbarbg.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nevbarbg.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .post { padding: 22px 18px; }
  .post h2 { font-size: 19px; }
  .post_info { text-align: left; }
  .post_thumb { float: none !important; margin: 0 0 14px 0 !important; }
  .post_thumb a img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
  .pagebar a, .pagebar span { min-width: 38px; padding: 9px 12px; }

  /* 评论区：单列排布，头像缩小，按钮通栏 */
  .commentlist, .commentpost { padding: 16px 16px; }
  .commentlist .msg { gap: 10px; padding: 14px 0; }
  .msgimg { flex: 0 0 38px; }
  .msgimg .avatar { width: 38px; height: 38px; }
  .commentpost form p { flex: 1 1 100%; margin-bottom: 14px; }
  .commentpost form input[type="button"], .commentpost form .button { width: 100%; padding: 12px 0; }
}

/* ==========================================================================
   登录 / 注册 / 找回密码 / 用户中心 / 搜索 / 错误页
   ========================================================================== */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; }
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 2px solid var(--soft-100); }
.auth-tabs a { flex: 1; text-align: center; padding: 12px 8px; color: var(--muted); font-size: 16px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-tabs a.am, .auth-tabs a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
/* 紧贴上一个字段的选项行（勾选框等） */
.form-row.form-opt { margin-top: -8px; font-size: 13px; color: var(--muted); }
/* 登入表单：输入框限宽，填写提示显示在输入框右侧并垂直居中 */
.auth-card .form-row:has(input[type="text"], input[type="password"], input[type="email"]) {
  display: grid; grid-template-columns: minmax(0, 380px) 1fr; column-gap: 18px; align-items: center;
}
.auth-card .form-row:has(input[type="text"], input[type="password"], input[type="email"]) > label { grid-column: 1 / -1; }
.field-tip { font-size: 12px; line-height: 1.6; color: var(--muted); }
@media (max-width: 900px) {
  .auth-card .form-row:has(input[type="text"], input[type="password"], input[type="email"]) { grid-template-columns: minmax(0, 1fr) 1fr; column-gap: 12px; }
}
@media (max-width: 640px) {
  .auth-card .form-row:has(input[type="text"], input[type="password"], input[type="email"]) { display: block; }
  .field-tip { display: block; margin-top: 6px; }
}
/* 内嵌在主体块（.post）里的表单，与上方说明留出间距 */
.post > .auth-panel { margin-top: 22px; }
.form-row input[type="text"], .form-row input[type="password"], .form-row input[type="email"], .form-row textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-row textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.form-row input:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,179,.12); }
.auth-hint { font-size: 13px; color: var(--muted); margin-top: 14px; }
/* 登入卡片底部的网站声明，用来填满卡片留白 */
.auth-note { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.auth-note h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--primary); line-height: 1.2; }
.auth-note ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
.auth-note li { position: relative; padding-left: 14px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.auth-note li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-soft); }
.auth-note li b { color: var(--text); font-weight: 600; margin-right: 6px; }
@media (max-width: 640px) { .auth-note ul { grid-template-columns: 1fr; } }
.auth-hint a { color: var(--primary); }
.btn { display: inline-block; background: var(--primary); color: #fff; border: 0; padding: 12px 26px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: background .2s; }
.btn:hover { background: var(--primary-light); }
.btn-block { display: block; width: 100%; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--soft-100); color: var(--primary); }

/* 搜索结果 / 标签 */
.result-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.result-title b { color: var(--primary); }
.tag-cloud a { display: inline-block; background: var(--soft-100); color: var(--text); padding: 6px 14px; border-radius: 20px; font-size: 14px; margin: 0 8px 10px 0; }
.tag-cloud a:hover { background: var(--primary); color: #fff; }

/* 错误页 */
.error-wrap { text-align: center; padding: 60px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.error-wrap .code { font-size: 72px; font-weight: 800; color: var(--primary-light); line-height: 1; }
.error-wrap p { color: var(--muted); margin: 16px 0 24px; }

@media (max-width: 640px) {
  .auth-card { padding: 24px 18px; }
  .auth-tabs a { font-size: 15px; }
  .search input[type="text"] { height: 44px; }
  .search input[type="button"] { height: 44px; }
}

/* ---------- 嵌入式商品卡 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.product-card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; text-align: center; padding-bottom: 14px; transition: transform .18s, box-shadow .18s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20,40,80,.12); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.product-card .p-name { font-size: 14px; color: var(--text); margin: 10px 8px 4px; }
.product-card .p-price { color: #c00; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.product-card .p-btn { display: inline-block; background: var(--primary); color: #fff; font-size: 13px; padding: 7px 18px; border-radius: 6px; }
.product-card .p-btn:hover { background: var(--primary-light); }
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card .p-btn { padding: 6px 14px; font-size: 12px; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- 嵌入式商品（单个，左图右信息） ---------- */
.product-block { margin-top: 6px; }
.pb-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.pb-t { font-size: 16px; font-weight: 700; color: var(--text); padding-left: 12px; position: relative; }
.pb-t::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.pb-goto { font-size: 13px; color: var(--primary); }
.pb-goto:hover { text-decoration: underline; }

.product-single { display: flex; gap: 22px; background: linear-gradient(150deg, #fff 0%, #f6f9fd 100%); border: 1px solid #e7eef6; border-radius: 16px; box-shadow: 0 10px 30px rgba(30,60,100,.08); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.product-single:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(30,60,100,.14); }
.ps-pic { position: relative; flex: 0 0 200px; cursor: pointer; background: #fff; }
.ps-pic img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform .35s ease; }
.ps-pic:hover img { transform: scale(1.05); }
.ps-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: linear-gradient(135deg, #ff6b6b, #ee5a24); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; box-shadow: 0 4px 10px rgba(238,90,36,.35); }
.ps-info { flex: 1; padding: 22px 24px 22px 0; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ps-brand { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.ps-title { font-size: 19px; font-weight: 700; color: var(--text); line-height: 1.35; }
.ps-desc { margin-top: 6px; font-size: 13px; color: var(--muted); }
/* 底部一行：左边价格，右边库存 + 按钮（填满原来空着的右半区） */
.ps-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.ps-price-row { display: flex; align-items: center; gap: 10px; }
.ps-price { display: flex; align-items: center; gap: 8px; }
.ps-buy { display: flex; align-items: center; gap: 14px; }
.ps-stock { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ps-stock b { color: #e23a2e; font-size: 16px; font-weight: 800; }
.ps-price b { color: #e23a2e; font-size: 28px; font-weight: 800; }
.ps-off { background: #ffe9e6; color: #e23a2e; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.ps-origin { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.ps-btn { background: linear-gradient(90deg, var(--primary), #3d8fd4); color: #fff; border: 0; border-radius: 8px; font-size: 14px; font-weight: 600; padding: 10px 20px; cursor: pointer; box-shadow: 0 6px 16px rgba(47,111,179,.30); transition: box-shadow .2s, transform .1s; }
.ps-btn:hover { box-shadow: 0 10px 22px rgba(47,111,179,.42); transform: translateY(-1px); }
.ps-btn:active { transform: translateY(0); }
@media (max-width: 640px) {
  .product-single { flex-direction: column; gap: 0; }
  .ps-pic { flex: none; }
  .ps-info { padding: 14px 16px 18px; }
  .ps-foot { gap: 10px; }
  .ps-buy { width: 100%; justify-content: space-between; }
  .ps-btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- SKU 选择弹窗 ---------- */
.sku-mask { display: none; position: fixed; inset: 0; background: rgba(15,25,45,.6); backdrop-filter: blur(3px); z-index: 200; }
.sku-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 720px; max-width: calc(100vw - 28px); max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 28px 70px rgba(10,20,40,.35); z-index: 201; overflow: auto; }
.sku-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f4f8; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; z-index: 3; transition: background .2s, color .2s; }
.sku-close:hover { background: #ffe9e6; color: #e23a2e; }
@media (min-width: 700px) {
  .sku-left { flex: 0 0 46%; background: #f3f6fa; display: flex; align-items: center; justify-content: center; padding: 14px; }
  .sku-pic { position: relative; width: 100%; max-width: 360px; }
  .sku-pic img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; box-shadow: 0 12px 28px rgba(30,60,100,.18); }
  .sku-right { flex: 1; padding: 28px 26px 22px; display: flex; flex-direction: column; }
}
.sku-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: linear-gradient(135deg, #ff6b6b, #ee5a24); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; box-shadow: 0 3px 8px rgba(238,90,36,.35); }
.sku-brand { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.sku-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.35; margin-top: 4px; }
.sku-picker { margin-top: 8px; font-size: 13px; color: var(--primary); background: rgba(47,111,179,.08); display: inline-block; padding: 4px 12px; border-radius: 20px; }
.sku-price-row { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 4px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.sku-now b { color: #e23a2e; font-size: 30px; font-weight: 800; }
.sku-ref { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.sku-groups { margin-top: 6px; }
/* 规格行：标签与选项在同一条水平线上 */
.sku-group { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.skg-name { flex: 0 0 auto; width: 40px; font-size: 13px; color: var(--muted); }
/* 尺码“查看详细”按钮 */
.skg-detail { flex: 0 0 auto; white-space: nowrap; border: 1px dashed var(--primary); background: rgba(47,111,179,.06); color: var(--primary); padding: 7px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; transition: background .15s; }
.skg-detail:hover { background: rgba(47,111,179,.14); }
/* 尺码对照表 */
.size-chart { margin: 10px 0 0 52px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.size-chart table { width: 100%; border-collapse: collapse; font-size: 12px; }
.size-chart th, .size-chart td { padding: 7px 10px; text-align: center; border-bottom: 1px solid #eef2f6; }
.size-chart th { background: #f5f8fb; color: var(--muted); font-weight: 600; }
.size-chart tr:last-child td { border-bottom: 0; }
@media (max-width: 699px) { .size-chart { margin-left: 0; } }
/* 选项不换行：一行排开，窄屏放不下时横向滚动（滚动条隐藏） */
.skg-opts { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; gap: 9px; overflow-x: auto; padding: 8px 6px 6px 0; scrollbar-width: none; -ms-overflow-style: none; }
.skg-opts::-webkit-scrollbar { display: none; }
.skq { position: relative; flex: 0 0 auto; white-space: nowrap; border: 1px solid #e0e7ef; background: #fff; color: #3a4453; padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.skq:hover { border-color: var(--primary); color: var(--primary); }
.skq.on { border-color: var(--primary); background: rgba(47,111,179,.08); color: var(--primary); font-weight: 600; }
.skq.on::after { content: "✓"; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; background: var(--primary); color: #fff; font-size: 10px; line-height: 16px; text-align: center; border-radius: 50%; }
.sku-buy { margin-top: 20px; display: flex; gap: 12px; align-items: stretch; }
.sku-qty { display: flex; align-items: center; border: 1px solid #e0e7ef; border-radius: 8px; overflow: hidden; }
.sku-qty button { width: 34px; height: 42px; border: 0; background: #f5f7fa; font-size: 18px; color: var(--text); cursor: pointer; }
.sku-qty button:hover { background: #e7ecf2; }
.sku-qty input { width: 44px; height: 42px; border: 0; text-align: center; font-size: 15px; }
.buy-btn { flex: 1; background: linear-gradient(90deg, var(--primary), #3d8fd4); color: #fff; border: 0; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(47,111,179,.30); transition: box-shadow .2s; }
.buy-btn:hover { box-shadow: 0 10px 22px rgba(47,111,179,.42); }
.sku-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.sku-msg.err { color: #e23a2e; }
.sku-msg:not(.err) { color: #2f9e44; }
.sku-goto { display: inline-block; margin-top: 8px; color: var(--primary); font-size: 13px; font-weight: 600; }
.sku-goto:hover { text-decoration: underline; }
@media (max-width: 699px) {
  .sku-pic { position: relative; margin: 10px 10px 0; }
  .sku-pic img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; }
  .sku-right { padding: 18px 16px 20px; }
  .sku-now b { font-size: 26px; }
}

/* ==========================================================================
   微博（微语）时间线
   ========================================================================== */
.weibo-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; overflow: hidden; }
.weibo-item { display: flex; gap: 16px; padding: 16px 22px; min-height: 118px; }
.weibo-item:nth-child(odd) { background: #f5f6f7; }
.wb-time { flex: 0 0 62px; text-align: right; }
.wb-time .d { display: block; font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.4; }
.wb-time .t { display: block; font-size: 12px; color: var(--muted); }
.wb-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wb-body p { color: #3b424e; line-height: 1.85; overflow-wrap: break-word; }
.wb-body img { width: 100%; max-width: 420px; height: auto; border-radius: 10px; margin-top: 10px; }
.wb-meta { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); }
.wb-meta a { color: var(--muted); }
.wb-meta a:hover { color: var(--primary); }

/* 长微博折叠：超过 5 行收起；第 5 行左半可见、右半遮住，点「展开」看全文 */
.wb-clamp { position: relative; }
.wb-clamp p { margin: 0; }
.weibo-item.folded .wb-clamp p { max-height: 9.25em; overflow: hidden; }
.weibo-item.folded .wb-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 1.85em; pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,0) 25%, #ffffff 45%, #ffffff 100%); }
.weibo-item:nth-child(odd).folded .wb-fade { background: linear-gradient(90deg, rgba(245,246,247,0) 25%, #f5f6f7 45%, #f5f6f7 100%); }
.wb-more { display: none; font-size: 15px; color: var(--primary); cursor: pointer; }
.weibo-item.folded .wb-more { display: block; position: absolute; left: 46%; bottom: 0; height: 1.85em; line-height: 1.85em; }
.weibo-item.folded.open .wb-clamp p { max-height: none; }
.weibo-item.folded.open .wb-fade { display: none; }
.weibo-item.folded.open .wb-more { position: static; display: inline-block; margin: 6px 0 0; }

@media (max-width: 640px) {
  .weibo-item { gap: 10px; padding: 14px 16px; }
  .wb-time { flex: 0 0 46px; text-align: left; }
  .wb-time .d { font-size: 14px; }
}

/* 触发展开的「评论 N」 */
.wb-meta a.cd-trigger { cursor: pointer; }

/* ---------- 微博评论抽屉（右侧滑出） ---------- */
.cd-mask { position: fixed; inset: 0; background: rgba(20,26,34,.42); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; z-index: 90; }
.cd-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: var(--card); box-shadow: -8px 0 28px rgba(20,26,34,.16); transform: translateX(102%); transition: transform .28s ease; z-index: 91; display: flex; flex-direction: column; }
body.cd-open { overflow: hidden; }
body.cd-open .cd-mask { opacity: 1; visibility: visible; }
body.cd-open .cd-drawer { transform: none; }

.cd-hd { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cd-hd b { font-size: 16px; color: var(--primary); }
.cd-hd b em { font-style: normal; font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.cd-close { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.cd-close:hover { color: var(--primary); }

.cd-bd { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; }

.cd-quote { background: var(--soft-100); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.cd-quote p { font-size: 14px; line-height: 1.8; color: #3b424e; overflow-wrap: break-word; }
.cd-quote .cd-quote-t { margin-top: 6px; font-size: 12px; color: var(--muted); }

.cd-list .msg { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.cd-list .msg:last-child { border-bottom: 0; }
.cd-list .msgimg { flex: 0 0 36px; margin: 2px 0 0; }
.cd-list .msgimg .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--soft-100); }
.cd-list .msgtxt { flex: 1 1 auto; min-width: 0; }
.cd-list .msgname, .cd-list .cd-name { font-size: 14px; font-weight: 600; }
.cd-list .cd-name span { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.cd-list .msgarticle { margin-top: 5px; font-size: 14px; line-height: 1.75; color: #3b424e; overflow-wrap: break-word; }
.cd-list .cd-ops { margin-top: 7px; font-size: 12px; color: var(--muted); }
.cd-list .cd-ops a { color: var(--muted); }
.cd-list .cd-ops a:hover { color: var(--primary); }
.cd-empty { padding: 30px 0 24px; text-align: center; color: var(--muted); font-size: 14px; }

.cd-more { display: block; width: 100%; margin: 14px 0 2px; padding: 10px 0; border: 1px dashed var(--border); border-radius: 8px; background: var(--soft-100); color: var(--primary); font-size: 14px; font-family: inherit; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cd-more:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.cd-ft { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); background: #fafbfc; }
.cd-ft textarea { flex: 1 1 auto; min-height: 40px; max-height: 96px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; line-height: 1.5; resize: none; outline: none; transition: border-color .2s, box-shadow .2s; }
.cd-ft textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,179,.12); }
.cd-ft .button { flex: 0 0 auto; padding: 10px 18px; }
@media (max-width: 640px) {
  .cd-drawer { width: 100%; max-width: 100%; }
  .cd-bd { padding: 14px 14px; }
  .cd-quote { padding: 10px 12px; }
}

/* ==========================================================================
   软件列表
   ========================================================================== */
.soft-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.soft-card { display: flex; gap: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; transition: transform .18s, box-shadow .18s; }
.soft-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,40,80,.12); }
.sc-pic { flex: 0 0 168px; }
.sc-pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.sc-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sc-name { font-size: 16px; font-weight: 700; color: var(--text); }
.sc-tag { font-size: 11px; line-height: 1.8; padding: 0 9px; border-radius: 20px; background: var(--soft-100); color: var(--primary); }
.sc-tag.pay { background: #fff4e5; color: #c2760a; }
.sc-desc { font-size: 13px; line-height: 1.75; color: var(--muted); }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; }
.sc-plat { color: var(--muted); }
.sc-link { font-weight: 600; }
@media (max-width: 640px) {
  .soft-grid { gap: 14px; }
  .soft-card { flex-direction: column; gap: 12px; padding: 16px; }
  .sc-pic { flex: none; }
  .sc-pic img { aspect-ratio: 16 / 9; }
}