/**
 * OneMall docs pages - shared header & footer (same as buy-from-japan)
 * body 强制全宽，覆盖文档内联的 body{max-width:21cm}，让 header 贴左
 */
html, body {
	margin: 0 !important;
	padding: 0 1em !important;
	overflow-x: hidden;
	width: 100%;
	max-width: none !important;
	box-sizing: border-box;
}
a {
	text-decoration: none;
	color: inherit;
}
/* 仅 main 限制宽度并居中，header/footer 全宽 */
main.docs-content {
	max-width: 21cm;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	overflow-x: hidden;
}
/* Header 与页面主体等宽：与 main.docs-content 一致 21cm 居中 */
header.content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	box-sizing: border-box;
}
.navbar {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	min-height: 100px;
	height: auto;
	margin: 0 auto !important;
	max-width: 21cm;
	width: 100%;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
	gap: 1rem;
}
.navbar > a:first-child {
	flex-shrink: 0;
	margin-right: auto;
	margin-left: 0;
	display: flex;
	align-items: center;
}
.navbar-text {
	font-size: 16px !important;
	color: #191919 !important;
	white-space: normal !important;
	flex-shrink: 0 !important;
	margin-left: auto !important;
	text-align: right !important;
	min-width: 0;
}
/* 覆盖浏览器默认链接下划线，nav 内链接默认无下划线、悬停显示下划线 */
nav.navbar .navbar-text a,
nav.navbar .navbar-text a:link,
nav.navbar .navbar-text a:visited {
	color: #191919 !important;
	text-decoration: none !important;
}
nav.navbar .navbar-text a:hover {
	text-decoration: underline !important;
}
.logo {
	height: 56px;
	width: auto;
	min-width: 120px;
	max-width: 280px;
	display: block;
	object-fit: contain;
	object-position: left center;
}
/* Footer */
.footer-box {
	width: 100%;
	background: #f7f7f9;
	padding-top: 52px;
}
.footer-content {
	max-width: 1440px;
	margin: 0 auto;
	display: flex;
	padding: 40px 2rem 0;
	box-sizing: border-box;
	justify-content: space-between;
	flex-wrap: wrap;
}
.footer-item {
	flex: 1;
	min-width: 200px;
}
.footer-item a {
	width: auto;
}
.item-title {
	font-size: 14px;
	font-weight: 500;
}
.item-content {
	font-size: 14px;
	color: #6e6e6e;
	margin-top: 10px;
}
.download-icons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px;
}
.download-icon {
	width: 130px;
	height: 42px;
	object-fit: contain;
}
.discord-icon {
	width: 22px;
	height: 17px;
	object-fit: contain;
}
.copy-right {
	background: #f7f7f9;
	color: #6e6e6e;
	font-size: 14px;
	text-align: center;
	padding: 1rem 2rem;
	line-height: 22px;
}
.contact-icons {
	display: flex;
	gap: 12px;
}
/* Docs main content */
.docs-content {
	padding: 2rem 1rem 3rem;
	box-sizing: border-box;
	color: #333;
	font-family: "Times New Roman", "Microsoft JhengHei", "PingFang SC", sans-serif;
	font-size: 11pt;
	line-height: 1.5;
}
/* MD 正文样式（与后台 editor 预览保持一致） */
.docs-content .md-body h1,
.docs-content .md-body h2,
.docs-content .md-body h3,
.docs-content .md-body h4 {
	color: #0f1115;
	font-weight: 600;
	margin: 1.25em 0 0.5em;
	line-height: 1.35;
}
.docs-content .md-body h1 { font-size: 1.5em; margin-top: 0; text-align: center !important; }
.docs-content .md-body h2 { font-size: 18px; }
.docs-content .md-body h3,
.docs-content .md-body h4 { font-size: 12px; }
.docs-content .md-body p {
	margin: 0 0 0.75em;
	line-height: 1.5;
}
/* 列表缩进：与编辑预览模式一致 */
.docs-content .md-body ul,
.docs-content .md-body ol {
	margin: 0.5em 0 0.75em 0 !important;
	padding-left: 1.25em !important;
}
.docs-content .md-body li {
	margin: 0.25em 0;
	line-height: 1.5;
}
.docs-content .md-body ul { list-style-type: disc; }
.docs-content .md-body ol { list-style-type: decimal; }
.docs-content .md-body ul ul,
.docs-content .md-body ul ol,
.docs-content .md-body ol ul,
.docs-content .md-body ol ol {
	margin: 0.25em 0 0.5em 0 !important;
	padding-left: 1.25em !important;
}
.docs-content .md-body strong { font-weight: 600; color: #000; }
.docs-content .md-body a { color: #0066cc; text-decoration: none; }
.docs-content .md-body a:hover { text-decoration: underline; }
.docs-content .md-body blockquote {
	margin: 0.75em 0;
	padding: 0.5em 0 0.5em 1em;
	border-left: 3px solid #c5c5c5;
	color: #555;
}
.docs-content .md-body code {
	font-size: 11px;
	background: #f5f5f5;
	padding: 2px 5px;
	border-radius: 2px;
}
.docs-content .md-body pre {
	margin: 0.5em 0;
	padding: 8px;
	background: #f5f5f5;
	border-radius: 4px;
	overflow-x: auto;
	font-size: 11px;
	line-height: 1.35;
}
.docs-content .md-body pre code { background: none; padding: 0; }
.docs-content .md-body hr { border: none; border-top: 1px solid #e0e0e0; margin: 1.5em 0; }
.docs-content .md-body table {
	border-collapse: collapse;
	width: 100%;
	max-width: 100%;
	table-layout: fixed;
	box-sizing: border-box;
	outline: 1px solid #c5c5c5;
}
.docs-content .md-body table td,
.docs-content .md-body table th {
	border: 1px dashed #c5c5c5;
	padding: 0.35em 0.6em;
	vertical-align: top;
	word-wrap: break-word;
	overflow-wrap: break-word;
	box-sizing: border-box;
}
.docs-content .md-body table th,
.docs-content .md-body table thead tr th,
.docs-content .md-body table:not(:has(thead)) tbody tr:first-child th,
.docs-content .md-body table:not(:has(thead)) tbody tr:first-child td {
	background: #e5e5e5 !important;
	font-weight: 600;
}
/* 正文内图片、表格：不溢出，覆盖 HTML width/height 属性，图片随容器缩放 */
.docs-content img,
.docs-content img[width],
.docs-content img[height] {
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	display: block;
}
/* 表格全局样式：不超出页面宽度，单元格可换行；去掉内联样式后由此处统一控制 */
.docs-content table,
.docs-content table.MsoTableGrid,
.docs-content table.MsoNormalTable {
	max-width: 100% !important;
	width: 100% !important;
	table-layout: fixed !important;
	border-collapse: collapse;
	box-sizing: border-box;
	outline: 1px solid #c5c5c5;
}
.docs-content table td,
.docs-content table th,
.docs-content table.MsoTableGrid td,
.docs-content table.MsoTableGrid th,
.docs-content table.MsoNormalTable td,
.docs-content table.MsoNormalTable th {
	border: 1px dotted #c5c5c5 !important;
	padding: 0.35em 0.6em !important;
	vertical-align: top;
}
.docs-content table th,
.docs-content table thead tr th,
.docs-content table:not(:has(thead)) tbody tr:first-child th,
.docs-content table:not(:has(thead)) tbody tr:first-child td {
	background: #e5e5e5 !important;
	font-weight: 600;
}
/* 覆盖 td/th 内联 width，避免固定 pt 撑破容器；单元格内自动换行 */
.docs-content table td,
.docs-content table th,
.docs-content table.MsoTableGrid td,
.docs-content table.MsoTableGrid th,
.docs-content table.MsoNormalTable td,
.docs-content table.MsoNormalTable th {
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
	white-space: normal !important;
	box-sizing: border-box;
}
@media screen and (max-width: 768px) {
	main.docs-content,
	.docs-content {
		min-width: 0;
		max-width: 100%;
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}
	.docs-content img {
		max-width: 100% !important;
		width: auto !important;
	}
	.navbar {
		height: 60px;
		margin: 0;
		padding: 0 15px;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}
	.navbar > a {
		max-width: 160px;
		min-height: 36px;
	}
	.navbar-text {
		font-size: 12px !important;
		white-space: normal !important;
		margin-left: 8px !important;
	}
	.logo {
		height: 36px;
		min-width: 80px;
		max-width: 140px;
	}
	.footer-box {
		padding-top: 40px;
	}
	.footer-content {
		padding: 40px 20px 20px;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 16px;
	}
	.footer-item {
		min-width: 0;
	}
	.footer-item:nth-last-child(1) {
		grid-column: 1 / -1;
	}
	.item-title {
		font-size: 16px;
		font-weight: 600;
		color: #191919;
		margin-bottom: 16px;
	}
}
@media screen and (max-width: 480px) {
	.navbar {
		margin: 0 15px;
	}
}

/* 公网 doc 页 h1 居中：放文件末尾、用 id 提高优先级，覆盖内联或其它样式 */
main.docs-content #md-body h1,
#md-body h1 {
	text-align: center !important;
}
/* 公网 doc 页列表缩进：与编辑预览模式一致 */
#md-body ul,
#md-body ol {
	margin: 0.5em 0 0.75em 0 !important;
	padding-left: 1.25em !important;
}
#md-body ul ul,
#md-body ul ol,
#md-body ol ul,
#md-body ol ol {
	margin: 0.25em 0 0.5em 0 !important;
	padding-left: 1.25em !important;
}
/* 公网 doc 页表格表头颜色略深（1）thead 或任意 th */
#md-body table th,
#md-body table thead tr th {
	background: #e5e5e5 !important;
	font-weight: 600;
}
/* 公网 doc 页表格表头颜色略深（2）无 thead 时 tbody 首行；:has() 不支持的浏览器会忽略本块 */
#md-body table:not(:has(thead)) tbody tr:first-child th,
#md-body table:not(:has(thead)) tbody tr:first-child td {
	background: #e5e5e5 !important;
	font-weight: 600;
}
