/* 台東民宿網 首頁響應式覆寫層（階段 1a）
   只在 ≤991px 生效；≥992px 桌機呈現完全不變。原始 HTML 不動，只改呈現層。 */
@media (max-width: 991px) {
	html, body { overflow-x: hidden; }
	body { font-size: 15px; line-height: 1.6; }

	/* 固定寬度表格改流動 */
	table { width: 100% !important; max-width: 100% !important; }
	table[width] { width: 100% !important; }
	td[width], th[width] { width: auto !important; }
	td[height], table[height], tr[height] { height: auto !important; }
	[style*="width: 1000px"], [style*="width:1000px"] { width: 100% !important; height: auto !important; }
	[style*="height: 395px"], [style*="height: 423px"] { height: auto !important; min-height: 0 !important; }
	*[style*="width"] { max-width: 100% !important; }

	/* 任何元素都不得寬於父層（含 include 進來的區塊自帶 CSS） */
	body * { max-width: 100% !important; box-sizing: border-box; }
	td, a, span, div, li { white-space: normal !important; }

	/* 圖片：取消 include 樣式的 width:100%（會撐到原圖寬）；以自然尺寸為準再受 max-width 限制 */
	img { width: auto !important; max-width: 100% !important; height: auto !important; }
	iframe, object, embed, video { max-width: 100% !important; }

	/* include 區塊的固定寬輪播／清單（ssc、ssb、activity） */
	#ssblock, .ssblock, .showbox, .silder_nav, [class*="slider"], [class*="silder"], .carousel, .carousel-inner, .carousel-indicators { width: auto !important; max-width: 100% !important; height: auto !important; }
	.carousel-indicators { left: 0 !important; margin-left: 0 !important; }
	ul, ol { width: auto !important; padding-left: 0; }

	/* 1000px 背景切片：置中裁切即可 */
	td[style*="indexbk"], td[style*="tb.jpg"] { background-size: auto 100% !important; }

	/* 左側浮動廣告區改為靜態區塊排在頁尾 */
	#inewsbox, .floatcart { position: static !important; width: 100% !important; left: auto !important; top: auto !important; animation: none !important; }
	.floatcart-tab { display: none !important; }
	#inewsbox table { margin: 0 auto; }

	/* 小字放大到可讀（含內嵌 font-size:12px 的連結） */
	td, th, a, span, p, li, font, b, div { font-size: 15px !important; }
	h1, h1 a { font-size: 24px !important; }
	h2 { font-size: 20px !important; }
	marquee { font-size: 15px !important; }

	/* 所有表格內文字連結加大點擊區（Google 建議點擊目標 ≥ 24px 高且相隔 ≥ 8px） */
	td a, .toplink a, .link a { display: inline-block; padding: 7px 6px; line-height: 1.4; min-height: 24px; }
	td a img { display: block; }
	.link td[colspan] { padding: 2px 6px; }
}

@media (max-width: 767px) {
	/* 多欄版面改直排：valign=top 的欄位與百分比寬度欄位 */
	td[valign="top"], td[width$="%"] { display: block !important; width: 100% !important; box-sizing: border-box; }
	tr:has(> td[valign="top"]), tr:has(> td[width$="%"]) { display: block; }

	/* 頁首 */
	.logofont h1 { margin-top: 0 !important; text-align: center; padding: 12px 0 4px; }
	.logofont { font-size: 22px; line-height: 1.3; }
	.toplink { margin: 0 auto; }

	/* 回頂端按鈕縮小 */
	#gotop { font-size: 36px; }
}

/* ---- 2026-09-15 第二版：修正手機實機發現的問題 ---- */
@media (max-width: 991px) {
	/* 左上角浮動廣告切換鈕會壓在頁首上；廣告區已改靜態，切換鈕不需要 */
	.inewss { display: none !important; }

	/* 首選（ssc）與熱門（ssb）輪播：原本靠絕對定位＋JS 算寬度，手機上被壓成 0；改為全部直排靜態顯示，內容一個不少 */
	.slider_box, .slider_box2 { width: 100% !important; height: auto !important; overflow: visible !important; position: static !important; }
	.silder_con, .silder_con2 { position: static !important; width: 100% !important; height: auto !important; left: 0 !important; overflow: visible !important; }
	.silder_panel, .silder_panel2 { float: none !important; width: 100% !important; height: auto !important; position: static !important; display: block !important; margin-bottom: 8px; }
	.silder_panel img, .silder_panel2 img { width: 100% !important; height: auto !important; display: block; }
	.silder_nav, .silder_nav2 { position: static !important; width: 100% !important; height: auto !important; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; }
	.silder_nav li, .silder_nav2 li { float: none !important; width: auto !important; height: auto !important; flex: 1 1 46%; margin: 0 !important; padding: 8px 6px !important; font-size: 14px !important; line-height: 1.4 !important; opacity: 1 !important; text-align: center; }
	#slider_name ul.silder_nav li.a01 a, .silder_nav2 li a { position: static !important; width: auto !important; height: auto !important; display: block !important; font-size: 14px !important; line-height: 1.4 !important; }
	.slider_box a.prev, .slider_box a.next, .slider_box2 a.prev, .slider_box2 a.next { display: none !important; }
}
@media (max-width: 991px) {
	/* 桌機 1000px 頁首背景圖（含 101台灣 logo、禮物等裝飾）在手機會被裁切後壓在文字上；改為素色 */
	td[style*="tb.jpg"], td[style*="indexbk_01"], td[style*="indexbk_02"], td[style*="indexbk_04"], td[style*="sp4.gif"] { background-image: none !important; background-color: #fff !important; }
}
