/* ==========================================================================
   Base — reset、排版、通用工具类
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg-body);
	color: var(--text-2);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.has-player {
	padding-bottom: var(--player-h);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--text-1);
	font-weight: 600;
	line-height: 1.35;
}

p {
	margin: 0 0 1em;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--dur) var(--ease);
}

a:hover {
	color: var(--brand-ink);
}

img,
svg,
video {
	max-width: 100%;
	display: block;
}

img {
	height: auto;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

input,
textarea,
select {
	font: inherit;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

figure {
	margin: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 24px 0;
}

::selection {
	background: var(--brand);
	color: var(--brand-contrast);
}

/* 滚动条 */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-thumb {
	background: var(--line-3);
	border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-5);
}

::-webkit-scrollbar-track {
	background: transparent;
}

/* 焦点可见性 */
:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
	border-radius: var(--r-xs);
}

/* 屏幕阅读器专用 */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- 工具类 ---------- */

.u-ellipsis-1,
.u-ellipsis-2,
.u-ellipsis-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.u-ellipsis-1 {
	-webkit-line-clamp: 1;
	line-clamp: 1;
}

.u-ellipsis-2 {
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.u-ellipsis-3 {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.u-flex {
	display: flex;
	align-items: center;
}

.u-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.u-muted {
	color: var(--text-4);
}

.u-brand {
	color: var(--brand-ink);
}

.u-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--text-5);
	flex: none;
}

.u-icon {
	width: 18px;
	height: 18px;
	flex: none;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.u-hidden {
	display: none !important;
}
