body {
	font-family: "微軟正黑體", sans-serif;
	/* font-family: Noto Sans TC,"微軟正黑體",sans-serif; */
	/*g-font-size:16*/
	font-size: 1.14286rem;
	color: #333333;
	background-image: url("../images/page-bg.png");
}

a {
	color: rgb(51, 51, 51);
	text-decoration: none;
}

html {
	font-size: 16px !important;
	/* base */
}

ul ul,
ol ul {
	list-style-type: none;
}

.g-min-width-60 {
	min-width: 60px !important;
}

.g-bg-lightred {
	background-color: #cd0000 !important;
}

.g-bg-lightred--hover:hover {
	background-color: #cd0000 !important;
}

.g-bg-gray-2 {
	background-color: #CD0000;
}

.g-bg-line {
	background-color: #00B900;
}

.g-bg-blue-2 {
	background-color: #00389A;
}

.g-bg-blue-2--hover:hover {
	background-color: #316DD6;
}

.g-bg-blue-3 {
	background-color: #316DD6;
}

.g-bg-gray-2 {
	background-color: #989898;
}

.g-bg-gray-3 {
	background-color: #404040;
}

.g-bg-gray-3--hover:hover {
	background-color: #2d2d2d;
}

.only-one-line {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.only-two-line {
	overflow: hidden;
	word-wrap: break-word;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.only-three-line {
	overflow: hidden;
	word-wrap: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.text-shadow {
	text-shadow: 2px 2px 3px #434a54;
}

.box-shadow {
	box-shadow: 0 2px 10px 2px rgba(0, 0, 0, 0.25);
}

a:hover {
	text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
input:focus-visible,
button:focus-visible,
.input-btn:focus-visible,
.scroll-item:focus-visible {
	outline: 4px dashed rgb(212, 35, 0) !important;
	outline-offset: 3px !important;
}

/* 確保顏色對比符合 AA */
.btn-primary {
	color: #ffffff;
	/* 白字 */
	background-color: #0d6efd;
	/* 藍色 */
}

.btn-warning {
	color: #000000;
	/* 黑字 */
	background-color: #ffc107;
	/* 黃色 */
}

.btn-success {
	color: #ffffff;
	/* 白字 */
	background-color: #198754;
	/* 綠色 */
}

/* 適度放大文字 */
.input-btn span {
	display: block;
	padding: 2rem 1rem;
}


.voice-btn {
	/* border-radius: 50%; */
	/* width: 2.5rem; */
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.voice-btn.active {
	background-color: #dc3545 !important;
	color: #fff;
}

.scroll-picker {
	max-height: 150px;
	overflow-y: auto;
	border: 1px solid #dee2e6;
	border-radius: 10px;
	padding: 0.5rem;
	scroll-behavior: smooth;
	text-align: center;
}

.scroll-item {
	padding: 0.5rem;
	cursor: pointer;
	border-radius: 6px;
}


.scroll-item.active {
	background: #212529;
	color: white;
}


.btn-option {
	min-width: 80px;
	flex: 1 1 auto;
}

.btn {
	border: 1px solid #dee2e6;
	font-size: 1rem;
}

.btn-option[aria-pressed="true"] {
	background-color: #212529;
	color: #fff;
	border-color: #212529;
}

.btn-option:focus {
	outline: 3px solid #ff8800;
	outline-offset: 2px;
}

.ziwei-grid {
	width: 100%;
	border-collapse: collapse;
	max-width: 100%;
	table-layout: auto;
	word-break: break-word;
}

.palace-cell,
.info-cell {
	border: 1px solid #95531c;
	vertical-align: top;
	padding: 5px;
	position: relative;
}

td:focus-visible,
.palace-cell:focus-visible,
.palace-cell:hover,
.palace-cell:focus,
.info-cell:focus-visible,
.info-cell:hover,
.info-cell:focus {
	outline: 4px dashed rgb(212, 35, 0) !important;
	outline-offset: 3px !important;
	background-color: #ffe741;
	cursor: pointer;
}


.cell-content {
	width: 100%;
	height: 100%;
	text-align: left;
}

.stars {
	display: flex;
}

.stars span {
	margin-right: 0.5rem;
}

.two-col {
	float: right !important;
	display: grid;
	grid-template-columns: auto auto;
	/* 左欄寬度依最寬內容，右欄吃剩餘空間 */
	gap: 0.5rem 1rem;
	/* 行距、欄距 */
	width: fit-content;
	/* 不撐滿，依內容寬度 */
	margin-top: 2rem;
	align-items: center;
	justify-items: center
}

.palace-name {
	padding: 0.5rem 1.2rem;
	background: #95531c;
	position: relative;
	top: -2px;
	border-radius: 6px;
	color: #fff;
	white-space: nowrap;
	font-weight: bold;
}

.visually-hidden {
	position: absolute;
	left: -9999px;
}

/* 只隱藏給螢幕閱讀器專用的提示，不要全域隱藏 aria-live */
.sr-only,
.sr-live {
	position: absolute !important;
	left: -9999px !important;
	height: 1px !important;
	overflow: hidden !important;
	width: 1px !important;
	white-space: nowrap;
}


@media (max-width: 920px) {
	.btn-group .btn {
		flex: 1 1 45%;
	}

	.btn {
		border-radius: 0;
	}

	.scroll-picker {
		max-height: 120px;
	}

	.palace-cell,
	.info-cell {
		font-size: 0.7rem;
		padding: 3px;
		height: auto;
	}

	.stars span {
		display: block;
		margin-right: 0;
	}

	.palace-name {
		padding: 0.5rem;
	}

	.ziwei-grid {
		/* transform: scale(0.9); */
		/* 視需要調整 0.7~0.9 */
		transform-origin: top center;
		width: 100%;
	}

	.two-col {
		gap: 0;
	}

	.container,
	.container-md,
	.container-sm {
		max-width: 100%;
	}
}

@media (min-width: 768px) {
	.d-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}