/* Glass UI takes over surfaces */
body, #swr-main-app, .swr-swipeable-view, .swr-bottom-nav, .swr-header, .sf-bg, #sf-view-list { background-color: transparent !important; }
    .swr-chat-entry-inner, .swr-panel { background-color: transparent !important; }
    /* sf-post-card / sf-dt-content / sf-cmt-item 的 background 由 inline CSS 统一注入，此处不再覆盖 */
    * { font-weight: normal !important; } 
    .swr-header span { font-weight: normal !important; }

    .sf-forum-header { justify-content: space-between; gap: 10px; }
    .sf-forum-head-left, .sf-forum-head-right { display:flex; align-items:center; }
    .sf-forum-head-left { gap: 8px; min-width: 0; flex: 1; }
    .sf-forum-head-right { gap: 5px; flex-shrink: 0; }
    .sf-forum-tabs { gap: 18px; min-width: 0; }
    .sf-sort-tab { flex: 0 0 auto; text-align:center; cursor:pointer; }
    .sf-current-cat-title { display:none !important; }
    .sf-icon-btn { cursor:pointer; padding:5px; display:flex; align-items:center; justify-content:center; }
    .sf-icon-btn-right { margin-right:-5px; }
    .sf-notif-btn { position:relative; }
    #sf-notif-dot { display:none; position:absolute; top:4px; right:5px; width:8px; height:8px; background:#e53935; border-radius:50%; border:2px solid rgba(255,255,255,0.9); }

    /* 渚ц竟鏍?*/
    #sf-sidebar-overlay, #sf-search-overlay { display:none; position:fixed; inset:0; width:100%; height:100%; background:rgba(0,0,0,0.24); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index:9998; }
    #sf-sidebar { position:fixed; top:12px; left:12px; width:172px; height:calc(100% - 24px); background:var(--swr-forum-sidebar-bg, linear-gradient(135deg, rgba(255,255,255,var(--swr-glass-a1,.40)), rgba(255,255,255,var(--swr-glass-a2,.173)))); border:var(--swr-border-w, 1px) solid var(--swr-border, rgba(255,255,255,.30)); backdrop-filter: var(--swr-forum-sidebar-backdrop, blur(var(--swr-blur)) saturate(var(--swr-sat))); -webkit-backdrop-filter: var(--swr-forum-sidebar-backdrop, blur(var(--swr-blur)) saturate(var(--swr-sat))); box-shadow: var(--swr-shadow-soft, 0 18px 56px rgba(0,0,0,.14)), inset 0 1px 0 rgba(255,255,255,.38); display:flex; flex-direction:column; z-index:9999; transform:translateX(calc(-100% - 18px)); transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: var(--swr-menu-radius,20px); overflow:hidden; }
    #sf-sidebar.sf-open { transform:translateX(0); }
    .sf-sidebar-header { padding: 40px 15px 14px; border-bottom: none; }
    .sf-sidebar-title { font-size: 20px; margin-bottom: 5px; color: var(--swr-text);}
    .sf-sidebar-desc { font-size: 12px; color: #888;}
    .sf-cat-list { padding: 6px 10px 12px; overflow-y: auto; flex: 1; display:flex; flex-direction:column; gap:5px; }
    .sf-cat-item { min-height: 50px; padding: 0 14px; font-size: 15px; color: #333; cursor: pointer; border: none; display:flex; align-items:center; border-radius: max(0px, calc(var(--swr-menu-radius, 20px) - 6px)); background: transparent; line-height: 1.25; box-sizing: border-box; }
    .sf-cat-divider { height: 1px; margin: 2px 14px; background: rgba(255,255,255, calc(var(--swr-glass-a1, .40) * 0.7)); pointer-events: none; }
    .sf-cat-item:active { background: rgba(255,255,255,0.16); }
    .sf-cat-item.active { color: var(--swr-text); background: var(--swr-forum-sidebar-active-bg, rgba(255,255,255,0.62)); backdrop-filter: var(--swr-forum-sidebar-active-backdrop, blur(12px) saturate(var(--swr-sat))); -webkit-backdrop-filter: var(--swr-forum-sidebar-active-backdrop, blur(12px) saturate(var(--swr-sat))); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
    .sf-cat-list { padding: 8px 10px 12px; gap: 0; }
    .sf-cat-item { min-height: 54px; padding: 0 16px; position: relative; }
    .sf-cat-item + .sf-cat-item::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; border-top: var(--swr-border-w, 1px) solid rgba(255,255,255, calc(var(--swr-glass-a1, .40) * 0.95)); pointer-events: none; }
    .sf-cat-divider { display: none !important; }

    #sf-search-drawer { position:fixed; top:0; right:0; width:75%; max-width:300px; height:100%; background:#fff; box-shadow:-4px 0 20px rgba(0,0,0,0.06); display:flex; flex-direction:column; z-index:190; transform:translateX(105%); transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    #sf-search-drawer.sf-open, #sf-notif-drawer.sf-open { transform:translateX(0) !important; }
    .sf-search-header { padding: 40px 20px 20px; border-bottom: 1px solid #f0f0f0; font-size:18px; color:#000; }
    .sf-search-body { padding: 20px; flex:1; }
    .sf-search-input-wrap { display:flex; background:#f5f5f5; border-radius:8px; padding:12px 14px; align-items:center; }
    .sf-search-input-wrap input { border:none; background:transparent; outline:none; flex:1; font-size:15px; color:#000; }
    .sf-do-search-btn-drawer { margin-top: 20px; background:rgba(0,0,0,var(--swr-dark-btn-alpha, 0.50)); color:var(--swr-dark-btn-text, #fff); text-align:center; padding:14px; border-radius:8px; font-size:15px; cursor:pointer; }
    .sf-do-search-btn-drawer:active { background:rgba(0,0,0,calc(var(--swr-dark-btn-alpha, 0.50) + 0.15)); }

    .sf-action-item { padding:16px; text-align:center; font-size:16px; color:#000; border-bottom:1px solid #f0f0f0; cursor:pointer;}
    .sf-action-item:last-child { border-bottom:none; }
    .sf-action-item:active { background:#f9f9f9; }
    .sf-action-item.danger { color:#e53935; }

    .sf-notif-card { padding:15px 20px; border-bottom:1px solid #f5f5f5; cursor:pointer; }
    .sf-notif-card.unread { background:#fffaf0; }
    .sf-notif-title { font-size:14px; color:#333; margin-bottom:4px;}
    .sf-notif-title b { font-weight:normal !important; color:#000;}
    .sf-notif-text { font-size:13px; color:#888; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

    /* 鍒楄〃鍗＄墖 */
    .sf-post-card { padding: 12px 18px; border-bottom: 1px solid #f4f4f4; cursor: pointer; }
    /* sf-post-card 的 background 由 v34.8.6 lock 和 inline CSS 统一管理 */
    .sf-post-title { font-size: 15px; color: var(--swr-text); line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sf-post-title.read { color: #888; }
    
    .sf-post-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #888; width: 100%; box-sizing: border-box; overflow: hidden;}
    .sf-meta-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
    .sf-author { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; cursor:pointer; }
    .sf-author:active { color: var(--swr-text); }
    
    .sf-meta-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
    .sf-cat-badge { background: #f4f4f4; color: #333; padding: 2px 6px; border-radius: 4px; font-size: 11px; flex-shrink:0; margin-left: 5px;}
    .sf-badge-gold { background: #fff8e1; color: #d4af37; border: 1px solid #ffecb3; }
    .sf-badge-sticky { border: 1px solid #000; color: var(--swr-text); background: transparent; }
    .sf-stat { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
    .sf-fav-btn { display: flex; align-items: center; gap: 4px; cursor: pointer; }
    .sf-fav-btn svg { width: 14px; height: 14px; stroke: #888; stroke-width: 1.5; fill: none; transition: all 0.2s;}
    .sf-fav-btn.active svg { stroke: #f5a623; fill: #f5a623; }
    .sf-fav-btn.active { color: #f5a623; }

    /* 璇︽儏椤?*/
    .sf-dt-content{ display:flex; align-items:flex-start; gap:12px; }
    .sf-dt-avatar{ flex:0 0 40px; margin-right:0 !important; }
    .sf-dt-body{ flex:1; min-width:0; }
    .sf-dt-header-row{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:10px; }
    .sf-dt-name-wrap{ min-width:0; }
    .sf-dt-title { font-size: 17px; color: var(--swr-text); line-height: 1.45; margin-bottom: 14px; }
    .sf-dt-author-box { display: flex; align-items: center; margin-bottom: 15px; }
    .sf-dt-name { font-size: 15px; color: var(--swr-text); display:flex; align-items:center; flex-wrap:wrap; gap:0;}
    .sf-dt-time { font-size: 12px; color: #aaa; margin-top: 2px; }
    .sf-dt-text { font-size: 16px; color: var(--swr-text); line-height: 1.7; word-break: break-word; margin-bottom: 5px; padding: 0 1px; word-wrap: break-word; overflow-wrap: break-word;}
    
    .sf-cmt-header{ padding: 12px 18px; font-size:14px; background: transparent !important; border: none !important; display:none !important; }
    .sf-cmt-item{ padding: 16px 18px; display:flex; flex-direction:column; cursor:pointer; gap:8px; margin: var(--swr-gap) 0; }
    /* sf-cmt-item 的 background / border 由 inline CSS 统一注入 */
    .sf-cmt-item:active { background: #fafafa; }
    .sf-cmt-body { flex: 1; overflow: hidden; }
    .sf-cmt-top-row { display:flex; align-items:center; gap:10px; width:100%; }
    
    .sf-cmt-header-row { display: flex; justify-content: space-between; align-items: center; flex:1; min-width:0; }
    .sf-cmt-name { font-size: 13px; color: #555; display:flex; align-items:center; }
    .sf-op-badge { border:1px solid #e53935; color:#e53935; font-size:10px; padding:0 3px; border-radius:3px; margin-left:6px; line-height:1.2;}
    .sf-cmt-actions { display: flex; align-items: center; gap: 10px; }
    .sf-cmt-floor { font-size:12px; color:#ccc; pointer-events:none;}
    .sf-admin-del-btn { color:#e53935; font-size:12px; cursor:pointer;}
    .sf-more-act-btn { color:#888; font-size:14px; font-weight:bold !important; line-height:1; cursor:pointer; padding:2px 5px;}

    .sf-cmt-text { font-size: 15px; color: var(--swr-text); line-height: 1.5; padding:0 1px; word-wrap:break-word; }
    .sf-cmt-time { font-size: 11px; color: #bbb; margin-top: 6px; }
    
    .sf-quote-block{ background: transparent !important; border: none !important; padding: 10px 14px; font-style: italic; color: var(--swr-subtext) !important; font-size: 13px; border-radius: var(--swr-radius-sm); }
    .sf-quote-preview { display:none; background:#f9f9f9; border-bottom:1px solid #eaeaea; padding:8px 18px; font-size:12px; color:#888; align-items:center; justify-content:space-between; width:100%; box-sizing:border-box;}
    .sf-quote-preview-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex:1; font-style: italic; }
    .sf-quote-cancel { padding:0 0 0 15px; color:#e53935; cursor:pointer; font-size:18px; line-height:1; }

    .sf-bottom-input { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; }
    /* sf-bottom-input 的 background / border-top 由 inline CSS (glass-inline-css.php) 统一注入 */
    .swr-input-wrapper { position: relative; display: flex; align-items: flex-end; background: #fff; border: 1px solid #e8e8e8; border-radius: 20px; padding: 6px 42px 6px 16px; min-height: 40px; }
    .swr-input-wrapper textarea { flex: 1; background: transparent; border: none; outline: none; font-size: 15px; color: var(--swr-text); padding: 0; resize: none; line-height: 1.4; display: block; max-height:100px; height:22px; }
    #sf-input-area { flex-direction: column; gap: 10px; }
    #sf-input-area .swr-media-preview-strip { margin: 0 18px; }
    #sf-input-area .swr-input-flex-box { display:flex; align-items:flex-end; gap:10px; width:100%; }
    #sf-input-area .swr-media-mini-btn { margin-bottom: 1px; }
    
    /* 宀涘笨璺熷笘榛戝湀淇锛氱粷瀵瑰畾浣嶅悜涓嬪悜鍙?px鍋忕Щ閿佸畾 */
    #sf-send-cmt-btn { width: 32px !important; height: 32px !important; min-width: 32px !important; border-radius: 50% !important; background: rgba(0,0,0,var(--swr-dark-btn-alpha, 0.50)) !important; display: flex !important; justify-content: center !important; align-items: center !important; position: absolute !important; right: 3px !important; bottom: 3px !important; padding: 0 !important; cursor: pointer; transition: transform 0.1s;}
    #sf-send-cmt-btn svg { width: 16px !important; height: 16px !important; display: block !important; stroke: rgba(255,255,255,var(--swr-icon-bg-a, .72)) !important; }
    #sf-send-cmt-btn:active { background: rgba(0,0,0,calc(var(--swr-dark-btn-alpha, 0.50) + 0.15)) !important; transform: scale(0.9); }
    
    .sf-custom-select-trigger { display:flex; align-items:center; justify-content:space-between; width:fit-content; min-width:100px; background:#f5f5f5; border-radius:6px; padding:8px 12px; font-size:15px; color:#000; cursor:pointer; user-select:none; margin-bottom:20px; }
    .sf-custom-select-trigger svg { width:14px; height:14px; stroke:#000; stroke-width:1.5; fill:none; margin-left:10px;}
    .sf-custom-select-dropdown { display:none; position:absolute; top:45px; left:0; background:#fff; border:1px solid #eaeaea; border-radius:8px; box-shadow:0 4px 15px rgba(0,0,0,0.05); min-width:120px; overflow:hidden; z-index:100;}
    .sf-custom-select-opt { padding:12px 16px; font-size:15px; color:#333; cursor:pointer; border-bottom:1px solid #f9f9f9; }
    .sf-custom-select-opt:last-child { border-bottom:none; }
    .sf-custom-select-opt:active { background:#f5f5f5; }

    .sf-user-tabs, .sf-admin-tabs { gap: 18px; flex:1; justify-content:center; }
    .sf-user-tab, .sf-admin-tab { flex:0 0 auto; text-align:center; cursor:pointer; white-space:nowrap; }
    .sf-user-title-ghost { font-size:12px; color: rgba(0,0,0,.0); user-select:none; pointer-events:none; }
    .sf-subpage-header { gap: 10px; }

    .sf-admin-cat-card { background:#fff; padding:15px 18px; border-radius:12px; margin-bottom:10px; border:1px solid #eaeaea; display:flex; justify-content:space-between; align-items:center; }
    .sf-admin-act { font-size:13px; cursor:pointer; padding:5px; user-select:none;}
    .sf-admin-act:active { opacity: 0.5; }


    .sf-sidebar-header { background: transparent; }
    .sf-sidebar-footer { background: transparent; }

    #sf-view-detail .swr-scroll-area, #sf-view-user .swr-scroll-area, #sf-view-admin .swr-scroll-area, #sf-view-edit .swr-scroll-area, #sf-view-edit, #sf-view-user, #sf-view-admin, #sf-view-detail { background: transparent !important; }
    #sf-view-detail #sf-detail-scroll { background: transparent !important; }
    #sf-view-user .swr-msg-header, #sf-view-admin .swr-msg-header { justify-content: space-between; gap:10px; }
    #sf-view-user .swr-hl, #sf-view-user .swr-hr, #sf-view-admin .swr-hl, #sf-view-admin .swr-hr { min-width:56px; }
    #sf-view-user .swr-msg-tabs, #sf-view-admin .swr-msg-tabs { min-width:0; }
    #sf-view-user #sf-user-list-container, #sf-view-admin .sf-admin-panel, #sf-view-detail #sf-detail-container { padding-top: 8px; }
    .sf-editor-media-actions { display:flex; align-items:center; gap:10px; margin-top:12px; }
    #sf-post-media-preview { margin-top: 12px; }
    #sf-detail-container .swr-media-shell,
    #sf-cmt-list .swr-media-shell { margin-top: 12px; }


/* ===== v3450 forum structure repair ===== */
.sf-dt-content{
  display:block !important;
  padding: var(--swr-card-pad) !important;
}
.sf-dt-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}
.sf-dt-avatar{
  flex:0 0 var(--swr-detail-avatar-size, 34px);
  width:var(--swr-detail-avatar-size, 34px);
  height:var(--swr-detail-avatar-size, 34px);
  margin:0 !important;
}
.sf-dt-main{
  flex:1;
  min-width:0;
}
.sf-dt-title{
  display:block !important;
  width:100%;
  min-width:0;
  margin:0 0 12px 0 !important;
  font-size: 17px;
  line-height:1.5;
  word-break: break-word;
  white-space: normal;
}
.sf-dt-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.sf-dt-name{ min-width:0; gap:6px; }
.sf-dt-time{ white-space:nowrap; }
.sf-dt-text{ margin-top:0 !important; }
#sf-detail-container > .sf-dt-content,
#sf-cmt-list > .sf-cmt-item{
  border-width: var(--swr-border-w, 1px) !important;
  border-style: solid !important;
  border-color: var(--swr-border) !important;
  border-radius: var(--swr-radius) !important;
}
#sf-detail-container > .sf-dt-content{ margin-bottom: var(--swr-gap) !important; }
.sf-cmt-item{ overflow:hidden; }
/* sf-post-card / sf-dt-content / sf-cmt-item 的 background 由 v34.8.6 lock 和 inline CSS 统一管理 */


/* v3451 forum detail structural repair */
.sf-dt-content{ display:block !important; }
.sf-dt-head{ display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; }
.sf-dt-main{ flex:1; min-width:0; }
.sf-dt-meta-row{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.sf-dt-title{ display:block; margin:0 !important; font-size:18px !important; line-height:1.45 !important; word-break:break-word; }
.sf-dt-name{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; }
.sf-dt-name .sf-author{ font-size:15px; color:var(--swr-text); }
.sf-dt-time{ font-size:12px; color:var(--swr-subtext) !important; margin-top:0 !important; }
.sf-dt-text{ clear:both; display:block; font-size:16px; line-height:1.72; word-break:break-word; }
.sf-cmt-item .swr-avatar,
.sf-dt-avatar,
.sf-post-card .swr-avatar{ background-color: rgba(255,255,255,var(--swr-icon-bg-a)) !important; background-repeat:no-repeat !important; background-position:center !important; }


/* v3454 forum/detail/tab consistency fix */
#sf-detail-container .sf-dt-title-card,
#sf-detail-container .sf-dt-body-card{
  width: 100% !important;
  box-sizing: border-box !important;
}
#sf-detail-container .sf-dt-title-card{
  display: block !important;
  padding: var(--swr-card-pad) !important;
}
#sf-detail-container .sf-dt-title-card .sf-dt-title{
  margin: 0 !important;
  font-size: 18px !important;
}
.swr-msg-tab.active::after,
.swr-msg-tab.is-active::after,
.sf-sort-tab.active::after,
.swr-feed-switch.active::after{
  bottom: var(--swr-tab-underline-offset, 8px) !important;
  width: 100% !important;
  height: var(--swr-tab-underline-h, 3px) !important;
  border-radius: 999px !important;
}


/* v3457 style-control audit */
#sf-detail-scroll{
  padding: 0 var(--swr-page-pad-x, 14px) !important;
  background: transparent !important;
}
#sf-detail-container{
  padding: var(--swr-gap, 18px) 0 5px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--swr-gap, 18px) !important;
}
#sf-detail-container > .sf-dt-title-card,
#sf-detail-container > .sf-dt-body-card{
  margin: 0 !important;
}
#sf-detail-scroll .sf-comments-sec{
  margin-top: var(--swr-gap, 18px) !important;
  padding: 0 0 20px 0 !important;
}
#sf-detail-scroll #sf-cmt-list{
  gap: var(--swr-gap, 18px) !important;
}
#sf-detail-scroll #sf-cmt-list > .sf-cmt-item{
  margin: 0 !important;
}
.sf-detail-input-row{
  padding: 10px var(--swr-header-pad-x, 18px) calc(10px + env(safe-area-inset-bottom, 0px)) !important;
}


/* ===== v3466 forum rebuild alignment ===== */
.sf-forum-header .sf-icon-btn{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,var(--swr-icon-bg-a));
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.sf-forum-head-left{ gap: 10px !important; }
.sf-forum-head-right{ gap: 8px !important; }
.sf-forum-tabs{ gap: 18px !important; }
#sf-post-list,
#sf-user-list-container,
#sf-cmt-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

/* ===== v34.8.5 forum subpage topbar lock =====
   background / backdrop-filter / box-shadow 完全交给 inline CSS (glass-inline-css.php) 管理。
*/
#sf-view-detail .swr-header,
#sf-view-user .swr-header,
#sf-view-edit .swr-header,
#sf-view-admin .swr-header,
#sf-view-detail .sf-subpage-header,
#sf-view-user .sf-subpage-header,
#sf-view-edit .sf-subpage-header,
#sf-view-admin .sf-subpage-header{
  border-bottom: var(--swr-border-w, 1px) solid var(--swr-border) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

/* ===== v34.8.6 forum card parity lock =====
   background / backdrop-filter / box-shadow 完全交给 inline CSS (glass-inline-css.php) 管理。
   此处仅保留 border-radius 和 border-width 的变量引用。
*/
#sf-detail-container > .sf-dt-title-card,
#sf-detail-container > .sf-dt-body-card,
#sf-detail-container > .sf-dt-content,
#sf-cmt-list > .sf-cmt-item,
#sf-post-list > .sf-post-card,
#sf-user-list > .sf-post-card{
  border-width: var(--swr-border-w, 1px) !important;
  border-style: solid !important;
  border-color: var(--swr-border) !important;
  border-radius: var(--swr-radius) !important;
}
