/* =====================================================================
   Breeze 回應式風格
   這個檔案會接在預設模板的 common.css 後面一起編譯。
   結構沿用預設模板，這裡只負責：新的外觀、依螢幕寬度變形、亮暗色變數。
   斷點：1023px 以下收起側欄；767px 以下為手機版面。
   ===================================================================== */

/* ---------- 顏色變數（暗色的值在 dark.css） ---------- */
:root {
	--bz-main: #2B7ACD;
	--bz-main-d: #1F63AB;
	--bz-main-soft: #EDF3FA;
	--bz-bg: #F3F5F8;
	--bz-card: #FFFFFF;
	--bz-bg2: #F6F7F9;
	--bz-border: #E3E6EA;
	--bz-border2: #D5DAE0;
	--bz-text: #2B3138;
	--bz-text2: #5B6470;
	--bz-text3: #8B939E;
	--bz-link: #1F63AB;
	--bz-red: #E5484D;
	--bz-radius: 10px;
	--bz-radius-s: 6px;
	--bz-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	--bz-shadow-pop: 0 8px 28px rgba(16, 24, 40, .16);
}

/* ---------- 基礎 ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light; }
body { min-width: 0 !important; background: var(--bz-bg); color: var(--bz-text); -webkit-font-smoothing: antialiased; }
body, input, button, select, textarea { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
img { max-width: 100%; }
a { color: var(--bz-text); }
a:hover { color: var(--bz-link); }
.xi2, .xi2 a, .xi3 a { color: var(--bz-link); }
::selection { background: rgba(43, 122, 205, .22); }

.wp, #hd .wp, #wp, .widthauto .wp, .widthauto #hd .wp, .widthauto #wp {
	width: auto !important; min-width: 0 !important; max-width: 1240px;
	margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; box-sizing: border-box;
}
.wp .wp, #hd .wp .wp { padding-left: 0; padding-right: 0; }
#wp { padding-top: 4px; }

/* ---------- 最上方工具列 ---------- */
#toptb { min-width: 0 !important; height: auto; line-height: 34px; background: var(--bz-card); border-bottom: 1px solid var(--bz-border); }
#toptb .wp { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#toptb .z, #toptb .y { float: none; display: flex; align-items: center; flex-wrap: wrap; }
#toptb a { color: var(--bz-text2); height: auto; padding: 0 6px; }
#toptb a:hover { color: var(--bz-link); }

/* 亮暗色切換按鈕與手機選單按鈕 */
.bz-theme, .bz-menu {
	display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; margin: 0 0 0 4px;
	border: 0; border-radius: 8px; background: transparent; color: var(--bz-text2); cursor: pointer; vertical-align: middle;
}
.bz-theme:hover, .bz-menu:hover { background: var(--bz-bg2); color: var(--bz-main); }
.bz-theme span { display: none; line-height: 0; }
html[data-theme="light"] .bz-theme .bz-ico-moon, html[data-theme="dark"] .bz-theme .bz-ico-sun { display: block; }
.bz-tools { display: none; }

/* ---------- 頁首：Logo 與登入狀態 ---------- */
#hd { border: 0; background: transparent; }
#hd .wp { padding-top: 6px; }
#hd .hdc { min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
#hd .hdc::after { display: none; }
#hd h2 { float: none; padding: 0; margin: 0; flex: 0 1 auto; min-width: 0; }
#hd h2 img { max-height: 52px; width: auto; display: block; }
#um { float: none; position: relative; padding: 0 62px 0 0; margin: 0; flex: 0 1 auto; line-height: 26px; }
#um .avt { position: absolute; right: 0; top: 50%; margin: -24px 0 0; float: none; display: block; }
#um .avt img { width: 48px; height: 48px; padding: 0; border: 0; display: block; box-shadow: 0 0 0 1px var(--bz-border); }
#um, #um a { color: var(--bz-text2); }
#um .vwmy a { color: var(--bz-text); }
#um a:hover { color: var(--bz-link); }
#um .pipe { color: var(--bz-border2); }
.bz-guest { display: none; }
#switchwidth, .switchwidth { display: none !important; }
.fastlg { float: none; }
.avt img { border-radius: 50%; }

/* ---------- 主導覽 ---------- */
#nv { height: auto; min-height: 44px; overflow: visible; border-radius: var(--bz-radius); background: var(--bz-main); background-image: none !important; display: flex; align-items: center; padding: 0 6px; box-sizing: border-box; }
#nv ul { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; margin: 0; padding: 0; }
#nv li { float: none; background: none; padding: 0; margin: 4px 2px; height: auto; line-height: 1; }
#nv li a { float: none; display: block; height: 36px; line-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 15px; font-weight: 600; color: #FFF; }
#nv li a:hover, #nv li.hover a, #nv li.a a { background: rgba(255, 255, 255, .18); color: #FFF; text-decoration: none; }
#nv li.a { background: none; }
#nv li span { display: none; }
#qmenu { float: none; order: 2; margin: 0 2px 0 8px; width: auto; height: 32px; line-height: 32px; padding: 0 28px 0 14px; border-radius: 8px; background-color: #FFF; color: var(--bz-main-d) !important; font-weight: 600; flex: 0 0 auto; }
#mu { min-height: 0; }
#mu ul { border: 0; background: none; }

/* ---------- 搜尋列 ---------- */
#scbar { height: auto; line-height: normal; margin: 10px 0 0; padding: 8px 10px; border: 0; border-radius: var(--bz-radius); background: var(--bz-card); box-shadow: var(--bz-shadow); overflow: visible; }
#scbar_form { display: block; }
#scbar_form table { width: 100%; }
#scbar_form td { white-space: nowrap; }
#scbar_form td { vertical-align: middle; }
.scbar_icon_td, .scbar_narrow .scbar_icon_td { width: 0; padding: 0; background: none; }
.scbar_txt_td, .scbar_type_td { background: none; height: auto; }
.scbar_txt_td { width: 100%; }
#scbar_txt { width: 100%; height: 36px; line-height: 36px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--bz-border2); border-right: 0; border-radius: 8px 0 0 8px; background: var(--bz-bg2); font-size: 14px; outline: 0; }
#scbar_txt:focus { border-color: var(--bz-main); background: var(--bz-card); }
.scbar_type_td a { display: block; height: 34px; line-height: 34px; padding: 0 22px 0 10px; border: 1px solid var(--bz-border2); border-left: 0; border-radius: 0 8px 8px 0; background-color: var(--bz-bg2); color: var(--bz-text2); white-space: nowrap; float: none; width: auto; }
.scbar_btn_td { background: none; padding-left: 8px; width: 40px; }
#scbar_btn { margin: 0; padding: 0; width: 38px; height: 36px; line-height: 36px; border-radius: 8px; box-shadow: none; font-size: 18px; overflow: hidden; }
#scbar_btn strong { display: none; }
.scbar_hot_td { width: 1%; padding-left: 12px; }
#scbar_hot { height: 36px; line-height: 36px; padding: 0; overflow: hidden; display: flex; flex-wrap: nowrap; max-width: 420px; }
#scbar_hot strong, #scbar_hot a { float: none; flex: 0 0 auto; }

/* ---------- 麵包屑與區塊 ---------- */
#pt { border: 0; background: none; box-shadow: none; border-radius: 0; margin: 10px 0 6px; height: auto; min-height: 28px; line-height: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#pt .z { float: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; min-width: 0; overflow: visible; height: auto; }
#pt .z a, #pt .z em, #pt .z span { float: none; height: auto; }
#pt .z a.nvhm { display: inline-block; width: 18px; height: 28px; line-height: 28px; overflow: hidden; white-space: nowrap; color: var(--bz-text3); }
#pt .z:empty { display: none; }
#pt .y { float: none; margin-left: auto; }
#chart { height: auto; line-height: 1.8; margin-bottom: 8px; }
.bw0 { border: 0; background: none; box-shadow: none; }

.bm { border: 1px solid var(--bz-border); border-radius: var(--bz-radius); background: var(--bz-card); box-shadow: var(--bz-shadow); margin-bottom: 12px; }
.bm_h { height: auto; min-height: 20px; line-height: 20px; padding: 11px 14px; border-top: 0; border-bottom: 1px solid var(--bz-border); border-radius: var(--bz-radius) var(--bz-radius) 0 0; background: var(--bz-bg2); white-space: normal; overflow: visible; }
.bm_h h2, .bm_h h1, .bm_h h3 { font-size: 15px; }
.bm_c { padding: 12px 14px; }
.bmw { border: 1px solid var(--bz-border); }
.bmw .bm_h { background: var(--bz-bg2); }
.bml .bm_h, .bmn .bm_h { border-radius: 0; }
.bmn, .bml { box-shadow: none; }
.bm.bml, .bm.bmn { border-radius: var(--bz-radius); }
#wp > .bm:last-child { margin-bottom: 16px; }

/* ---------- 按鈕與表單 ---------- */
.pn { height: 34px; line-height: 32px; padding: 0 16px; border: 1px solid var(--bz-border2); border-radius: var(--bz-radius-s); background: var(--bz-card); color: var(--bz-text); box-shadow: none; font-size: 14px; cursor: pointer; }
.pn em, .pn span, .pn strong { padding: 0; line-height: inherit; color: inherit; font-weight: 600; }
.pn:hover { border-color: var(--bz-main); color: var(--bz-main); }
.pnc, a.pnc { border-color: var(--bz-main); background: var(--bz-main); color: #FFF; }
.pnc:hover, a.pnc:hover { background: var(--bz-main-d); border-color: var(--bz-main-d); color: #FFF; }
.px, .pt, .ps, select { border: 1px solid var(--bz-border2); border-radius: var(--bz-radius-s); background: var(--bz-card); color: var(--bz-text); box-shadow: none; box-sizing: border-box; max-width: 100%; }
.px { height: 34px; line-height: 20px; padding: 6px 10px; }
.pt { padding: 8px 10px; line-height: 1.6; }
.ps, select { height: 34px; padding: 4px 6px; }
.px:focus, .pt:focus, .ps:focus, select:focus { border-color: var(--bz-main); outline: 0; box-shadow: 0 0 0 3px rgba(43, 122, 205, .16); }
.pc, .pr { vertical-align: -2px; }

/* ---------- 下拉選單與浮動視窗 ---------- */
.p_pop, .p_pof, .sllt { border: 1px solid var(--bz-border); border-radius: 8px; background: var(--bz-card); box-shadow: var(--bz-shadow-pop); max-width: calc(100vw - 20px); box-sizing: border-box; }
.p_pop a { border-radius: 6px; }
.p_pop a:hover, .p_pop a.a { background: var(--bz-main-soft); color: var(--bz-link); }
.fwinmask { max-width: calc(100vw - 16px); }
.fwin .m_c, .fwin .mc, .nfl .f_c { border-radius: var(--bz-radius); }
.t_l, .t_c, .t_r, .m_l, .m_r, .b_l, .b_c, .b_r { background: transparent !important; }
.fwin { border-radius: var(--bz-radius); box-shadow: var(--bz-shadow-pop); }
.m_c { background: var(--bz-card); border-radius: var(--bz-radius); }
.flb { height: auto; line-height: 24px; padding: 12px 14px 6px; }
.flb em { font-size: 16px; color: var(--bz-text); }

/* ---------- 分頁 ---------- */
.pg, .pgb { float: none; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; line-height: 30px; }
.pg a, .pg strong, .pgb a, .pg label { float: none; display: inline-block; height: 30px; line-height: 30px; min-width: 14px; padding: 0 9px; margin: 0; border: 1px solid var(--bz-border); border-radius: var(--bz-radius-s); background: var(--bz-card); color: var(--bz-text2); box-shadow: none; text-align: center; }
.pg a:hover, .pgb a:hover { border-color: var(--bz-main); color: var(--bz-main); }
.pg strong { border-color: var(--bz-main); background: var(--bz-main); color: #FFF; font-weight: 600; }
.pg label { cursor: default; }
.pg label .px { height: 22px; padding: 0 4px; margin: 0 2px; vertical-align: 1px; }
.pgs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pgs::after { display: none; }
.pgs .pg, .pgs .pgb { margin-left: auto; }
.pgs .pgb + .pg, .pgs .pg + .pgb { margin-left: 0; }

/* ---------- 版塊列表（首頁） ---------- */
.fl { border: 0; background: none; }
.fl .bm { border: 1px solid var(--bz-border); margin-bottom: 12px; overflow: hidden; }
.fl .bm_h { background: var(--bz-bg2); }
.fl .bm_h h2 a { color: var(--bz-text); }
.fl_tb { width: 100%; }
.fl_tb td { padding: 14px 8px; border-top: 1px solid var(--bz-border); vertical-align: middle; }
.fl_tb tr:first-child td { border-top: 0; }
.fl_tb tr.fl_row td { border-top: 1px solid var(--bz-border); }
.fl_icn { width: 52px; padding-left: 14px !important; }
.fl_icn img, .fl_icn svg { max-width: 44px; height: auto; }
.fl_tb h2 { font-size: 16px; line-height: 1.4; }
.fl_tb h2 a { color: var(--bz-text); }
.fl_tb h2 a:hover { color: var(--bz-link); }
.fl_tb p { color: var(--bz-text2); line-height: 1.6; }
.fl_i { width: 110px; color: var(--bz-text3); white-space: nowrap; }
.fl_by { width: 240px; padding-right: 14px !important; }
.fl_by div { width: auto; max-width: 226px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl_g { box-sizing: border-box; }
#online .bm_h, #category_lk .bm_h { background: var(--bz-bg2); }
#online .bm_c, #category_lk .bm_c { overflow: hidden; }
#onlinelist li, .ml li { max-width: 100%; }

/* ---------- 帖子列表 ---------- */
#pgt { margin: 10px 0; }
#threadlist { border-radius: var(--bz-radius); overflow: hidden; }
#threadlist .th { margin: 0; padding: 0 6px; background: var(--bz-bg2); border-bottom: 1px solid var(--bz-border); }
.tl table { width: 100%; table-layout: fixed; }
.tl .th table { table-layout: fixed; }
.tl th, .tl td { padding: 12px 6px; border-bottom: 1px solid var(--bz-border); }
.tl .th th, .tl .th td { border-bottom: 0; padding: 8px 6px; }
.tl tr:hover th, .tl tr:hover td { background: var(--bz-bg2); }
.tl .th tr:hover th, .tl .th tr:hover td { background: none; }
.tl .icn { width: 34px; padding-left: 10px; }
.tl th { font-size: 15px; overflow-wrap: anywhere; word-break: break-word; }
.tl th a.xst, .tl th a.s { font-size: 15px; line-height: 1.5; color: var(--bz-text); }
.tl th a.xst:hover { color: var(--bz-link); }
.tl th a.xst:visited { color: var(--bz-text2); }
.tl .by { width: 130px; line-height: 1.5; }
.tl .num { width: 70px; line-height: 1.5; }
.tl .by cite, .tl .by em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.tl cite, .tl .num em, .tl .by em span, .tl .by em a { color: var(--bz-text3); }
.tl .num a { color: var(--bz-link); }
#separatorline th, #separatorline td, .emptb th, .emptb td { padding: 0; height: 6px; background: var(--bz-bg2) !important; font-size: 0; line-height: 0; }
#threadlisttableid { border-collapse: collapse; }
.ttp { height: auto; border-bottom: 1px solid var(--bz-border); background: var(--bz-card); display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
.ttp li { float: none; margin: 0; }
.ttp a, .ttp strong { float: none; display: inline-block; height: 28px; line-height: 28px; padding: 0 12px; border: 1px solid var(--bz-border); border-radius: 14px; background: var(--bz-card); color: var(--bz-text2); margin: 0; }
.ttp .a a, .ttp a:hover { border-color: var(--bz-main); background: var(--bz-main); color: #FFF; }
#f_pst { margin-top: 12px; }
#f_pst .bm_c { padding: 14px; }
#fastpostsubmitline { margin-top: 8px; }
.bm.bml.pbn .bm_h, .bml .bm_c { background: var(--bz-card); }
.bm.bml h1.xs2 { font-size: 20px; }

/* ---------- 帖子內容 ---------- */
#postlist { border: 1px solid var(--bz-border); border-radius: var(--bz-radius); background: var(--bz-card); overflow: hidden; box-shadow: var(--bz-shadow); }
.pl .quote, .pl .blockcode { border-radius: 8px; }
td.pls { width: 168px; background: var(--bz-bg2); border-right: 1px solid var(--bz-border); overflow: hidden; }
.pls .favatar, div.pls { width: auto; background: none; border: 0; }
table.ad { display: table; }
.plc { padding: 0 20px; }
.pls .avatar { margin: 12px 14px 8px; text-align: center; }
.pls .avatar img { width: 96px; height: 96px; padding: 0; border: 0; border-radius: 50%; background: var(--bz-card); object-fit: cover; box-shadow: 0 0 0 1px var(--bz-border); }
.pls .pi { padding-left: 14px; border-bottom: 1px solid var(--bz-border); }
.pi { height: auto; min-height: 16px; padding: 12px 0; border-bottom: 1px solid var(--bz-border); overflow: visible; }
.pti { overflow: hidden; }
.authi { line-height: 20px; color: var(--bz-text3); }
.ts { font-size: 20px; line-height: 1.4; }
.vwthd { padding-top: 14px; padding-bottom: 12px; }
.t_f, .t_f td { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; word-break: break-word; }
.t_fsz { min-height: 80px; }
.t_f img, .pcb img, .t_f video, .t_f iframe, .pcb video { max-width: 100%; height: auto; }
.t_f iframe, .pcb iframe { max-width: 100%; }
.pl .quote { padding: 10px 14px 10px 40px; margin: 10px 0; background-color: var(--bz-bg2); border: 0; border-left: 3px solid var(--bz-border2); color: var(--bz-text2); overflow: hidden; }
.pl .quote blockquote { padding: 0; margin: 0; }
.pl .blockcode { padding: 12px 12px 12px 14px; margin: 10px 0; border: 1px solid var(--bz-border); background: var(--bz-bg2); overflow-x: auto; }
.pl .blockcode ol { margin-left: 28px !important; }
.pl .blockcode ol li { white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; color: var(--bz-text); }
.bz-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t_table { max-width: none; }
.po { border-top: 1px solid var(--bz-border); }
.pob { line-height: 36px; height: auto; }
.pob em a, .pob p a { padding: 4px 8px; border-radius: var(--bz-radius-s); }
.pob em a:hover, .pob p a:hover { background-color: var(--bz-bg2); }
.sign { color: var(--bz-text3); border-top: 1px dashed var(--bz-border); }
#p_btn a, .cmmnt a { border-radius: var(--bz-radius-s); }
.plhin { border-bottom: 1px solid var(--bz-border); }
#postlist > div:last-of-type .plhin { border-bottom: 0; }
.ad .pls, .ad .plc { background: var(--bz-bg2); height: 6px; padding: 0; border: 0; }
#f_pst.pl, .pl.bm { overflow: hidden; }
#fastposteditor, .tedt { border: 1px solid var(--bz-border2); border-radius: 8px; overflow: hidden; width: auto; }
.tedt .bar { height: auto; min-height: 30px; padding: 4px 8px; border-bottom: 1px solid var(--bz-border); background: var(--bz-bg2); display: flex; flex-wrap: wrap; align-items: center; }
.tedt .area { padding: 0; }
.tedt .pt { width: 100% !important; border: 0; border-radius: 0; box-shadow: none !important; min-height: 110px; font-size: 15px; background: var(--bz-card); }
#fastpostform .plc { padding: 14px 20px; }

/* ---------- 發帖頁編輯器 ---------- */
.pg_post #ct .bm { border-radius: var(--bz-radius); }
#postbox { padding: 4px 6px; }
#postbox .pbt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
#postbox .pbt .z, #postbox .pbt .ftid { float: none; }
#postbox .pbt .z { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
#subject { flex: 1; min-width: 160px; width: auto !important; height: 38px; font-size: 15px; }
.edt { border: 1px solid var(--bz-border2); border-radius: 8px; overflow: hidden; }
.edt .bar { height: auto; min-height: 30px; border-bottom: 1px solid var(--bz-border); background: var(--bz-bg2); overflow-x: auto; overflow-y: hidden; }
.edt .bbar { border-top: 1px solid var(--bz-border); background: var(--bz-bg2); height: auto; }
.edt .area textarea, #e_textarea { width: 100% !important; box-sizing: border-box; border: 0; font-size: 15px; line-height: 1.7; background: var(--bz-card); color: var(--bz-text); }
#e_iframe { background: var(--bz-card); }
.exfm { border: 1px solid var(--bz-border); border-radius: 8px; background: var(--bz-bg2); }
#post_extra_tb label { border-radius: 6px 6px 0 0; }
.pnpost { margin-top: 12px; }

/* ---------- 登入、註冊 ---------- */
.rfm { width: auto; max-width: 760px; border-bottom: 1px solid var(--bz-border); }
.rfm th, .rfm td { padding: 12px 6px; line-height: 34px; }
.rfm .px { width: 260px; }
.rfm .tipcol { color: var(--bz-text3); }
#main_message .bm, .pg_logging .bm, .pg_register .bm { overflow: hidden; }
.lgfm, .loginform { border: 0; }
.fastlg_fm { border-right-color: var(--bz-border); }

/* ---------- 個人空間、設定 ---------- */
.appl { border-right: 0; }
.tbn li { height: auto; min-height: 33px; border-bottom: 0; }
.tbn li a { padding: 0 12px; border-radius: 8px; line-height: 36px; height: 36px; }
.tbn li.a, .tbn li.a a { background: var(--bz-main-soft); color: var(--bz-link); border-radius: 8px; }
.tbn h2 { border-bottom: 1px solid var(--bz-border); }
.ct2_a, .ct3_a { border: 1px solid var(--bz-border); border-radius: var(--bz-radius); background: var(--bz-card); background-image: none !important; box-shadow: var(--bz-shadow); min-height: 300px; }
.ct2_a .mn, .ct3_a .mn { box-sizing: border-box; }
.tb { border-bottom: 1px solid var(--bz-border); height: auto; padding-left: 0; display: flex; flex-wrap: wrap; gap: 2px; line-height: 34px; }
.tb li { float: none; margin: 0 0 -1px; }
.tb a { float: none; display: block; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; border-radius: 0; color: var(--bz-text2); }
.tb .a a, .tb .current a { border: 0; border-bottom: 2px solid var(--bz-main); background: none; color: var(--bz-link); font-weight: 600; }
.tb .y, .tb .o { margin-left: auto; float: none; }
.tfm { width: 100%; }
.tfm th, .tfm td { padding: 9px 6px; }
.tfm .px, .tfm .pt { max-width: 100%; }
.dt { width: 100%; }
.dt th, .dt td { padding: 9px 6px; border-bottom: 1px solid var(--bz-border); }
.dt th { background: var(--bz-bg2); }
.xld dt { overflow-wrap: anywhere; }
.pbm.mbm.bbda, .bbda { border-bottom-color: var(--bz-border); }
.mn { overflow: visible; min-width: 0; }
.sd { min-width: 0; }
.emp { color: var(--bz-text3); }

/* ---------- 頁尾 ---------- */
#ft { margin-top: 8px; padding-top: 14px; padding-bottom: 18px; border-top: 1px solid var(--bz-border); color: var(--bz-text3); line-height: 1.9; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
#ft::after { display: none; }
#flk, #frt { float: none; }
#flk { order: 2; text-align: right; }
#frt { order: 1; }
#ft a { color: var(--bz-text2); }
#scrolltop { border-radius: 8px; overflow: hidden; box-shadow: var(--bz-shadow-pop); right: 16px !important; left: auto !important; }

/* =====================================================================
   平板與窄桌面：1023px 以下
   ===================================================================== */
@media (max-width: 1023px) {
	.fl_by { width: 190px; }
	.fl_by div { max-width: 176px; }
	.tl .by { width: 104px; }
	.tl .num { width: 56px; }
	td.pls { width: 132px; }
	.pls .avatar img { width: 72px; height: 72px; }
	.plc { padding: 0 14px; }

	/* 兩欄、三欄版面改成上下堆疊 */
	.ct2, .ct3_a, .ct2_a, .widthauto .ct2, .widthauto .ct3_a, .widthauto .ct2_a { margin: 0; padding: 0; display: block; }
	.ct2 .mn, .ct2 .sd, .ct3_a .mn, .ct3_a .sd, .ct2_a .mn, .ct2_a .appl, .ct3_a .appl,
	.widthauto .ct2 .mn, .widthauto .ct2 .sd, .widthauto .ct3_a .mn, .widthauto .ct3_a .sd, .widthauto .ct2_a .mn, .widthauto .ct2_a .appl, .widthauto .ct3_a .appl {
		float: none; width: auto !important; margin: 0 !important; padding-left: 0; padding-right: 0;
	}
	.ct2_a .mn, .ct3_a .mn, .widthauto .ct2_a .mn, .widthauto .ct3_a .mn { padding: 12px 14px !important; }
	.ct2 .sd, .ct3_a .sd { margin-top: 12px !important; }
	.ct2 #chart, .ct2 #an, .widthauto .ct2 #chart, .widthauto .ct2 #an { margin-right: 0; }

	/* 側邊選單改成可橫向捲動的一列 */
	.appl { width: auto; min-height: 0; border-bottom: 1px solid var(--bz-border); background: var(--bz-bg2); border-radius: var(--bz-radius) var(--bz-radius) 0 0; }
	.appl .tbn { margin: 0; padding: 8px 10px; }
	.appl .tbn h2 { display: none; }
	.appl .tbn ul { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none; margin: 0; }
	.appl .tbn ul::-webkit-scrollbar { display: none; }
	.appl .tbn li { flex: 0 0 auto; border: 0; margin: 0; }
	.appl .tbn li a { display: block; }
	.appl .tbn ul + ul, .appl .tbn ul + h2 + ul { margin-top: 6px; }
}

/* =====================================================================
   手機：767px 以下
   ===================================================================== */
@media (max-width: 767px) {
	body { font-size: 14px; }
	.wp, #hd .wp, #wp, .widthauto .wp, .widthauto #hd .wp, .widthauto #wp { padding-left: 10px; padding-right: 10px; }

	/* 頁首：最上方工具列收起，Logo 列右邊放亮暗色與選單按鈕 */
	#toptb { display: none; }
	#hd .wp { padding-top: 0; }
	#hd .hdc { padding: 8px 0; gap: 8px; }
	#hd h2 img { max-height: 36px; max-width: 46vw; }
	.bz-tools { display: flex; align-items: center; flex: 0 0 auto; margin-left: auto; }
	.bz-tools .bz-theme, .bz-tools .bz-menu { width: 40px; height: 40px; margin: 0; color: var(--bz-text); }

	/* 訪客的快速登入表單換成簡單的連結（完整登入頁仍可用） */
	#lsform { display: none; }
	.bz-guest { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; margin-right: 4px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--bz-link); }
	.bz-guest.bz-reg { background: var(--bz-main); color: #FFF; }
	#hd .hdc { flex-wrap: wrap; }
	#hd h2 { margin-right: auto; }
	#um { display: contents; }
	#um .avt { position: static; margin: 0; order: 2; flex: 0 0 auto; }
	#um .avt img { width: 36px; height: 36px; }
	.bz-tools { order: 3; }
	/* 會員連結（我的、設定、提醒、登出…）收進選單裡 */
	#um p { display: none; order: 5; flex: 1 1 100%; margin: 0; padding: 4px 6px; text-align: left; line-height: 40px; border: 1px solid var(--bz-border); border-radius: var(--bz-radius); background: var(--bz-card); box-sizing: border-box; }
	#um p + p { order: 6; }
	html.bz-nav-open #um p { display: flex; flex-wrap: wrap; gap: 0 4px; }
	#um p a, #um p strong a { display: inline-block; padding: 0 10px; font-size: 15px; }
	#um .pipe { display: none; }
	.bz-menu.bz-has-new { position: relative; }
	.bz-menu.bz-has-new::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bz-red); box-shadow: 0 0 0 2px var(--bz-bg); }

	/* 主導覽：預設收起，點選單按鈕展開 */
	#nv { display: none; border-radius: var(--bz-radius); padding: 6px; margin-top: 8px; }
	html.bz-nav-open #nv { display: block; }
	#nv ul { display: block; }
	#nv li { margin: 0; }
	#nv li a { height: 44px; line-height: 44px; font-size: 16px; }
	#qmenu { display: none; }
	#mu { display: none; }
	html.bz-nav-open #mu { display: block; }

	#scbar { margin-top: 8px; padding: 6px; }
	.scbar_hot_td, .scbar_type_td { display: none; }
	#scbar_txt { border-right: 1px solid var(--bz-border2); border-radius: 8px; font-size: 16px; height: 40px; }
	#scbar_btn { height: 40px; width: 42px; }

	#pt { margin: 8px 0 4px; font-size: 13px; }
	#pt .y { display: none; }
	#chart { font-size: 12.5px; }
	#chart .y { float: none; display: block; }

	.bm { margin-bottom: 10px; }
	.bm_h { padding: 10px 12px; }
	.bm_c { padding: 10px 12px; }

	.px, .ps, select { height: 40px; font-size: 16px; }
	.pt, textarea { font-size: 16px; }
	.pn { height: 40px; line-height: 38px; padding: 0 18px; font-size: 15px; }

	/* 版塊列表：只留圖示、名稱與簡介 */
	.fl_tb, .fl_tb tbody { display: block; }
	.fl_tb tr { display: flex; align-items: center; border-top: 1px solid var(--bz-border); }
	.fl_tb tr:first-child { border-top: 0; }
	.fl_tb td { display: block; border: 0 !important; padding: 12px 6px; }
	.fl_tb td.fl_icn { flex: 0 0 44px; width: 44px; padding-left: 12px !important; }
	.fl_tb td.fl_icn + td { flex: 1; min-width: 0; padding-right: 12px; }
	.fl_tb .fl_i, .fl_tb .fl_by { display: none; }
	.fl_tb td.fl_g { flex: 1 1 100%; width: auto !important; }
	.fl_tb h2 { font-size: 16px; }
	.fl_tb h2 em { font-size: 12px; }
	.fl_g { width: 100% !important; display: block; }
	.fl_g dl { padding-left: 56px; }

	/* 帖子列表：一則一塊，標題在上，作者與回覆數在下 */
	#threadlist .th { display: none; }
	.tl table, .tl tbody { display: block; width: auto; }
	.tl tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; padding: 11px 12px; border-bottom: 1px solid var(--bz-border); gap: 2px 10px; }
	.tl tbody tr:hover th, .tl tbody tr:hover td { background: none; }
	.tl th, .tl td { display: block; padding: 0; border: 0 !important; width: auto !important; }
	.tl .icn, .tl .o { display: none; }
	.tl th { flex: 1 1 100%; font-size: 16px; line-height: 1.5; }
	.tl th a.xst, .tl th a.s { font-size: 16px; }
	.tl th .tps { display: none; }
	.tl td.by { flex: 0 1 auto; font-size: 12.5px; line-height: 1.6; }
	.tl td.by cite, .tl td.by em { display: inline; margin-right: 6px; }
	.tl td.by + td.num + td.by { display: none; }
	.tl td.num { flex: 0 0 auto; margin-left: auto; font-size: 12.5px; }
	.tl td.num a, .tl td.num em { display: inline; }
	.tl td.num em::before { content: " / "; color: var(--bz-text3); }
	#separatorline, .emptb { display: none !important; }
	#pgt { gap: 8px; }
	#pgt .pg, #pgt .pgb { display: none; }
	#newspecial, #newspecialtmp, #post_reply, #post_replytmp { display: inline-block; }
	#newspecial img, #post_reply img, #newspecialtmp img, #post_replytmp img { height: 38px; width: auto; }
	.pg label, .pg .nxt + label { display: none; }
	.pg a, .pg strong, .pgb a { height: 36px; line-height: 36px; padding: 0 12px; }
	.pgs { justify-content: center; }
	.pgs .pg, .pgs .pgb { margin: 0; }
	#f_pst .bm_c { padding: 10px; }
	#fastpostform table, #fastpostform tbody, #fastpostform tr, #fastpostform td { display: block; width: auto; }
	#fastpostform .pls { display: none; }
	#fastpostform .plc { padding: 12px; }
	.bm.bml h1.xs2 { font-size: 18px; }
	.bm.bml .bm_c { padding: 8px 12px; }

	/* 帖子內容：作者列在上，內文在下 */
	#postlist > table, #postlist > table tbody, #postlist > table tr, #postlist > table td { display: block; width: auto; }
	#postlist > table td.pls { display: none; }
	#postlist > table td.plc { padding: 12px 12px 10px; }
	.ts { font-size: 19px; }
	.plhin, .plhin > tbody, .plhin > tbody > tr, .plhin > tbody > tr > td { display: block; width: auto; }
	.plhin > tbody > tr > td.pls { display: none; border: 0; }
	.plhin > tbody > tr:first-child > td.pls { display: block; padding: 10px 12px; background: none; border-bottom: 1px solid var(--bz-border); }
	.plhin .favatar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; min-height: 40px; }
	.plhin .favatar > * { display: none; }
	.plhin .favatar > .pi { display: block; order: 2; padding: 0; border: 0; min-height: 0; flex: 0 1 auto; min-width: 0; }
	.plhin .favatar > .pi .authi { font-size: 15px; font-weight: 600; line-height: 22px; }
	.plhin .favatar > div:not([class]) { display: block; order: 1; flex: 0 0 auto; }
	.plhin .favatar .avatar { margin: 0; }
	.plhin .favatar .avatar img { width: 40px; height: 40px; display: block; }
	.plhin .favatar > ul.o { order: 3; margin: 0 0 0 auto; padding: 0; display: flex; gap: 12px; width: auto; }
	.plhin .favatar > ul.o li { width: auto; float: none; margin: 0; padding: 0; font-size: 13px; }
	.plhin .favatar > ul.o li.buddy, .plhin .favatar > ul.o li.poke2, .plhin .favatar > ul.o li.callon { display: none; }
	#fj, .authi .pipe.show, .authi a.show, .authi .none { display: none !important; }
	.plhin > tbody > tr > td.plc { padding: 0 12px; }
	.pi { padding: 8px 0; font-size: 12.5px; }
	.pi strong { float: right; }
	.pct { padding-bottom: 6px; }
	.t_fsz { min-height: 40px; }
	.t_f, .t_f td { font-size: 16px; line-height: 1.75; }
	.pl .quote { padding-left: 12px; background-image: none !important; }
	.pob { display: flex; flex-wrap: wrap; align-items: center; line-height: 34px; }
	.pob em, .pob p { float: none; display: flex; flex-wrap: wrap; }
	.pob p { margin-left: auto; }
	.sign { max-height: 60px; overflow: hidden; }
	table.ad { display: none !important; }
	.plc .pi .pti .authi .pipe, .authi .xg1 + .pipe { margin: 0 3px; }
	#p_btn { padding: 6px 0; }
	.hin, .plhin .hin { opacity: 1 !important; }
	#scrolltop { display: none !important; }
	.vwthd .y, .vwthd .xg1 .pipe { display: none; }

	/* 發帖頁 */
	#postbox { padding: 0; }
	#postbox .pbt .ftid, #postbox .pbt .z > * { max-width: 100%; }
	#subject { flex: 1 1 100%; min-width: 0; }
	#subjectchk { display: none; }
	.edt .bar { height: auto; max-height: none; }
	.edt .btn { float: none; display: flex; flex-wrap: nowrap; overflow-x: auto; border: 0; }
	.edt .b1r, .edt .b2r { height: auto; border: 0; display: flex; flex-wrap: wrap; }
	#e_adv_s1, #e_adv_s3 { display: none; }
	#e_textarea { min-height: 220px; }
	.pnpost { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
	#post_extra_tb { display: flex; flex-wrap: wrap; }
	#post_extra_tb label { float: none; }

	/* 表單類頁面：標籤在上、欄位在下 */
	.rfm { max-width: none; }
	.rfm table, .rfm tbody, .rfm tr, .rfm th, .rfm td { display: block; width: auto !important; }
	.rfm th { padding: 10px 2px 2px; line-height: 22px; text-align: left; }
	.rfm td { padding: 2px 2px 8px; line-height: 1.6; }
	.rfm .px, .rfm .ps { width: 100% !important; }
	.rfm .tipcol { padding-top: 0; }
	.tfm, .tfm tbody, .tfm tr, .tfm th, .tfm td, .tfm caption { display: block; width: auto !important; }
	.tfm th { padding: 10px 0 2px; text-align: left; font-weight: 600; }
	.tfm td { padding: 2px 0 8px; }
	.tfm .px, .tfm .pt, .tfm .ps, .tfm select { max-width: 100%; }
	.tfm .px, .tfm .pt { width: 100% !important; }
	.tfm .d { clear: both; }

	/* 資料表格放不下時可橫向捲動 */
	.dt, .tdat, .mn > table:not(.tfm), .bm_c > table:not(.tfm):not(.fl_tb) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.tb { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
	.tb::-webkit-scrollbar { display: none; }
	.tb li { flex: 0 0 auto; }
	.tb .y, .tb .o { margin-left: 8px; }
	.ct2_a .mn, .ct3_a .mn, .widthauto .ct2_a .mn, .widthauto .ct3_a .mn { padding: 10px 12px !important; }

	/* 浮動視窗：貼齊螢幕左右，內容不超出 */
	.fwinmask { left: 8px !important; right: 8px !important; width: auto !important; max-width: none; }
	.fwinmask .fwin { width: 100% !important; }
	.fwinmask .m_c, .fwinmask .m_c > *, .fwinmask .c, .fwinmask .flb, .fwinmask form, .fwinmask .o { width: auto !important; max-width: 100%; box-sizing: border-box; }
	.fwinmask .px, .fwinmask .pt { max-width: 100%; }
	.fwinmask .rfm { width: auto; }
	.p_pop, .p_pof { max-width: calc(100vw - 16px); }

	#ft { display: block; text-align: center; font-size: 12.5px; }
	#flk { text-align: center; }
	#frt { margin-top: 6px; }
}

/* =====================================================================
   各頁面補充
   ===================================================================== */
/* 版塊頁標題列 */
.bm.bml .bm_h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; border: 0; background: none; padding: 12px 14px 4px; }
.bm.bml .bm_h::after { display: none; }
.bm.bml .bm_h h1 { order: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.bm.bml .bm_h h1 .i { color: var(--bz-text3); font-size: 12.5px; }
.bm.bml .bm_h .y { order: 2; float: none; white-space: nowrap; font-size: 13px; }
.ico_increase, .ico_fall { display: inline-block; float: none; margin: 0 2px; vertical-align: middle; }

/* 搜尋頁 */
#scform { width: 100%; max-width: 640px; }
#scform_form { width: 100%; }
#scform_tb { display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; }
#scform_tb .y { float: none; order: 9; margin-left: auto; }
#scform_tb a { float: none; }
.td_srchtxt { width: 100%; }
#scform_srchtxt { width: 100%; height: 40px; line-height: 34px; box-sizing: border-box; border-width: 2px; border-right: 0; border-radius: 8px 0 0 8px; color: var(--bz-text); }
#scform_submit { width: 64px; height: 40px; border-radius: 0 8px 8px 0; }
.slst li, .slst h3, .slst p { overflow-wrap: anywhere; }
.tl .th { overflow: hidden; }

/* 排行榜、名單 */
.biduser { width: auto; max-width: 100%; }
.xl2 { background-image: none; }
.xl2 li, .xl2 li.xl2_r { width: 50%; margin-right: 0; box-sizing: border-box; padding-right: 12px; }
.pg_ranklist .tbmu, .tbmu { overflow-wrap: anywhere; }

/* 註冊頁的提示文字 */
.rfm .p_tip, .rfm .p_chk { max-width: 100%; box-sizing: border-box; }

/* 編輯器按鈕 */
.pnpost .pn { height: 36px; line-height: 34px; }
.pnpost .pn span, .pnpost .pn em { line-height: 34px; display: inline; padding: 0; }
.pn span, .pn em, .pn strong { height: auto; }

@media (max-width: 767px) {
	.bm.bml .bm_h .y .pipe { margin: 0 4px; }
	.vwthd .xg1, .vwthd .y, .ts + .xg1, .pls + .plc .y { display: none; }
	#postlist > table td.plc h1.ts { float: none; }

	/* 發帖頁 */
	#postbox .pbt .z > span:first-child { flex: 1 1 100%; }
	#subject { width: 100% !important; }
	.edt .bar { height: auto; padding: 4px; overflow: visible; display: block; }
	.edt .bar > .y { float: none; display: flex; align-items: center; justify-content: flex-end; margin-bottom: 4px; }
	.edt .bar > .y .b2r { display: none; }
	.edt .bar > .y .z { float: none; display: flex; align-items: center; gap: 8px; }
	#e_button { float: none; display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border: 0; }
	#e_button > div { flex: 0 0 auto; float: none; display: block; }
	#e_adv_s1, #e_adv_s3 { display: block; }
	.edt .bbar { font-size: 12px; }
	.pnpost { gap: 8px 10px; }
	.pnpost > a.y { order: 9; float: none; flex: 1 1 100%; }
	.pnpost .pn { height: 42px; line-height: 40px; }
	.pnpost .pn span, .pnpost .pn em { line-height: 40px; }
	#post_extra_c, .exfm { overflow-x: auto; }

	/* 註冊、登入 */
	.rfm .tipcol { position: static; }
	.rfm .p_tip, .rfm .p_chk { position: static; width: auto; padding: 0; background: none; }
	.rfm .p_tip { display: block !important; font-size: 12.5px; color: var(--bz-text3); }
	.rfm .p_chk:empty { display: none; }

	/* 搜尋頁 */
	#scform, #scform tbody, #scform tr, #scform td { display: block; width: auto; }
	#scform_form, #scform_form tbody { display: block; }
	#scform_form tr { display: flex; }
	#scform_form td.td_srchtxt { flex: 1; min-width: 0; }
	#scform_srchtxt { font-size: 16px; }

	.xl2 li, .xl2 li.xl2_r { width: 100%; float: none; padding-right: 0; height: auto; }
	#avatardesigner, #avatardesigner canvas, #avataradjuster { max-width: 100%; }
	.mn form.z, .mn form.y { float: none; max-width: 100%; }
	.mn form table { max-width: 100%; }
	.mn caption, .mn caption h3 { width: auto; max-width: 100%; }
}
.slst { width: auto; max-width: 760px; }
@media (max-width: 767px) {
	.mn form.z table, .mn form.z tbody, .mn form.z tr, .mn form.z th, .mn form.z td, .mn form.z caption { display: block; width: auto; }
	.mn form.z th, .mn form.z td { padding: 4px 0; }
}
@media (max-width: 767px) {
	.dt th, .dt td { white-space: nowrap; }
	.slst a { text-decoration: none; }
}
.slst a { color: var(--bz-link); }
@media (max-width: 767px) {
	/* 浮動視窗裡寫死寬度的內容（快速回覆、登入等）改成跟著視窗寬度 */
	.fwinmask table.fwin { table-layout: fixed; width: 100% !important; }
	.fwinmask .m_c [style*="width"], .fwinmask .m_c .tedt, .fwinmask .m_c .c, .fwinmask .m_c .rfm, .fwinmask .m_c .pt, .fwinmask .m_c textarea { width: auto !important; max-width: 100%; box-sizing: border-box; }
	.fwinmask .m_c .tedt .pt, .fwinmask .m_c textarea { width: 100% !important; }
	.fwinmask .m_c { overflow: hidden; }
	.fwinmask .m_c .o { height: auto; padding: 10px 12px; }
	.fwinmask .t_l, .fwinmask .t_r, .fwinmask .m_l, .fwinmask .m_r, .fwinmask .b_l, .fwinmask .b_r { width: 0 !important; padding: 0 !important; }
}
/* 主欄 + 側欄：寬螢幕並排，窄螢幕（1023px 以下）上下堆疊 */
@media (min-width: 1024px) {
	.ct2, .widthauto .ct2 { display: flex; align-items: flex-start; gap: 15px; margin: 0; }
	.ct2::after { display: none; }
	.ct2 > .mn, .widthauto .ct2 > .mn { flex: 1 1 auto; min-width: 0; width: auto !important; float: none; margin: 0 !important; }
	.ct2 > .sd, .widthauto .ct2 > .sd { flex: 0 0 220px; width: 220px; float: none; margin: 0 !important; }
	.ct2 #chart, .ct2 #an, .widthauto .ct2 #chart, .widthauto .ct2 #an { margin-right: 0; }
}
@media (max-width: 1023px) {
	.rfm .tipcol { position: static; }
	.rfm .p_tip, .rfm .p_chk { position: static; width: auto; padding: 0; background: none; }
}
/* 設定類頁面：左側選單 + 內容（寬螢幕並排） */
@media (min-width: 1024px) {
	.ct2_a, .ct3_a, .widthauto .ct2_a, .widthauto .ct3_a { display: flex; align-items: stretch; padding: 0; }
	.ct2_a::after, .ct3_a::after { display: none; }
	.ct2_a > .appl, .ct3_a > .appl, .widthauto .ct2_a > .appl, .widthauto .ct3_a > .appl { order: 1; flex: 0 0 160px; width: 160px; float: none; margin: 0 !important; padding: 10px 8px; box-sizing: border-box; border-right: 1px solid var(--bz-border); min-height: 0; }
	.ct2_a > .mn, .ct3_a > .mn, .widthauto .ct2_a > .mn, .widthauto .ct3_a > .mn { order: 2; flex: 1 1 auto; min-width: 0; width: auto !important; float: none; margin: 0 !important; padding: 14px 18px; }
	.ct3_a > .sd, .widthauto .ct3_a > .sd { order: 3; flex: 0 0 220px; width: 220px; float: none; margin: 0 !important; padding: 14px 14px 14px 0; box-sizing: border-box; }
	.appl .tbn { margin: 0; }
	.pg_post .ct2_a > .appl { display: none; }
}
@media (min-width: 1024px) {
	.pg_post .ct2_a, .widthauto .pg_post .ct2_a { display: block; }
	.pg_post .ct2_a > .mn { padding: 10px 14px; }
}
#postbox .pbt .z > span:first-child { flex: 1 1 320px; max-width: 640px; }
#postbox .pbt #subject { width: 100% !important; }

/* 即時聊天整頁：這個風格的頁首比預設高，面板高度跟著調，讓整個聊天面板不用捲頁面就看得到 */
html body .dzc-page .dzc-panel { height: calc(100vh - 278px); min-height: 360px; }
@media (max-width: 767px) {
	html body .dzc-page .dzc-panel { height: calc(100vh - 172px); height: calc(100dvh - 172px); min-height: 320px; }
}

/* =====================================================================
   v1.2：主色可由後台設定、主選單重新設計、細節修飾
   ===================================================================== */
/* 主色：後台「風格管理 → 編輯」填的顏色會寫進 --bz-main-base，其餘深淺由它推算 */
:root { --bz-main-base: #2B7ACD; }
@supports (color: color-mix(in srgb, red, blue)) {
	:root {
		--bz-main: var(--bz-main-base);
		--bz-main-d: color-mix(in srgb, var(--bz-main-base) 80%, #000);
		--bz-main-soft: color-mix(in srgb, var(--bz-main-base) 9%, #FFF);
		--bz-link: color-mix(in srgb, var(--bz-main-base) 78%, #000);
	}
}

/* ---------- 主選單 ---------- */
#nv { min-height: 48px; padding: 0 8px; border: 1px solid transparent; background: var(--bz-main); box-shadow: 0 2px 10px rgba(16, 24, 40, .10); }
#nv ul { gap: 2px; align-items: center; }
#nv li { margin: 6px 0; }
#nv li a { height: 36px; line-height: 36px; padding: 0 16px; border-radius: 9px; color: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; letter-spacing: .02em; transition: background-color .15s, color .15s; }
#nv li a:hover, #nv li.hover a { background: rgba(255, 255, 255, .16); color: #FFF; }
#nv li.a a, #nv li.a a:hover { background: #FFF; color: var(--bz-main-d); box-shadow: 0 1px 3px rgba(16, 24, 40, .18); }
#qmenu, #qmenu.a { position: relative; height: 34px; line-height: 32px; margin: 0 0 0 8px; padding: 0 30px 0 14px; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .45); border-radius: 9px; background: transparent none !important; color: #FFF !important; font-size: 14px; font-weight: 600; text-decoration: none; transition: background-color .15s; }
#qmenu::after { content: ""; position: absolute; right: 12px; top: 50%; margin-top: -2px; border: 5px solid transparent; border-top-color: currentColor; border-bottom-width: 0; }
#qmenu:hover, #qmenu.a { background-color: rgba(255, 255, 255, .16) !important; }
#mu ul { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 6px 8px; margin: 6px 0 0; border: 1px solid var(--bz-border); border-radius: var(--bz-radius); background: var(--bz-card); }
#mu li { float: none; }
#mu a { display: block; padding: 0 12px; height: 30px; line-height: 30px; border-radius: 7px; color: var(--bz-text2); }
#mu a:hover, #mu .a a { background: var(--bz-main-soft); color: var(--bz-link); }

/* ---------- 細節 ---------- */
.fl .bm_h h2, #online .bm_h h3, #category_lk .bm_h h3 { position: relative; padding-left: 12px; font-weight: 700; }
.fl .bm_h h2::before, #online .bm_h h3::before, #category_lk .bm_h h3::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 15px; margin-top: -7px; border-radius: 2px; background: var(--bz-main); }
.fl_by, .fl_by cite, .fl_by cite a { color: var(--bz-text2); }
.fl_by a { color: var(--bz-link); }
.fl_i em, .fl_i .xi2 { color: var(--bz-link); }
.pn, .px, .pt, .pg a, .ttp a, .tbn li a, .p_pop a { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
@media (hover: hover) {
	.fl_tb tr:hover > td { background: color-mix(in srgb, var(--bz-main-soft) 55%, transparent); }
}
#um .vwmy a, #um strong a { font-weight: 600; }
#toptb { font-size: 13px; }
.bz-theme { border: 1px solid transparent; }
.bz-theme:hover { border-color: var(--bz-border); }
#scbar { border: 1px solid var(--bz-border); box-shadow: none; }
#scbar_btn { background-color: var(--bz-main); border-color: var(--bz-main); color: #FFF; }
#scbar_btn:hover { background-color: var(--bz-main-d); }
#chart { color: var(--bz-text2); }
#chart em, #chart .xi2 { color: var(--bz-text); font-style: normal; }
#ft { font-size: 13px; }

@media (max-width: 767px) {
	/* 手機選單：卡片式清單 */
	#nv { padding: 6px; border-color: var(--bz-border); background: var(--bz-card); box-shadow: var(--bz-shadow-pop); }
	#nv li { margin: 0; }
	#nv li a { height: 46px; line-height: 46px; padding: 0 14px; color: var(--bz-text); font-size: 16px; }
	#nv li a:hover, #nv li.hover a { background: var(--bz-bg2); color: var(--bz-text); }
	#nv li.a a, #nv li.a a:hover { background: var(--bz-main-soft); color: var(--bz-link); box-shadow: none; }
	html.bz-nav-open #um p { box-shadow: var(--bz-shadow-pop); }
	.bz-menu[aria-expanded="true"] { background: var(--bz-main-soft); color: var(--bz-link); }
	.fl .bm_h h2 { font-size: 15px; }
}
/* X5 預設的主選單是「可橫向拖曳 + 兩端漸層陰影」；這裡改成自動換行，所以把漸層、內陰影、額外邊距都拿掉 */
#nv > ul, #nv > ul.navscroll { background-image: none !important; height: auto; overflow: visible; flex-wrap: wrap; cursor: default; }
#nv li, #nv li.a, #nv li:first-child, #nv li:first-child.a { margin-left: 0; margin-right: 0; box-shadow: none; background: none; height: auto; line-height: normal; }
#nv li.hover a:hover, #nv li.hover a { background-image: none; }
@media (max-width: 767px) {
	#nv > ul, #nv > ul.navscroll { display: block; }
}

/* =====================================================================
   v1.2.1：編輯器
   ===================================================================== */
.edt { border-color: var(--bz-border2); }
.edt .bar a { border-radius: 5px; }
.edt .btn { border-right: 0; }
.edt .b1r, .edt .b2r { border-left-color: transparent; }
.edt .b2r a.dp { border-radius: 5px; }
.tedt .bar { height: auto; min-height: 30px; line-height: 28px; padding: 2px 10px; box-sizing: border-box; }
.tedt .bar .fpd { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.tedt .bar .fpd a { float: none; flex: 0 0 auto; border-radius: 4px; }
.tedt .bar .y { margin-left: 10px; }
#fastpostmessage { display: block; width: 100% !important; box-sizing: border-box; padding: 8px 10px !important; min-height: 120px; line-height: 1.7; }
#fastposteditor .tedt, .hasfsl .tedt { width: auto; }

/* 快速發帖 / 回覆：手機上編輯框佔滿寬度（預設會留 170px 給旁邊的表情欄），表情改由工具列上的按鈕叫出來 */
@media (max-width: 767px) {
	#fastposteditor, #fastposteditor.hasfsl, .hasfsl { margin-right: 0 !important; width: auto !important; float: none; }
	#fastsmiliesdiv { display: none !important; }
	#fastposteditor .tedt, .hasfsl .tedt, #f_pst .tedt { width: auto !important; margin: 0; }
	#fastpostform .pbt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
	#fastpostform .pbt .ftid { float: none; }
	#fastpostform #subject { flex: 1 1 100%; width: 100% !important; }
	#fastpostform .pbt > span { flex: 1 1 100%; }
	#fastpostsubmitline, #f_pst .pnpost { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
	.tedt .bar .fpd a { margin: 3px 4px 3px 0; }
}
.tedt .bar { display: flex; flex-wrap: wrap; align-items: center; }
.tedt .bar .fpd { flex: 1 1 auto; order: 1; min-width: 0; }
.tedt .bar > .y { order: 2; float: none; margin-left: auto; }
.edt .bar a#e_fullswitcher, .edt .bar a#e_simple { border-color: var(--bz-border2); border-radius: 5px; }

/* =====================================================================
   v1.2.2：捲動時固定的作者欄與主選單
   Discuz 會在捲動帖子時用 JS 把作者欄（#favatar…）設成 position:fixed，把主選單釘在最上面。
   固定之後的元素不再受表格欄寬限制，所以要明確給它和左欄一樣的寬度。
   ===================================================================== */
:root { --bz-pls-w: 168px; }
td.pls { width: var(--bz-pls-w); }
.pls .favatar, td.pls > div.pls { width: var(--bz-pls-w); max-width: var(--bz-pls-w); box-sizing: border-box; overflow: hidden; background: none; border: 0; }
.pls .favatar .pi, .pls .favatar .tns, .pls .favatar dl, .pls .favatar p, .pls .favatar ul { max-width: 100%; box-sizing: border-box; }
/* 釘在最上面的主選單：不要半透明（內容會從後面透出來），加一點陰影和下圓角 */
#nv[style*="fixed"] { opacity: 1 !important; border-radius: 0 0 var(--bz-radius) var(--bz-radius); box-shadow: 0 4px 16px rgba(16, 24, 40, .18); }
@media (max-width: 1023px) {
	:root { --bz-pls-w: 132px; }
}
@media (max-width: 767px) {
	/* 手機：作者列在每樓最上面、主選單收在選單按鈕裡，兩個都不固定 */
	.pls .favatar, td.pls > div.pls { width: auto; max-width: none; position: static !important; overflow: visible; }
	#nv, #nv[style*="fixed"] { position: static !important; width: auto !important; height: auto !important; left: auto !important; opacity: 1 !important; box-shadow: var(--bz-shadow-pop); border-radius: var(--bz-radius); }
	#nv_ph { height: auto !important; }
}
.pls .pbg2, .pls .pbg, .pls .pbr2 { max-width: calc(var(--bz-pls-w) - 44px); }
@media (max-width: 1023px) {
	.pls p, .pls .pil, .pls .o { margin-left: 12px; margin-right: 6px; }
	.pls .pi { padding-left: 12px; }
	.pls dd { width: auto; }
}

/* v1.2.3：提示訊息頁（例如「沒有權限」）的框在手機上不要超出螢幕 */
.nfl .f_c, .f_c.altw, .altw { max-width: 100%; box-sizing: border-box; }
@media (max-width: 767px) {
	.nfl .f_c, .f_c.altw, .altw { width: auto !important; margin-left: 0; margin-right: 0; }
	.alert_error, .alert_right, .alert_info, #messagetext { width: auto !important; max-width: 100%; box-sizing: border-box; background-position: 10px 10px; }
	.alert_btnleft, #messagetext p { width: auto !important; max-width: 100%; }
}
