/* ==========================================================================
   自由播放器 · 设计系统
   深色底、卡片层次、单一品牌蓝。字体走系统无衬线，数字用等宽。
   ========================================================================== */

@font-face {
	font-family: 'Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/plexmono-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Plex Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/plexmono-500.woff2') format('woff2');
}

@font-face {
	font-family: 'Plex Mono';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/plexmono-600.woff2') format('woff2');
}

:root {
	color-scheme: dark;

	--bg: #08090a;
	--bg-2: #0d0e11;
	--card: #121316;
	--line: rgba(255, 255, 255, 0.07);
	--line-2: rgba(255, 255, 255, 0.14);
	--line-3: rgba(255, 255, 255, 0.22);

	--text: #f3f4f6;
	--text-2: #aab0ba;
	--text-3: #7d838e;

	--brand: #4c8dff;
	--brand-2: #3a76e0;
	--brand-soft: rgba(76, 141, 255, 0.12);
	--brand-hover: #5f9bff;
	--brand-text: #a8c6ff;
	--on-brand: #ffffff;

	/* 面板与描边：原本散落各处的 rgba(255,255,255,x)，抽出来才能换主题 */
	--panel-min: rgba(255, 255, 255, 0.025);
	--panel: rgba(255, 255, 255, 0.04);
	--panel-2: rgba(255, 255, 255, 0.06);
	--panel-3: rgba(255, 255, 255, 0.1);
	--grid-dot: rgba(255, 255, 255, 0.055);
	--nav-bg: rgba(8, 9, 10, 0.72);
	--nav-bg-strong: rgba(8, 9, 10, 0.82);

	--brand-ring: rgba(76, 141, 255, 0.9);
	--brand-ring-hover: rgba(76, 141, 255, 1);
	--brand-line: rgba(76, 141, 255, 0.24);
	--brand-line-2: rgba(76, 141, 255, 0.38);
	--brand-glow: rgba(76, 141, 255, 0.22);
	--brand-glow-2: rgba(76, 141, 255, 0.08);
	--brand-select: rgba(76, 141, 255, 0.3);

	--frame-1: #16181c;
	--frame-2: #0c0d10;
	--stage-1: #14161a;
	--stage-2: #0a0b0d;

	--mock-bg: #0b0c0e;
	--mock-a: #1b2233;
	--mock-b: #16233c;
	--mock-c: #0d1017;

	--ok: #3ecf8e;
	--warn: #f5a623;
	--err: #ff6b6b;

	--sans: -apple-system, BlinkMacSystemFont, 'SF Pro SC', 'PingFang SC',
		'Segoe UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
	--mono: 'Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

	--radius: 14px;
	--radius-sm: 10px;
	--container: 1180px;
	--nav-h: 62px;
}

/* 浅色主题：底色换成暖白，品牌蓝压深以保证白字对比度，
   所有「白色叠加」都要反转成「黑色叠加」，否则面板会变成一片死白。 */
[data-theme="light"] {
	color-scheme: light;

	--bg: #f6f6f3;
	--bg-2: #ecece8;
	--card: #ffffff;
	--line: rgba(16, 18, 22, 0.1);
	--line-2: rgba(16, 18, 22, 0.17);
	--line-3: rgba(16, 18, 22, 0.26);

	--text: #15171b;
	--text-2: #4b515b;
	--text-3: #747a84;

	--brand: #1f66e0;
	--brand-2: #1857c4;
	--brand-soft: rgba(31, 102, 224, 0.1);
	--brand-hover: #1656c6;
	--brand-text: #1a56c4;
	--on-brand: #ffffff;

	--panel-min: rgba(16, 18, 22, 0.018);
	--panel: rgba(16, 18, 22, 0.035);
	--panel-2: rgba(16, 18, 22, 0.05);
	--panel-3: rgba(16, 18, 22, 0.08);
	--grid-dot: rgba(16, 18, 22, 0.07);
	--nav-bg: rgba(246, 246, 243, 0.8);
	--nav-bg-strong: rgba(246, 246, 243, 0.88);

	--brand-ring: rgba(31, 102, 224, 0.26);
	--brand-ring-hover: rgba(31, 102, 224, 0.36);
	--brand-line: rgba(31, 102, 224, 0.2);
	--brand-line-2: rgba(31, 102, 224, 0.34);
	--brand-glow: rgba(31, 102, 224, 0.1);
	--brand-glow-2: rgba(31, 102, 224, 0.03);
	--brand-select: rgba(31, 102, 224, 0.16);

	--frame-1: #ffffff;
	--frame-2: #eeeeea;
	--stage-1: #f3f3f0;
	--stage-2: #e6e6e1;

	--mock-bg: #f1f1ed;
	--mock-a: #e3e8f1;
	--mock-b: #d9e5fa;
	--mock-c: #edeff3;

	--ok: #0f7a51;
	--warn: #8a5a06;
	--err: #bd2f2a;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;

	/* 不要在深色底上开 antialiased：它会让笔画变细，中文小字直接发虚。
	   也去掉 text-rendering: optimizeLegibility，它在 Chrome 上对中文只剩副作用。
	   font-synthesis: none 阻止浏览器给没有对应字重的系统字体人工加粗，合成粗体是糊的主要来源。 */
	font-synthesis: none;
	-webkit-text-size-adjust: 100%;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

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

::selection {
	background: var(--brand-select);
}

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* --- 布局 ---------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

@media (max-width: 640px) {
	.container {
		padding: 0 18px;
	}
}

/* --- 顶部导航 ------------------------------------------------------------ */

.nav {
	position: sticky;
	top: 0;
	z-index: 60;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	background: var(--nav-bg);
	border-bottom: 1px solid var(--line);
}

/* 模糊放在伪元素上，而不是直接给 .nav。
   父元素一旦有 backdrop-filter 就成了合成层，里面的文字会改用灰度抗锯齿，明显发虚。
   伪元素承担模糊，文字仍然留在普通图层里，笔画是锐的。 */
.nav::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
}

.nav-inner {
	display: flex;
	align-items: center;
	gap: 28px;
}

/* 明暗切换：深色下显示太阳（点了变亮），浅色下显示月亮 */
.theme-toggle {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--text-2);
	cursor: pointer;
	transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.theme-toggle:hover {
	color: var(--text);
	border-color: var(--line-2);
	background: var(--panel-2);
}

.theme-toggle:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.theme-toggle svg {
	width: 16px;
	height: 16px;
}

.theme-toggle .icon-moon {
	display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
	display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
	display: block;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	flex: none;
}

.logo img {
	width: 26px;
	height: 26px;
	border-radius: 7px;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-left: 6px;
	font-size: 0.88rem;
	color: var(--text-2);
}

.nav-links a:not(.btn) {
	transition: color 0.16s ease;
}

.nav-links a:not(.btn):hover {
	color: var(--text);
}

.nav-spacer {
	flex: 1;
}

@media (max-width: 720px) {
	.nav-links {
		display: none;
	}
}

/* --- 按钮 ---------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0.68rem 1.15rem;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.1;
	white-space: nowrap;
	transition: background-color 0.18s ease, border-color 0.18s ease,
		transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn-primary {
	background: var(--brand);
	color: var(--on-brand);
	box-shadow: 0 10px 26px -12px var(--brand-ring);
}

.btn-primary:hover {
	background: var(--brand-hover);
	transform: translateY(-1px);
	box-shadow: 0 14px 30px -12px var(--brand-ring-hover);
}

.btn-ghost {
	background: var(--panel);
	border-color: var(--line-2);
	color: var(--text);
}

.btn-ghost:hover {
	background: var(--panel-3);
	border-color: var(--line-3);
}

.btn-sm {
	padding: 0.52rem 0.95rem;
	font-size: 0.85rem;
	border-radius: 9px;
}

.btn-lg {
	padding: 0.85rem 1.5rem;
	font-size: 0.97rem;
}

/* --- 首屏 ---------------------------------------------------------------- */

.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
	text-align: center;
}

.hero::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -260px;
	width: 1100px;
	height: 760px;
	transform: translateX(-50%);
	background: radial-gradient(
		50% 50% at 50% 50%,
		var(--brand-line) 0%,
		var(--brand-glow-2) 38%,
		transparent 68%
	);
	pointer-events: none;
}

.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
	background-size: 26px 26px;
	mask-image: radial-gradient(60% 50% at 50% 30%, #000 0%, transparent 78%);
	-webkit-mask-image: radial-gradient(60% 50% at 50% 30%, #000 0%, transparent 78%);
	pointer-events: none;
}

.hero > .container {
	position: relative;
	z-index: 1;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: var(--panel);
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--text-2);
}

.badge i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ok);
	box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.16);
}

.hero h1 {
	margin: 26px auto 0;
	max-width: 16em;
	font-size: clamp(2.3rem, 5.6vw, 3.9rem);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.005em;
}

.hero h1 em {
	font-style: normal;
	color: var(--brand);
}

.lede {
	margin: 22px auto 0;
	max-width: 32em;
	font-size: clamp(1rem, 1.6vw, 1.08rem);
	line-height: 1.75;
	color: var(--text-2);
	text-wrap: pretty;
}

.cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
}

.hero-meta {
	margin-top: 18px;
	font-family: var(--mono);
	font-size: 0.74rem;
	color: var(--text-3);
}

/* --- 产品截图 ------------------------------------------------------------ */

.shot {
	position: relative;
	margin: clamp(2.5rem, 5vw, 4rem) auto 0;
	max-width: 1020px;
	padding: 7px;
	border-radius: 18px;
	border: 1px solid var(--line-2);
	background: linear-gradient(180deg, var(--frame-1), var(--frame-2));
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95),
		0 0 0 1px var(--panel-min) inset;
}

.shot img {
	border-radius: 12px;
	width: 100%;
}

.shot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 18px;
	background: linear-gradient(180deg, var(--panel-2), transparent 28%);
	pointer-events: none;
}

/* --- 区块 ---------------------------------------------------------------- */

.section {
	padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section + .section {
	border-top: 1px solid var(--line);
}

.section-head {
	max-width: 44rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
	margin: 0;
	font-size: clamp(1.55rem, 3.2vw, 2.3rem);
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.005em;
}

.section-head p {
	margin: 14px 0 0;
	font-size: 1rem;
	color: var(--text-2);
	line-height: 1.75;
}

.section-head.center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.eyebrow {
	display: block;
	margin-bottom: 14px;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brand);
}

/* --- 功能卡片 ------------------------------------------------------------ */

.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 900px) {
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cards {
		grid-template-columns: 1fr;
	}
}

.card {
	padding: 22px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, var(--panel), var(--panel-min));
	transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.card:hover {
	border-color: var(--line-2);
	transform: translateY(-2px);
}

.card .icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--brand-soft);
	border: 1px solid var(--brand-line);
	color: var(--brand);
	margin-bottom: 16px;
}

.card .icon svg {
	width: 19px;
	height: 19px;
}

.card h3 {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.card p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.72;
	color: var(--text-2);
}

/* --- 步骤 ---------------------------------------------------------------- */

.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 820px) {
	.steps {
		grid-template-columns: 1fr;
	}
}

.step {
	position: relative;
	padding: 24px 22px 26px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, var(--panel), var(--panel-min));
}

.step .num {
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--brand);
}

.step h3 {
	margin: 14px 0 8px;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.005em;
}

.step p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--text-2);
	line-height: 1.72;
}

/* --- 声明块 -------------------------------------------------------------- */

.notice {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	padding: clamp(1.75rem, 4vw, 2.5rem);
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, var(--panel), transparent);
}

@media (max-width: 760px) {
	.notice {
		grid-template-columns: 1fr;
	}
}

.notice p {
	margin: 0;
	font-size: 0.94rem;
	line-height: 1.8;
	color: var(--text-2);
}

.notice p + p {
	margin-top: 14px;
}

.notice strong {
	color: var(--text);
	font-weight: 600;
}

.notice a:not(.btn) {
	color: var(--brand);
	border-bottom: 1px solid var(--brand-line-2);
}

.notice a:not(.btn):hover {
	border-bottom-color: var(--brand);
}

/* --- 收尾 CTA ------------------------------------------------------------ */

.finale {
	position: relative;
	overflow: hidden;
	padding: clamp(3.5rem, 7vw, 5.5rem) 0;
	text-align: center;
	border-top: 1px solid var(--line);
}

.finale::before {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -320px;
	width: 900px;
	height: 620px;
	transform: translateX(-50%);
	background: radial-gradient(
		50% 50% at 50% 50%,
		var(--brand-glow) 0%,
		transparent 70%
	);
	pointer-events: none;
}

.finale > .container {
	position: relative;
}

.finale h2 {
	margin: 0;
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.2;
}

.finale p {
	margin: 14px auto 0;
	max-width: 32em;
	color: var(--text-2);
}

.finale .cta {
	margin-top: 28px;
}

/* --- 页脚 ---------------------------------------------------------------- */

.footer {
	border-top: 1px solid var(--line);
	padding: 34px 0 40px;
	font-size: 0.85rem;
	color: var(--text-3);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.footer a:not(.btn) {
	color: var(--text-2);
	transition: color 0.16s ease;
}

.footer a:not(.btn):hover {
	color: var(--text);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-top: 8px;
}

.footer p {
	margin: 0;
	line-height: 1.9;
}

/* 备案信息：字号与颜色跟页脚其它小字同一档，只多留 6px 上边距把它和链接行分开。
   链接本身不带下划线（全局 a 已经如此），hover 时走品牌色，跟站内其它文字链接一个逻辑。
   选择器带上 .footer 前缀，才压得住上面 `.footer p { margin: 0 }` 的优先级。 */
.footer .footer-icp {
	margin-top: 6px;
	font-size: 0.8rem;
	color: var(--text-3);
}

.footer .footer-icp a:not(.btn) {
	color: var(--text-2);
	text-decoration: none;
}

.footer .footer-icp a:not(.btn):hover {
	color: var(--brand-text);
}

.footer .footer-icp span {
	margin: 0 6px;
	color: var(--text-3);
}

/* ==========================================================================
   播放器页
   ========================================================================== */

body.app {
	height: 100dvh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.app-bar {
	position: relative;
	flex: none;
	height: 56px;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 16px;
	/* viewport-fit=cover 之后，横屏刘海/圆角会盖住顶栏两端。
	   max() 保证常规情况下仍是原来的 16px，只在安全区更宽时才让出去。 */
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
	border-bottom: 1px solid var(--line);
	background: var(--nav-bg-strong);
}

.app-bar::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.app-bar .logo {
	font-size: 0.88rem;
}

.app-bar .theme-toggle {
	width: 30px;
	height: 30px;
	border-radius: 8px;
}

.app-bar .logo img {
	width: 22px;
	height: 22px;
	border-radius: 6px;
}

.room-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 11px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--panel-min);
	font-family: var(--mono);
	font-size: 0.74rem;
	color: var(--text-2);
	white-space: nowrap;
}

.room-pill .code {
	color: var(--text);
	font-weight: 600;
	letter-spacing: 0.12em;
}

.dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--text-3);
	flex: none;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dot.on {
	background: var(--ok);
	box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.15);
}

.app-bar .spacer {
	flex: 1;
}

.app-bar .btn {
	font-size: 0.8rem;
	padding: 0.44rem 0.8rem;
	border-radius: 8px;
}

/* 播放器尺寸由 fitStage() 按「宽高都能放下」算出来后写在这个列上，
   列宽 = 视频宽，底部信息与提示行自然就贴着画面等宽。 */
.app-main {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 1.8vw, 22px);
}

.player-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 100%;
	max-height: 100%;
}

.stage-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	flex: none;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	border: 1px solid var(--line);
}

/* 还没有视频时不要摆一个巨大的 16:9 黑框，那只会让中间更空。
   这一状态下画面元素隐藏，空状态/错误变成一张正常大小的卡片。 */
.stage-wrap.is-idle {
	aspect-ratio: auto;
	min-height: 0;
	background: transparent;
	border: 0;
	overflow: visible;
}

.stage-wrap.is-idle .stage {
	display: none;
}

.stage-wrap.is-idle .empty-state {
	position: static;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	overflow: visible;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: clamp(28px, 5vh, 52px) clamp(20px, 4vw, 36px);
	background: radial-gradient(80% 130% at 50% 0%, var(--stage-1), var(--stage-2) 72%);
}

.stage {
	position: absolute;
	inset: 0;
	background: #000;
}

/* 网页全屏时 Artplayer 会给自己加 art-fullscreen-web 并改成 fixed，
   这里要把选择器排除掉，否则会被下面这条规则按住、全屏失效。 */
.stage > .art-video-player:not(.art-fullscreen-web) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* 还没有视频时，把播放器内部 UI（含 loading 动画）藏掉，别透过空状态露出来 */
.stage.is-empty .art-video-player {
	opacity: 0;
	pointer-events: none;
}

.empty-state {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: clamp(16px, 3vh, 32px) clamp(16px, 3vw, 30px);
	text-align: center;
	overflow: auto;
	background: radial-gradient(75% 75% at 50% 42%, var(--stage-1), var(--stage-2) 72%);
}

.empty-state[hidden] {
	display: none;
}

.empty-state h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.005em;
}

.empty-state p {
	margin: 0;
	max-width: 30em;
	font-size: 0.88rem;
	color: var(--text-2);
}

.empty-form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 6px;
	width: 100%;
	max-width: 580px;
}

.empty-form input {
	flex: 1 1 320px;
	min-width: 0;
	padding: 0.68rem 0.9rem;
	border-radius: 9px;
	border: 1px solid var(--line-2);
	background: var(--panel);
	color: var(--text);
	font-size: 0.88rem;
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.empty-form input::placeholder {
	color: var(--text-3);
}

.empty-form input:focus {
	outline: none;
	border-color: var(--brand);
	background: var(--panel-2);
}

.app-foot {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 26px;
	font-size: 0.8rem;
	color: var(--text-3);
}

.app-foot[hidden] {
	display: none;
}

.app-foot .title {
	color: var(--text);
	font-weight: 500;
	font-size: 0.88rem;
	max-width: 52%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-foot .src {
	flex: 1;
	min-width: 0;
	font-family: var(--mono);
	font-size: 0.72rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-foot .btn {
	font-size: 0.75rem;
	padding: 0.4rem 0.7rem;
	border-radius: 8px;
	flex: none;
}

.hint-line {
	width: 100%;
	margin: 0;
	font-size: 0.8rem;
	color: var(--text-3);
	line-height: 1.6;
}

body.app .hint-line[hidden] {
	display: none;
}

body.app .hint-line.err {
	color: var(--err);
}

/* 法务/联系方式一行。放在提示行下面，字号比提示行再小一档：
   权利人从播放器页进来时，这是唯一能看到投诉入口的地方，得一直在但别抢戏。
   padding-bottom 兜住 iPhone 底部那条 Home 指示条，免得文字压在上面。 */
.legal-line {
	width: 100%;
	margin: 0;
	font-size: 0.75rem;
	color: var(--text-3);
	text-align: center;
	line-height: 1.6;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.app .legal-line[hidden] {
	display: none;
}

.legal-line a {
	color: var(--text-2);
	transition: color 0.16s ease;
}

.legal-line a:hover {
	color: var(--brand-text);
}

.btn .ico {
	width: 15px;
	height: 15px;
	flex: none;
}

/* .btn 自己设了 display，会盖掉 [hidden]，这里补回来 */
.btn[hidden] {
	display: none;
}

/* 竖屏时画面撑不满高度，别把播放器吊在屏幕正中，贴着顶栏更自然 */
@media (max-aspect-ratio: 1 / 1) {
	.app-main {
		align-items: flex-start;
	}
}

@media (max-width: 640px) {
	.app-bar {
		gap: 6px;
		padding: 0 10px;
		padding-left: max(10px, env(safe-area-inset-left, 0px));
		padding-right: max(10px, env(safe-area-inset-right, 0px));
	}

	.app-bar .logo span {
		display: none;
	}

	.app-bar .btn.ghost-hide {
		display: none;
	}

	.room-pill {
		gap: 6px;
		padding: 4px 9px;
		font-size: 0.7rem;
	}

	/* 小屏上绿点已经表达了连接状态，把文字省出来给房间码和人数 */
	.room-pill #connText {
		display: none;
	}

	.app-bar .btn {
		padding: 0.4rem 0.66rem;
		font-size: 0.76rem;
	}

	.app-main {
		padding: 10px;
	}

	.player-col {
		gap: 10px;
	}

	.app-foot {
		gap: 10px;
	}

	.app-foot .src {
		display: none;
	}

	.app-foot .title {
		max-width: 62%;
	}

	.hint-line {
		font-size: 0.76rem;
	}
}

@media (max-width: 380px) {
	.app-bar #copy .label {
		display: none;
	}

	.app-bar #copy {
		padding: 0.4rem 0.5rem;
	}
}

/* 横屏手机这类矮窗口，竖排内容会顶出去，砍掉说明文字 */
@media (max-height: 520px) {
	.empty-state {
		gap: 10px;
	}

	/* 只压输入卡片：错误卡片 #fatal 的原因说明正是横屏时唯一能看到的解释。
	   同理，写进 .hint-line.err 的错误文案也不能跟着藏起来。 */
	#empty p {
		display: none;
	}

	.hint-line:not(.err) {
		display: none;
	}
}

/* ==========================================================================
   教程页
   ========================================================================== */

.page-head {
	padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line);
}

.page-head h1 {
	margin: 0;
	font-size: clamp(1.9rem, 4.4vw, 2.9rem);
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.15;
}

.page-head p {
	margin: 16px 0 0;
	max-width: 38em;
	color: var(--text-2);
	font-size: 1rem;
	line-height: 1.75;
}

.article {
	max-width: 780px;
	margin: 0 auto;
	padding: 0 24px;
}

.guide-step {
	display: grid;
	grid-template-columns: 54px 1fr;
	gap: 20px;
	padding: clamp(2rem, 4vw, 2.75rem) 0;
	border-bottom: 1px solid var(--line);
}

.guide-step:last-of-type {
	border-bottom: 0;
}

.guide-step .marker {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: var(--brand-soft);
	border: 1px solid var(--brand-line);
	font-family: var(--mono);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--brand);
}

.guide-step h2 {
	margin: 4px 0 10px;
	font-size: clamp(1.2rem, 2.4vw, 1.45rem);
	font-weight: 600;
	letter-spacing: -0.005em;
}

.guide-step p {
	margin: 0 0 12px;
	color: var(--text-2);
	line-height: 1.8;
}

.guide-step p:last-child {
	margin-bottom: 0;
}

.guide-step code {
	font-family: var(--mono);
	font-size: 0.84em;
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--panel-2);
	border: 1px solid var(--line);
	color: var(--text);
}

@media (max-width: 600px) {
	.guide-step {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* 界面示意 */

.mock {
	margin-top: 18px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--mock-bg);
	overflow: hidden;
}

.mock-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 12px;
	border-bottom: 1px solid var(--line);
	background: var(--panel-min);
}

.mock-bar span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--panel-3);
}

.mock-body {
	padding: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.mock-input {
	flex: 1 1 260px;
	min-width: 0;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1px solid var(--line-2);
	background: var(--panel);
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mock-btn {
	padding: 9px 14px;
	border-radius: 8px;
	background: var(--brand);
	color: var(--on-brand);
	font-size: 0.78rem;
	font-weight: 500;
	white-space: nowrap;
}

.mock-code {
	font-family: var(--mono);
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	padding: 7px 12px;
	border-radius: 8px;
	border: 1px solid var(--brand-select);
	background: var(--brand-soft);
	color: var(--brand-text);
}

.mock-players {
	display: flex;
	gap: 8px;
	width: 100%;
}

.mock-player {
	flex: 1;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	border: 1px solid var(--line-2);
	background: linear-gradient(135deg, var(--mock-a), var(--mock-c) 60%);
	display: grid;
	place-items: center;
	color: var(--text-3);
	font-family: var(--mono);
	font-size: 0.7rem;
}

.mock-player.synced {
	border-color: var(--brand-line-2);
	background: linear-gradient(135deg, var(--mock-b), var(--mock-c) 60%);
	color: var(--brand-text);
}

/* 常见问题 */

.faq {
	border-top: 1px solid var(--line);
}

.faq details {
	border-bottom: 1px solid var(--line);
}

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	font-size: 0.97rem;
	font-weight: 500;
	cursor: pointer;
	list-style: none;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: '+';
	font-family: var(--mono);
	font-size: 1.1rem;
	color: var(--text-3);
	transition: transform 0.2s ease, color 0.2s ease;
}

.faq details[open] summary::after {
	transform: rotate(45deg);
	color: var(--brand);
}

.faq details p {
	margin: 0 0 20px;
	padding-right: 36px;
	font-size: 0.92rem;
	line-height: 1.8;
	color: var(--text-2);
}

.faq details p:last-child {
	margin-bottom: 22px;
}

/* ==========================================================================
   归档页
   ========================================================================== */

/* 版本日志
   按「主.次」分组折叠，最新的组默认展开。以前是一条时间线平铺，
   版本一多就是一面墙；分组之后页面长度只随组数增长，不随版本数。 */

.rel-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	margin: 22px 0 26px;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--panel-min);
}

.rel-now {
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--text-3);
}

.rel-now b {
	font-weight: 600;
	color: var(--text);
}

.rel-rule {
	font-size: 0.78rem;
	color: var(--text-3);
	line-height: 1.6;
}

.rel-rule code {
	font-family: var(--mono);
	font-size: 0.95em;
	color: var(--text-2);
}

.rel-group {
	border-top: 1px solid var(--line);
}

.rel-group:last-child {
	border-bottom: 1px solid var(--line);
}

.rel-group > summary {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 15px 2px;
	list-style: none;
	cursor: pointer;
}

.rel-group > summary::-webkit-details-marker {
	display: none;
}

/* 收起时箭头朝右，展开时朝下 */
.rel-group > summary::after {
	content: '';
	flex: none;
	width: 6px;
	height: 6px;
	margin-left: auto;
	margin-bottom: 2px;
	border-right: 1.5px solid var(--text-3);
	border-bottom: 1.5px solid var(--text-3);
	transform: rotate(-45deg);
	transition: transform 0.18s ease;
}

.rel-group[open] > summary::after {
	transform: rotate(45deg);
}

.rel-group > summary:hover .rel-series {
	color: var(--brand-text);
}

.rel-series {
	font-family: var(--mono);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
}

.rel-meta {
	font-size: 0.78rem;
	color: var(--text-3);
}

.rel-item {
	padding: 2px 2px 22px 2px;
}

.rel-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
}

.rel-ver {
	font-family: var(--mono);
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--text);
}

.rel-date {
	font-family: var(--mono);
	font-size: 0.74rem;
	color: var(--text-3);
}

.rel-notes {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

/* 标签栏固定宽度，正文左对齐，扫读时不用逐行找起点 */
.rel-notes li {
	display: grid;
	grid-template-columns: 3.2em 1fr;
	gap: 10px;
	align-items: start;
	font-size: 0.88rem;
	line-height: 1.68;
	color: var(--text-2);
}

.rel-tag {
	font-family: var(--mono);
	font-size: 0.68rem;
	line-height: 1.75;
	text-align: center;
	border: 1px solid var(--line-2);
	border-radius: 4px;
	background: var(--panel);
	color: var(--text-3);
}

/* 类型只改文字色，边框统一，两种主题下都不会花 */
.rel-tag.t-add {
	color: var(--ok);
}

.rel-tag.t-fix {
	color: var(--brand-text);
}

.rel-tag.t-sec {
	color: var(--warn);
}

.rel-tag.t-del {
	color: var(--err);
}

.rel-fallback {
	font-size: 0.85rem;
	color: var(--text-3);
}

@media (max-width: 560px) {
	.rel-meta {
		display: none;
	}

	.rel-notes li {
		grid-template-columns: 3em 1fr;
		gap: 8px;
	}
}

.tag {
	font-family: var(--mono);
	font-size: 0.66rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--brand-soft);
	border: 1px solid var(--brand-line);
	color: var(--brand-text);
	white-space: nowrap;
}

/* 「旧终点」是过去时，别和「现在」抢同一种强调色 */
.tag-old {
	background: var(--panel);
	border-color: var(--line-2);
	color: var(--text-3);
}

.old-shot {
	margin: 26px 0 0;
	padding: 6px;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: var(--bg-2);
}

/* 旧版是白底长图，直接铺进深色页面会刺眼。只露出首屏，底部用渐变淡出。 */
.old-shot-frame {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: var(--frame-1);
}

.old-shot img {
	width: 100%;
	display: block;
}

.old-shot figcaption {
	padding: 12px 8px 6px;
	font-size: 0.8rem;
	color: var(--text-3);
	text-align: center;
}

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

.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;
}

@media print {
	.nav,
	.cta,
	.btn {
		display: none;
	}

	body {
		background: #fff;
		color: #000;
	}
}
