/* 1) 通用 box-sizing */
*,
*::before,
*::after {
	box-sizing: border-box;
}

*::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

*::-webkit-scrollbar-track {
	background: #eee;
}

*::-webkit-scrollbar-thumb:hover {
	filter: brightness(1.2);
}

*::-webkit-scrollbar-thumb {
	border-radius: 5px;
	background: linear-gradient(to bottom,
			#532275 0%,
			#b63784 100%) !important;
}

*::-webkit-scrollbar-thumb:vertical {
	background: linear-gradient(to bottom,
			#532275 0%,
			#b63784 100%) !important;
}

*::-webkit-scrollbar-thumb:horizontal {
	background: linear-gradient(to right,
			#532275 0%,
			#b63784 100%) !important;
}

html, body, *:not(input):not(textarea) {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

img {
	-webkit-user-drag: none;
}

/* 2) 清除全局 margin / padding，並給出合理行高 */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
figure,
dl,
dd,
ol,
ul,
menu {
	margin: 0;
	padding: 0;
}

html,
body {
	line-height: 1.5;
	/* 可被主樣式覆蓋 */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* 3) 預設字體大小（使用者可在 main css 覆蓋） */
html {
	font-size: 100%;
	/* 16px 為常見基準 */
	-webkit-text-size-adjust: 100%;
	/* 防止 iOS 自動縮放字體 */
}

/* 4) 圖片 / 視頻 / svg 等媒體元素預設 */
img,
picture,
video,
canvas,
svg {
	display: block;
	/* 避免底部多餘 whitespace */
	max-width: 100%;
	height: auto;
}

/* 5) 連結 */
a {
	color: inherit;
	text-decoration: none;
	background-color: transparent;
}

a:active,
a:hover {
	outline: 0;
}

/* 6) 清單 */
ol,
ul,
menu {
	list-style: none;
}

/* 7) 表格基礎重置 */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* 8) 表單元素 inherit 字體與行高，去掉預設外觀 */
input,
button,
textarea,
select {
	font: inherit;
	line-height: inherit;
	color: inherit;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	outline: none;
	/* 注意：為了可及性，使用 focus-visible 來控制 focus 樣式 */
}

/* 9) button / select / input 預設樣式統一（移除各瀏覽器特有外觀） */
button {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	background: none;
	border: 0;
}

/* 10) 去除 number input 的 spinner（Chrome/Edge/FF） */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

/* 11) placeholder 風格一致性 */
::placeholder {
	opacity: 1;
	/* 各瀏覽器預設不同，統一為 1，由主樣式控制顏色/透明度 */
}

/* 12) 禁止表單自動完成功能的顏色高亮（部分瀏覽器） */
:-webkit-autofill {
	-webkit-text-fill-color: inherit !important;
	-webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
	box-shadow: 0 0 0px 1000px transparent inset !important;
}

/* 13) 可及性：只顯示 keyboard focus（靠 :focus-visible） */
:focus {
	outline: none;
}

:focus-visible {
	outline: 3px solid Highlight;
	/* 可被主樣式覆蓋為設計色 */
	outline-offset: 2px;
}

/* 14) 禁用圖片與可互動元素的拖曳預設行為 */
img,
a,
button {
	-webkit-user-drag: none;
	user-select: text;
	/* 預設允許文字選取，元素可另設 user-select: none */
}

/* 15) small reset for lists inside buttons/inputs */
button,
input[type="button"],
input[type="submit"] {
	-webkit-appearance: none;
	appearance: none;
}

/* 16) 輔助類：常用的隱藏但又保留無障礙可訪問的方法 */
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* 17) 保留 scroll-behavior: smooth 的選項，但不強制（開發者自行決定） */
html {
	scroll-behavior: smooth;
}