/*
Theme Name: Motion (Modern RWD)
Theme URI: https://blog.wangprince.idv.tw/
Description: Modern RWD customized edition of Motion theme for Prince's Blog. Preserves the classic starry dark aesthetic, mint-green accents, and brand identity while introducing fluid 1600px wrapper, 780px optimal reading width, 18px desktop / 16.5px mobile body typography, 1.75 line height, robust responsive layout, overflow protection, and touch-friendly pagination.
Author: Volcanic & Prince Wang
Author URI: https://blog.wangprince.idv.tw/
Version: 2.1.0
Tags: black, dark, responsive-layout, two-columns, right-sidebar
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/************************************************
* 1. 重設與基底樣式 (Resets & Baseline) *
************************************************/
html {
	box-sizing: border-box;
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}
*, *:before, *:after {
	box-sizing: inherit;
}
html, body, div, p, span, h1, h2, h3, h4, h5, h6, img, ul, ol, dl, li, dt, dd,
blockquote, pre, form, fieldset, label, input, table, th, td, a {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: baseline;
	color: #fff;
}
:focus {
	outline: 0;
}
body {
	line-height: 1.6;
	background: #000 url(images/bodybg.jpg) top center no-repeat fixed;
	padding-bottom: 30px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang TC", "微軟正黑體", "Microsoft JhengHei", Arial, sans-serif;
	color: #ffffff;
	text-align: left;
}
ul, ol {
	list-style: none;
}
h1, h2, h3, h4, h5, h6 {
	font-family: Rockwell, Georgia, "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
	color: #ffffff;
	text-shadow: 0 0 4px #444;
}
p, li, dt, dd, blockquote, label, th, td {
	text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}
a {
	color: #a8ef9d;
	text-decoration: none;
	transition: color 0.15s ease;
}
a:hover {
	color: #c9f9bf;
}
hr {
	border: 0;
	height: 1px;
	background: rgba(255, 255, 255, 0.15);
	margin: 2em 0;
}
img, video, iframe {
	max-width: 100%;
	height: auto;
}
.clear {
	clear: both;
}

/************************************************
* 2. 全站外框容器 (Max 1600px Fluid Wrapper) *
************************************************/
#wrapper {
	width: min(92%, 1600px);
	margin: 15px auto 20px auto;
	padding: 0;
	box-sizing: border-box;
}

/************************************************
* 3. 頂部工具列 (#top) *
************************************************/
#top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 8px 0;
	font-size: 0.9375rem;
	margin-bottom: 10px;
}
#top ul.top_menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}
#top ul.top_menu li a {
	color: #e0e0e0;
}
#top ul.top_menu li a:hover {
	color: #a8ef9d;
}
#top ul.top_menu li a.rss {
	background: url(images/rsstrans.png) no-repeat left center;
	padding-left: 18px;
	color: #ff9800;
}
#top #search {
	display: flex;
	align-items: center;
}
#top #searchform {
	display: flex;
	align-items: center;
	gap: 6px;
}
#top #searchbox {
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 0.875rem;
	width: 180px;
	transition: all 0.2s ease;
}
#top #searchbox:focus {
	border-color: #a8ef9d;
	background: rgba(0, 0, 0, 0.85);
	width: 220px;
}
#top .submitbutton {
	background: rgba(168, 239, 157, 0.2);
	border: 1px solid #a8ef9d;
	color: #a8ef9d;
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.15s ease;
}
#top .submitbutton:hover {
	background: #a8ef9d;
	color: #000;
}

/************************************************
* 4. 網站頁首 (#header) *
************************************************/
#header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 24px;
	padding: 20px 0 15px 0;
	margin-bottom: 15px;
}
#header #logo {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 0 1 auto;
}
#header #logo img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	flex-shrink: 0;
}
#header #logo h1 {
	font-size: 2.2rem;
	line-height: 1.2;
	margin: 0;
}
#header #logo h1 a {
	color: #ffffff;
}
#header #logo #desc {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "微軟正黑體", sans-serif;
	font-size: 1rem;
	color: #cfd8dc;
	margin-top: 4px;
	font-weight: 300;
	letter-spacing: 0.5px;
}
#header #headerbanner {
	flex: 0 1 540px;
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-left: 4px solid #a8ef9d;
	padding: 14px 18px;
	border-radius: 4px;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #eceff1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/************************************************
* 5. 主導覽分類列 (.primary_menu) *
************************************************/
#primary-nav-toggle {
	display: none;
}
#primary-nav {
	width: 100%;
	margin-bottom: 25px;
}
.primary_menu {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.55);
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	overflow: visible;
}
.primary_menu li {
	position: relative;
}
.primary_menu li a {
	display: block;
	padding: 12px 18px;
	font-size: 1.0625rem;
	font-weight: 500;
	color: #ffffff;
	transition: background 0.15s ease, color 0.15s ease;
}
.primary_menu li a:hover,
.primary_menu li.current-cat a,
.primary_menu li.current-menu-item a {
	background: rgba(255, 255, 255, 0.12);
	color: #a8ef9d;
}
.primary_menu li ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #111;
	background-color: rgba(10, 15, 20, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	min-width: 180px;
	z-index: 999;
	box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.primary_menu li:hover > ul {
	display: block;
}
.primary_menu li ul li a {
	padding: 10px 14px;
	font-size: 0.9375rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/************************************************
* 6. 主版型佈局 (#main, #content, #sidebar) *
************************************************/
#main {
	display: flex;
	gap: 36px;
	width: 100%;
	align-items: flex-start;
}
#content {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
}
#content.full {
	flex: 1 1 100%;
}
#sidebar {
	flex: 0 0 300px;
	width: 300px;
	min-width: 0;
	font-size: 15px;
	line-height: 1.45;
}
h2#contentdesc {
	font-size: 1.4rem;
	font-weight: normal;
	padding-bottom: 15px;
	color: #ccc;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 25px;
}
h2#contentdesc span {
	color: #ffffff;
}

/************************************************
* 7. 文章列表與文章頁 (.post, .posttop, .postcontent) *
************************************************/
.post {
	background: url(images/blacktrans.png);
	border-radius: 6px;
	padding: 28px 32px 36px;
	margin-bottom: 40px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.posttop {
	margin-bottom: 18px;
}
.posttop .posttitle {
	font-size: 1.85rem;
	line-height: 1.35;
	margin: 0 0 10px 0;
	color: #ffffff;
}
.posttop .posttitle a {
	color: #ffffff;
}
.posttop .posttitle a:hover {
	color: #a8ef9d;
}
.postmetatop {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 0.9375rem;
	color: #bbb;
	align-items: center;
	margin-top: 6px;
}
.postmetatop .date span {
	background: url(images/date.png) no-repeat left center;
	padding-left: 20px;
}
.postmetatop .categs {
	background: url(images/categ.png) no-repeat left center;
	padding-left: 20px;
}
.postmetatop a {
	color: #a8ef9d;
}

/************************************************
* 8. 正文閱讀區域 (18px Desktop / 780px Reading Width) *
************************************************/
.postcontent {
	color: #ffffff;
	font-size: 1.125rem; /* 18px */
	line-height: 1.75;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
/* 正文段落限制於 780px 舒適閱讀寬度，繁中每行約 38~40 字 */
.postcontent > p,
.postcontent > ul,
.postcontent > ol,
.postcontent > blockquote,
.postcontent > dl {
	max-width: 780px;
	margin-top: 0;
	margin-bottom: 1.2em;
}
.postcontent a {
	color: #a8ef9d;
	border-bottom: 1px dashed rgba(168, 239, 157, 0.6);
}
.postcontent a:hover {
	color: #c9f9bf;
	border-bottom-style: solid;
}
.postcontent a img {
	border-bottom: 0;
}
.postcontent strong, .postcontent b {
	font-weight: 700;
	color: #ffffff;
}
.postcontent em, .postcontent i {
	font-style: italic;
	color: #e0e0e0;
}
.postcontent h1,
.postcontent h2,
.postcontent h3,
.postcontent h4,
.postcontent h5,
.postcontent h6 {
	max-width: 780px;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	line-height: 1.4;
	color: #ffffff;
}
.postcontent h2 {
	font-size: 1.5rem;
	border-bottom: 1px solid rgba(168, 239, 157, 0.3);
	padding-bottom: 6px;
}
.postcontent h3 {
	font-size: 1.28rem;
}
.postcontent h4 {
	font-size: 1.15rem;
}
.postcontent ul, .postcontent ol {
	padding-left: 1.8em;
}
.postcontent ul li {
	list-style: disc;
	margin-bottom: 0.4em;
}
.postcontent ol li {
	list-style: decimal;
	margin-bottom: 0.4em;
}
.postcontent blockquote {
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.4);
	border-left: 4px solid #a8ef9d;
	padding: 14px 20px;
	margin: 1.5em 0;
	border-radius: 0 4px 4px 0;
	color: #e0e0e0;
	font-style: italic;
}

/* 項目 1：圖片與多媒體絕對防溢出保護 */
.postcontent img,
.postcontent video,
.postcontent iframe,
.wp-caption,
.wp-caption img {
	max-width: 100% !important;
	height: auto !important;
	box-sizing: border-box;
}
.wp-caption {
	width: auto !important;
	max-width: 100% !important;
	background: url(images/blacktrans.png);
	padding: 6px;
	border-radius: 4px;
	text-align: center;
}
.wp-caption .wp-caption-text {
	font-size: 0.875rem;
	line-height: 1.4;
	color: #ccc;
	padding-top: 6px;
	margin: 0;
}

/************************************************
* 9. 特殊寬內容 (表格、程式碼、多圖對照) *
***********************************************/
.postcontent table,
.postcontent pre,
.postcontent .wide-content,
.postcontent .dt-grid,
.postcontent .dt-table-wrap {
	max-width: 100%;
}
.postcontent table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	font-size: 1rem;
	overflow-x: auto;
	display: table;
}
.postcontent th, .postcontent td {
	padding: 10px 14px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-align: left;
}
.postcontent th {
	background: rgba(255, 255, 255, 0.08);
	font-weight: 600;
	color: #a8ef9d;
}
.postcontent pre {
	max-width: 100%;
	overflow-x: auto;
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.65);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	padding: 1.2em 1.4em;
	margin: 1.4em 0;
	font-size: 0.9375rem;
	line-height: 1.6;
}
.postcontent code {
	font-family: Consolas, Monaco, "Courier New", monospace;
	background: rgba(255, 255, 255, 0.1);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}
.postcontent pre code {
	background: transparent;
	padding: 0;
	font-size: 1em;
}

/************************************************
* 10. 文章底部中繼資料 (.postmetabottom) *
************************************************/
.postmetabottom {
	background: url(images/whitetrans.png);
	background-color: rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	padding: 10px 16px;
	font-size: 0.9375rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 25px;
}
.postmetabottom .tags {
	background: url(images/tags.png) no-repeat left center;
	padding-left: 20px;
}
.postmetabottom .readmore {
	background: url(images/more.png) no-repeat left center;
	padding-left: 20px;
}
.postmetabottom a {
	color: #ffffff;
}
.postmetabottom a:hover {
	color: #a8ef9d;
}

/************************************************
* 10.5 分頁導覽列 (#navigation, .wp-pagenavi) *
* 項目 4：手機翻頁防誤觸與優雅化 *
************************************************/
#navigation {
	margin: 35px 0;
	clear: both;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.9375rem;
}
#navigation a,
#navigation span,
.wp-pagenavi a,
.wp-pagenavi span,
.wp-page-numbers a,
.wp-page-numbers span,
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 6px 14px;
	margin: 2px;
	border-radius: 4px;
	font-size: 0.9375rem;
	color: #ffffff;
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: all 0.15s ease;
	text-decoration: none;
	box-sizing: border-box;
}
#navigation a:hover,
.wp-pagenavi a:hover,
.wp-page-numbers a:hover,
a.page-numbers:hover {
	background-color: rgba(168, 239, 157, 0.25);
	border-color: #a8ef9d;
	color: #a8ef9d;
}
#navigation span.current,
.wp-pagenavi span.current,
.wp-page-numbers span.current,
.page-numbers.current {
	background: #a8ef9d;
	color: #000000;
	font-weight: 700;
	border-color: #a8ef9d;
}


/************************************************
* 10.6 WordPress 核心對齊樣式、文章導覽與相關文章 (.alignleft, .alignright, .post-nav, #jp-relatedposts) *
************************************************/
/* WordPress 核心通用浮動與對齊 */
.alignleft {
	float: left;
	text-align: left;
	margin-right: 1.5em;
	margin-bottom: 1em;
}

.alignright {
	float: right;
	text-align: right;
	margin-left: 1.5em;
	margin-bottom: 1em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* 圖片專用浮動與邊距 */
img.alignleft,
a img.alignleft {
	float: left;
	margin: 0.5em 1.5em 1em 0;
}

img.alignright,
a img.alignright {
	float: right;
	margin: 0.5em 0 1em 1.5em;
}

img.aligncenter,
a img.aligncenter {
	display: block;
	margin: 0.8em auto;
}

/* 社群分享按鈕區塊全寬對齊 */
.sharedaddy,
.sharedaddy .sd-sharing {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Jetpack 相關文章區塊 (#jp-relatedposts) 暗黑科技風格與全寬等高對齊 */
#jp-relatedposts,
.jp-relatedposts {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
	margin: 2.2em 0 1.5em !important;
	padding-top: 1.5em !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
	clear: both !important;
}

#jp-relatedposts .jp-relatedposts-items {
	display: flex !important;
	flex-direction: row !important;
	justify-content: space-between !important;
	gap: 16px !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	background: rgba(0, 0, 0, 0.45) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	border-radius: 6px !important;
	padding: 14px 16px !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	transition: all 0.2s ease !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover {
	background: rgba(0, 0, 0, 0.65) !important;
	border-color: rgba(168, 239, 157, 0.35) !important;
	transform: translateY(-2px) !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title,
#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span.jp-relatedposts-post-title {
	max-width: 100% !important;
	width: 100% !important;
	font-size: 0.95rem !important;
	line-height: 1.45 !important;
	font-weight: 600 !important;
	margin-bottom: 8px !important;
	display: block !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
	color: #e2e8f0 !important;
	text-decoration: none !important;
	border-bottom: none !important;
	transition: color 0.15s ease !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a {
	color: #a8ef9d !important;
	text-decoration: underline !important;
}

#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,
#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context {
	font-size: 0.8125rem !important;
	color: #94a3b8 !important;
	line-height: 1.4 !important;
	margin: 2px 0 0 !important;
	max-width: 100% !important;
	display: block !important;
}

/* 文章底部單篇導覽列（前一篇 / 後一篇）：全寬 Flexbox 左右兩端對齊 */
.postcontent .post-nav,
.postcontent p.post-nav,
.postcontent p:has(.alignleft),
.postcontent p:has(.alignright) {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin: 2.2em 0 1.2em !important;
	padding: 14px 18px !important;
	background: rgba(0, 0, 0, 0.45) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	border-radius: 6px !important;
	gap: 16px !important;
}

.postcontent .post-nav .alignleft,
.postcontent .post-nav .alignright,
.postcontent p:has(.alignleft) .alignleft,
.postcontent p:has(.alignright) .alignright {
	float: none !important;
	margin: 0 !important;
	max-width: 48% !important;
	display: inline-flex !important;
	align-items: center !important;
	font-size: 0.9375rem !important;
	line-height: 1.5 !important;
}

.postcontent .post-nav .alignleft,
.postcontent p:has(.alignleft) .alignleft {
	text-align: left !important;
	margin-right: auto !important;
}

.postcontent .post-nav .alignright,
.postcontent p:has(.alignright) .alignright {
	text-align: right !important;
	margin-left: auto !important;
}

.postcontent .post-nav a,
.postcontent p:has(.alignleft, .alignright) a {
	color: #e2e8f0 !important;
	text-decoration: none !important;
	transition: all 0.15s ease !important;
}

.postcontent .post-nav a:hover,
.postcontent p:has(.alignleft, .alignright) a:hover {
	color: #a8ef9d !important;
	text-decoration: underline !important;
}

/* 行動端 RWD：螢幕寬度小於 640px 時上下堆疊 */
@media (max-width: 640px) {
	#jp-relatedposts .jp-relatedposts-items {
		flex-direction: column !important;
		gap: 12px !important;
	}

	#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
		width: 100% !important;
	}

	.postcontent .post-nav,
	.postcontent p.post-nav,
	.postcontent p:has(.alignleft),
	.postcontent p:has(.alignright) {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px !important;
		padding: 12px 14px !important;
	}

	.postcontent .post-nav .alignleft,
	.postcontent .post-nav .alignright,
	.postcontent p:has(.alignleft) .alignleft,
	.postcontent p:has(.alignright) .alignright {
		max-width: 100% !important;
		display: block !important;
	}

	.postcontent .post-nav .alignright,
	.postcontent p:has(.alignright) .alignright {
		text-align: right !important;
	}
}

/************************************************
* 10. 文章內容通用排版元件 (並排對照圖、圖說卡片、提示框、表格) *
************************************************/
/* 雙欄自適應並排對照圖 */
.postcontent .image-grid,
.postcontent .dt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin: 24px 0;
	max-width: 100%;
}
.postcontent .image-grid .figure-box,
.postcontent .dt-grid .dt-figure {
	margin: 0;
}

/* 圖說卡片與標籤 */
.postcontent .figure-box,
.postcontent .dt-figure {
	margin: 22px 0;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	overflow: hidden;
	max-width: 100%;
}
.postcontent .figure-box img,
.postcontent .dt-figure img {
	width: 100% !important;
	height: auto !important;
	display: block;
	margin: 0 !important;
}
.postcontent .figure-caption,
.postcontent .dt-caption {
	padding: 9px 15px;
	font-size: 0.84375rem; /* 13.5px */
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.72);
	background: rgba(0, 0, 0, 0.45);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
.postcontent .caption-tag,
.postcontent .dt-tag {
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 0.75rem; /* 12px */
	background: rgba(56, 189, 248, 0.15);
	color: #38bdf8;
	border: 1px solid rgba(56, 189, 248, 0.3);
	padding: 2px 8px;
	border-radius: 4px;
	white-space: nowrap;
}

/* 呼應提示框 (Callouts) */
.postcontent .callout,
.postcontent .dt-callout {
	border-radius: 6px;
	padding: 14px 18px;
	margin: 22px 0;
	border-left: 4px solid #58a6ff;
	background: rgba(0, 0, 0, 0.35);
	max-width: 100%;
}
.postcontent .callout-header,
.postcontent .dt-callout-header {
	font-weight: 700;
	font-size: 0.9375rem; /* 15px */
	margin-bottom: 6px;
	color: #58a6ff;
}
.postcontent .callout-warn,
.postcontent .dt-callout-warn {
	border-left-color: #d29922;
	background: rgba(210, 153, 34, 0.08);
}
.postcontent .callout-warn .callout-header,
.postcontent .dt-callout-warn .dt-callout-header {
	color: #d29922;
}
.postcontent .callout-info,
.postcontent .dt-callout-info {
	border-left-color: #38bdf8;
	background: rgba(56, 189, 248, 0.08);
}
.postcontent .callout-info .callout-header,
.postcontent .dt-callout-info .dt-callout-header {
	color: #38bdf8;
}

/* 自適應表格捲動與狀態標記 */
.postcontent .table-wrapper,
.postcontent .dt-table-wrap {
	overflow-x: auto;
	margin: 22px 0;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}
.postcontent .status-pass,
.postcontent .dt-pass {
	color: #3fb950 !important;
	font-weight: 700;
}
.postcontent .status-fail,
.postcontent .dt-fail {
	color: #f85149 !important;
	font-weight: 700;
}

/* 終端機風格代碼框 */
.postcontent .code-container {
	margin: 22px 0;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	overflow: hidden;
	background: #080b11;
	max-width: 100%;
}
.postcontent .code-container pre {
	margin: 0 !important;
	border: none !important;
	border-radius: 0 !important;
}
.postcontent .code-header {
	background: rgba(255, 255, 255, 0.06);
	padding: 8px 14px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.postcontent .terminal-dots {
	display: flex;
	gap: 5px;
}
.postcontent .dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
}
.postcontent .dot-red { background: #f85149; }
.postcontent .dot-yellow { background: #d29922; }
.postcontent .dot-green { background: #3fb950; }

* 11. 側邊欄小工具 (#sidebar) *
************************************************/

#sidebar .widget, #sidebar .boxed {
    background: url("images/blacktrans.png") rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 20px;
}

#sidebar ul li.boxed {
	background: url(images/blacktrans.png);
	border-radius: 4px;
	padding: 10px 14px;
	margin-bottom: 15px;
	font-size: 15px;
	line-height: 1.45;
}
#sidebar h3 {
	background: transparent;
	padding: 0 0 6px 0;
	line-height: 1.3em;
	font-weight: normal;
	font-size: 1.25rem;
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(168, 239, 157, 0.3);
	color: #ffffff;
}
#sidebar ul ul li a {
	display: block;
	padding: 3px ;
	color: #ddd;
	transition: all 0.15s ease;
}
#sidebar ul ul li a:hover, #sidebar p a:hover {
	color: #a8ef9d;
	padding-left: 4px;
}
#sidebar ul ul ul li {
	background: url(images/bullet.png) left 8px no-repeat;
	padding-left: 14px;
	margin-left: 8px;
}
#sidebar p {
	color: #eee;
	margin: 0;
	padding: 0  6px 0;
	font-size: 15px;
	line-height: 1.45;
}
/* 針對「曾經」等文字小工具（#text-10, .widget_text, .textwidget），字級 14px、行高 1.45 */
#sidebar #text-10,
#sidebar .widget_text,
#sidebar .textwidget {
	font-size: 15px !important;
	line-height: 1.45 !important;
}
#sidebar #text-10 p,
#sidebar .widget_text p,
#sidebar .textwidget p {
	font-size: 15px !important;
	line-height: 1.45 !important;
	margin: 6px 3px 6px 3px !important;
	padding: 0 !important;
	color: #eee !important;
}
#sidebar #text-10 hr,
#sidebar .widget_text hr,
#sidebar .textwidget hr {
	border: 0 !important;
	height: 1.5px !important;
	background: rgba(255, 255, 255, 0.12) !important;
	margin: 5px 0 !important;
}
#sidebar #tagbox a {
	display: inline-block !important;
	padding: 2px 6px;
	margin: 2px 2px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 3px;
	color: #cfd8dc;
	font-size: 15px !important;
}
#sidebar #tagbox a:hover {
	background: rgba(168, 239, 157, 0.2);
	color: #a8ef9d;
}

/* ===================================================
   側邊欄小工具卡片間距 (UI/UX 最佳化：24px 呼吸感間距)
   =================================================== */

/* 1. 桌面版標準間距：24px */
#sidebar > ul > li.widget,
#sidebar ul li.boxed,
#sidebar .widget {
    margin-bottom: 24px !important;
}

/* 2. 最後一個小工具歸零，避免推擠頁尾對齊線 */
#sidebar > ul > li:last-child,
#sidebar ul li.boxed:last-child {
    margin-bottom: 0 !important;
}

/* 3. 平板與手機響應式調整（維持 20px 舒適間距） */
@media screen and (max-width: 1024px) {
    #sidebar > ul {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    #sidebar > ul > li.widget,
    #sidebar ul li.boxed {
        margin-bottom: 0 !important; /* 由 ul 的 flex gap 統一控制 */
    }
}



/************************************************
* 12. 留言區塊 (#comments) *
************************************************/
#comments {
	margin-top: 40px;
	max-width: 780px;
}
#comments h3 {
	font-size: 1.35rem;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 8px;
}
ul.commentlist {
	margin-bottom: 30px;
}
ul.commentlist li {
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 16px;
}
ul.commentlist li .comment-wrap {
	display: flex;
	gap: 14px;
}
ul.commentlist li img.avatar {
	border-radius: 4px;
	flex-shrink: 0;
}
ul.commentlist li .commentbody {
	flex: 1;
}
ul.commentlist li .author {
	font-weight: 600;
	font-size: 1.05rem;
}
ul.commentlist li .commentmetadata {
	font-size: 0.8125rem;
	color: #999;
	margin-bottom: 8px;
}
#respond {
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	padding: 20px;
	margin-top: 25px;
}
#respond h3 {
	font-size: 1.3rem;
	margin-bottom: 14px;
}
#respond input[type="text"],
#respond textarea {
	width: 100%;
	max-width: 100%;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	padding: 10px 12px;
	color: #fff;
	font-size: 1rem;
	margin-bottom: 12px;
	box-sizing: border-box;
}
#respond input[type="text"]:focus,
#respond textarea:focus {
	border-color: #a8ef9d;
	background: rgba(0, 0, 0, 0.85);
}
#respond #submit {
	background: rgba(168, 239, 157, 0.2);
	border: 1px solid #a8ef9d;
	color: #a8ef9d;
	padding: 8px 20px;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.15s ease;
}
#respond #submit:hover {
	background: #a8ef9d;
	color: #000;
}

/************************************************
* 13. 頁尾區塊 (#footer, #credits) *
***********************************************/
#footer {
	background: url(images/blacktrans.png);
	background-color: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	padding: 24px 20px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin-top: 35px;
	font-size: 0.9375rem;
}
#footer h3 {
	font-size: 1.15rem;
	margin-bottom: 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(168, 239, 157, 0.3);
}
#footer ul li a {
	display: block;
	padding: 4px 0;
	color: #ccc;
}
#footer ul li a:hover {
	color: #a8ef9d;
}
#credits {
	margin-top: 20px;
	text-align: center;
	font-size: 0.875rem;
	color: #888;
}
#credits a {
	color: #aaa;
}
#credits a:hover {
	color: #a8ef9d;
}

/************************************************
* 14. 響應式 RWD 媒體查詢 (Responsive Breakpoints) *
***********************************************/
/* 平板與較窄桌機 (< 1024px) */
@media screen and (max-width: 1024px) {
	#main {
		flex-direction: column;
		gap: 30px;
	}
	#content {
		width: 100%;
		flex: none;
		min-width: 0;
		overflow: visible;
	}
	#sidebar {
		width: 100%;
		flex: none;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		gap: 20px;
	}
	#sidebar ul li.boxed {
		margin-bottom: 0;
	}
}

/* 手機視窗 (< 768px) */
@media screen and (max-width: 768px) {
	.post {
		padding: 18px 16px 24px;
		margin-bottom: 24px;
	}

	#wrapper {
		width: 94%;
		margin: 10px auto;
	}
	/* 項目 2：手機版頂部工具列與搜尋框彈性化 */
	#top {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	#top ul.top_menu {
		justify-content: center;
		gap: 12px;
	}
	#top #search {
		width: 100%;
	}
	#top #searchform {
		width: 100%;
		display: flex;
		gap: 8px;
	}
	#top #searchbox {
		flex: 1 1 auto;
		width: 100%;
		box-sizing: border-box;
		font-size: 1rem;
		padding: 8px 12px;
	}
	#top .submitbutton {
		flex: 0 0 auto;
		padding: 8px 16px;
		font-size: 0.9375rem;
	}

	#header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	#header #headerbanner {
		width: 100%;
		flex: 1 1 100%;
	}
	#primary-nav-toggle {
		display: block;
		width: 100%;
		background: url(images/blacktrans.png);
		background-color: rgba(0, 0, 0, 0.6);
		border: 1px solid rgba(168, 239, 157, 0.5);
		color: #a8ef9d;
		padding: 12px;
		font-size: 1.05rem;
		text-align: center;
		border-radius: 4px;
		cursor: pointer;
		margin-bottom: 8px;
	}
	.primary_menu {
		display: none;
		flex-direction: column;
	}
	.primary_menu.is-open {
		display: flex;
	}
	.primary_menu li a {
		padding: 10px 14px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	}
	/* 手機正文字級調整為 1.03125rem (16.5px)，行高維持 1.72 舒適閱讀 */
	.postcontent {
		font-size: 1.03125rem; /* 16.5px */
		line-height: 1.72;
	}
	.posttop .posttitle {
		font-size: 1.5rem;
	}
	#footer {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	#sidebar {
		grid-template-columns: 1fr;
	}
}
