@import url("https://g.udn.com.tw/community/img/css/layout_style113.css");

@import url("https://g.udn.com.tw/community/img/css/black.css");

html, body { background-color: #f3f1ea !important; color: #25352f; font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif; }

#container { width: calc(100% - 32px) !important; max-width: 1128px; margin: 0 auto !important; background: #fff; box-shadow: 0 8px 28px rgba(31,54,46,.16); }

#header { width: 100%; height: 400px; background-position: center center !important; background-repeat: no-repeat !important; background-size: cover !important; overflow: hidden; }

#header::before { content: ""; position: absolute; left: 28px; top: 28px; width: 520px; max-width: calc(100% - 56px); height: 118px; border-radius: 8px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(20,53,43,.16); z-index: 1; }

#header_name { left: 50px; top: 48px; max-width: 470px; color: #173f34; font-size: 0; line-height: 1.25; letter-spacing: .02em; text-shadow: none; z-index: 2; }

#header_name a:first-child { color: #173f34; font-size: 28px; font-weight: 800; }

#header_name a:last-child, #header_url, #header_items { display: none; }

#header_description { position: absolute; left: 50px; top: 88px; max-width: 470px; color: #334940; font-size: 13px; line-height: 1.5; z-index: 2; }

#menubar { width: 100%; height: auto; min-height: 54px; margin: 0; background: #173f34; }

#menubar_body, #menu { width: 100%; height: auto; }

#menu dl { display: flex; align-items: center; justify-content: center; width: 100%; margin: 0; padding: 0; }

#menu dl dt { display: block; float: none; width: auto; height: auto; margin: 0; padding: 17px 22px; text-indent: 0; border-right: 1px solid rgba(255,255,255,.18); }

#menu dl dt a, #menu dl dt a:link, #menu dl dt a:visited { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .05em; text-decoration: none; }

#menu dl dt a:hover { color: #f4d78b; }

#wrapper { width: 100%; overflow: hidden; padding: 28px 30px 40px; box-sizing: border-box; }

#main { width: calc(100% - 270px); }

#content { width: 100%; box-sizing: border-box; padding: 0 20px; }

#sidebar { width: 240px; box-sizing: border-box; padding: 0 16px; }

.main-title, a.main-title:link, a.main-title:visited, .panel-topic, a.panel-topic:link, a.panel-topic:visited { color: #173f34; font-weight: 700; }

a.main-title:hover, a.panel-topic:hover { color: #a26d18; }

.main-text, a.main-text:link, a.main-text:visited { color: #3f5049; line-height: 1.9; }

#content img { max-width: 100%; height: auto; }

@media screen and (max-width: 800px) {

 html, body { background-color: #fff !important; }

 #container { width: 100% !important; margin: 0 !important; box-shadow: none; }

 #header { height: 300px; background-position: 58% center !important; }

 #header::before { left: 16px; top: 20px; width: calc(100% - 32px); max-width: none; height: 100px; }

 #header_name { left: 32px; top: 38px; max-width: calc(100% - 64px); }

 #header_name a:first-child { font-size: 22px; }

 #header_description { left: 32px; top: 72px; max-width: calc(100% - 64px); font-size: 11px; }

 #menubar { min-height: 48px; }

 #menu dl { flex-wrap: wrap; }

 #menu dl dt { padding: 14px 12px; }

 #menu dl dt a, #menu dl dt a:link, #menu dl dt a:visited { font-size: 13px; }

 #wrapper { padding: 22px 14px 30px; }

 #main, #content, #sidebar { float: none; width: 100%; }

 #content { padding: 0; }

 #sidebar { padding: 20px 0 0; }

}





/* 新版門面修正：針對公開頁實際 menu_1 至 menu_4 結構 */

#header_body{position:relative;width:100%!important;max-width:1128px;margin:0 auto;background-size:cover!important;background-position:center!important}

dl:has(#menu_1){display:flex!important;flex-wrap:wrap;justify-content:center;align-items:center;width:100%!important;min-height:54px;margin:0 auto!important;padding:0 10px!important;box-sizing:border-box;background:#173f34!important}

#menu_1,#menu_2,#menu_3,#menu_4{display:inline-flex!important;float:none!important;align-items:center;justify-content:center;width:auto!important;min-width:82px;height:auto!important;margin:0!important;padding:16px 18px!important;text-indent:0!important;border-right:1px solid rgba(255,255,255,.2);box-sizing:border-box}

#menu_1 a,#menu_2 a,#menu_3 a,#menu_4 a{color:#fff!important;font-size:14px!important;font-weight:700;line-height:1.4;text-decoration:none}

#menu_1 a:hover,#menu_2 a:hover,#menu_3 a:hover,#menu_4 a:hover{color:#f4d78b!important}

#article_show_body{max-width:820px;margin:24px auto;padding:30px 34px;background:#fff;border:1px solid #e8e5dc;border-radius:8px;box-shadow:0 5px 20px rgba(31,54,46,.07)}

body #article_show_content, body #article_show_content p{color:#33443d;font-size:17px;line-height:1.95;overflow-wrap:anywhere}

#article_show_content h1,#article_show_content h2,#article_show_content h3{color:#173f34;line-height:1.45}

#article_show_content h2{margin-top:2em;padding-bottom:.45em;border-bottom:2px solid #d9c99c}

#article_show_content img{display:block;max-width:100%;height:auto;margin:22px auto;border-radius:5px}

@media screen and (max-width:800px){#header_body{width:100%!important}dl:has(#menu_1){justify-content:space-around;min-height:48px;padding:0 4px!important}#menu_1,#menu_2,#menu_3,#menu_4{min-width:0;padding:13px 9px!important}#menu_1 a,#menu_2 a,#menu_3 a,#menu_4 a{font-size:13px!important}#article_show_body{margin:12px 10px;padding:22px 18px;border-radius:0}body #article_show_content, body #article_show_content p{font-size:16px;line-height:1.85}}

#content { text-align: left !important; }

#content dl, #content dt, #content dd, #content p { text-align: left !important; }

#content .main-title, #content a.main-title { font-size: 21px; line-height: 1.5; }

#content .main-text { font-size: 15px; line-height: 1.85; }

#content > dl { margin: 0 0 22px; padding: 20px 24px; background: #fff; border-bottom: 1px solid #e7e3d8; }



/* ===== 經典版（classic-blog.udn.com）專屬：搜尋欄與導覽列（2026-11-14 合併回補，恢復 11-13 驗收版）===== */

#header_search { left: 50px; top: 96px; z-index: 2; }

#header_search .inputbox { width: 255px; height: 28px; padding: 2px 8px; border: 1px solid #7b968b; border-radius: 4px; background: rgba(255,255,255,.96); color: #2e453d; font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif; font-size: 13px; }

#header_menus { left: 0; top: 344px; width: 100%; height: 56px; margin: 0; background: rgba(19,58,47,.9); }

#header_menus ul { display: flex; align-items: center; justify-content: center; height: 56px; margin: 0; padding: 0; }

#header_menus li { float: none; height: auto; padding: 0 18px; text-indent: 0; }

#header_menus li a, #header_menus li a:link, #header_menus li a:visited { padding: 0; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-shadow: 0 1px 2px rgba(0,0,0,.28); }

#header_menus li a:hover { color: #f4d78b; text-decoration: none; }

@media screen and (max-width: 800px) {

  #header_search { left: 36px; }

  #header_menus li { padding: 0 8px; }

  #header_menus li a, #header_menus li a:link, #header_menus li a:visited { font-size: 12px; }

}





/* 新版文章排版實際 DOM 修正 2026-11-14 */
body:has(#menu_1) #header_name,body:has(#menu_1) #header_description{text-align:left}
body:has(#menu_1) #article_show_body{box-sizing:border-box;width:100%;max-width:820px;padding:28px;margin:0 auto 28px;background:#fff;border:1px solid #e8e5dc;border-radius:8px}
body:has(#menu_1) .article_topic{font-size:30px;line-height:1.45;font-weight:800;color:#173f34;text-align:left;margin:0 0 18px}
body:has(#menu_1) #article_show_body .article_topic a{font-size:12px;font-weight:400}
body:has(#menu_1) #article_show_content{clear:both;padding-top:18px}
body:has(#menu_1) #article_show_content p{margin:0 0 1.25em}
body:has(#menu_1) #sidebar{text-align:left;font-size:14px;line-height:1.75}
@media(max-width:800px){body:has(#menu_1) #main,body:has(#menu_1) #sidebar{float:none!important;width:100%!important;margin:0!important}body:has(#menu_1) #header::before{height:144px}body:has(#menu_1) #header_description{max-width:calc(100% - 64px);line-height:1.65}body:has(#menu_1) #article_show_body{padding:20px 16px;margin:0;border:0}body:has(#menu_1) .article_topic{font-size:25px}body:has(#menu_1) #sidebar{padding:24px 16px}}

body:has(#menu_1) #content a{color:#173f34;text-decoration:none}body:has(#menu_1) #content a:hover{text-decoration:underline;color:#936b28}body:has(#menu_1) #article_list_body>dl>dt{padding:24px 0;border-bottom:1px solid #e5e2d9;margin:0 0 8px}body:has(#menu_1) #article_list_body .article_topic,body:has(#menu_1) #article_list_body .article_topic a{font-size:22px;font-weight:750;line-height:1.5}body:has(#menu_1) .article_datatime{font-size:12px;color:#6c7972;line-height:1.7;margin:10px 0}body:has(#menu_1) .article_content p{font-size:16px;line-height:1.85;margin:14px 0}body:has(#menu_1) .article_count{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;line-height:1.7;color:#738178;margin-top:12px}body:has(#menu_1) #sidebar div[id$="_head"]{font-size:16px;font-weight:700;color:#173f34;border-bottom:1px solid #d7c99d;margin:20px 0 12px;padding-bottom:7px}body:has(#menu_1) #article_list_head_ctrl_bar_ob{display:flex;align-items:center;gap:24px;font-size:14px}body:has(#menu_1) #article_list_head_ctrl_bar_ob dl{margin:0;padding:0}

@media(max-width:800px){body:has(#menu_1) #top,body:has(#menu_1) #top_body,body:has(#menu_1) #top_slider,body:has(#menu_1) #top_slider_content,body:has(#menu_1) #openCloseIdentifier,body:has(#menu_1) #footer,body:has(#menu_1) #footer_body,body:has(#menu_1) #tb_periphery{width:100%!important;max-width:100%!important;box-sizing:border-box}body:has(#menu_1) #top_slider_content{overflow:hidden}body:has(#menu_1) #openCloseWrap{left:auto;right:12px}body:has(#menu_1) #footer_body{padding:18px 14px 50px;text-align:left}body:has(#menu_1) #footer_link{width:100%;float:none;line-height:2;white-space:normal}body:has(#menu_1) #copyright{position:static;float:none;text-align:left;margin-top:12px}body:has(#menu_1) #go_top{position:static;float:none;text-align:right}body:has(#menu_1) #tb_periphery{left:0;right:0;overflow:hidden}body:has(#menu_1) #tb_periphery_right{display:none}}

