/* ---------- 首页无人机（WebGL 版） ---------- */
/* 舞台高度与位置由 hero-drone.js 按实测布局改写：横向撑满视口、向上延到页面顶 */
.drone-stage {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 620px;
	overflow: hidden;
	pointer-events: none;
	z-index: 3;
}
.drone-stage > * {
	position: absolute;
}
.drone-stage canvas {
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
}
.drone-stage.is-ready canvas {
	opacity: 1;
}

/* 拆解时页面其余内容虚化退后，只留无人机是实的（类由脚本挂在 <html> 上）。
   页眉页脚虚的是里面的内容，白底条和分隔线保持利落 */
body > header > nav,
main > :not(.drone-stage),
body > footer > * {
	transition: filter 420ms ease, opacity 420ms ease;
}
.drone-focus body > header > nav,
.drone-focus main > :not(.drone-stage),
.drone-focus body > footer > * {
	filter: blur(5px);
	opacity: 0.5;
}

/* 再压一层白晕：零件和标注底下不透字 */
.drone-veil {
	opacity: 0;
	background: radial-gradient(closest-side, rgba(255, 255, 255, 0.97) 62%, rgba(255, 255, 255, 0));
}

/* ---------- 停机坪 ---------- */
.drone-pad svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}
.drone-pad .pin {
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}
.drone-pad.on .pin {
	animation: dpad-in 620ms cubic-bezier(0.2, 0.85, 0.25, 1) var(--pd, 5.1s) forwards;
}
.drone-pad.parked .pin {
	opacity: 1;
}
.drone-pad .ring {
	transform-box: fill-box;
	transform-origin: center;
	opacity: 0;
}
.drone-pad.on .ring {
	animation: dpad-pulse 2.6s ease-out calc(var(--pd, 5.1s) + 0.7s) infinite;
}
.drone-pad.parked .ring {
	animation: dpad-pulse 2.6s ease-out infinite;
}
.drone-pad {
	transition: opacity 320ms ease;
}
.drone-stage.is-open .drone-pad {
	opacity: 0.35;
}
@keyframes dpad-in {
	from { opacity: 0; transform: scale(0.5); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes dpad-pulse {
	0% { opacity: 0.65; transform: scale(0.88); }
	100% { opacity: 0; transform: scale(1.3); }
}

/* ---------- 拆解标注 ---------- */
.drone-labels {
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}
.drone-labels .ln {
	fill: none;
	stroke: rgba(15, 118, 110, 0.6);
	stroke-width: 1;
}
.drone-labels .dot {
	fill: #0f766e;
	stroke: #fff;
	stroke-width: 1.2;
}
.drone-labels text {
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 3px;
	stroke-linejoin: round;
}
.drone-labels .en {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	fill: #0f766e;
}
.drone-labels .no {
	fill: rgba(15, 118, 110, 0.5);
}
.drone-labels .zh {
	font-family: var(--font-sans, sans-serif);
	font-size: 11px;
	fill: rgb(90, 99, 112);
}

/* 二级拆解：标题 + 子层标注 */
.drone-labels .ten {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	fill: #0f766e;
}
.drone-labels .tzh {
	font-family: var(--font-sans, sans-serif);
	font-size: 12px;
	fill: rgb(90, 99, 112);
}
.drone-labels .trule {
	stroke: rgba(15, 118, 110, 0.45);
	stroke-width: 1;
}

/* ---------- 能量流 / 信号流 / 射频 ---------- */
.drone-labels .fl {
	fill: none;
	stroke-linecap: round;
}
.drone-labels .fl-u {
	stroke: rgba(255, 255, 255, 0.85);
	stroke-width: 4;
}
.drone-labels .fl-b {
	stroke-width: 1.2;
	stroke-dasharray: 2 4;
	opacity: 0.7;
}
.drone-labels .fl-t {
	stroke-width: 2.6;
}
.drone-labels .fl-h {
	stroke: #fff;
	stroke-width: 1;
}
.drone-labels .power .fl-b,
.drone-labels .power .fl-t {
	stroke: #d9730b;
}
.drone-labels .power .fl-h {
	fill: #f59e0b;
}
.drone-labels .signal .fl-b,
.drone-labels .signal .fl-t {
	stroke: #0f766e;
}
.drone-labels .signal .fl-h {
	fill: #14b8a6;
}
.drone-labels .rf {
	fill: none;
	stroke: #3b6fd4;
	stroke-width: 1.2;
}


/* ---------- 起飞前自检字幕 ---------- */
.drone-check {
	display: flex;
	align-items: center;
	gap: 12px;
	transform: translateX(-50%);
	white-space: nowrap;
	opacity: 0;
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: rgba(90, 99, 112, 0.5);
	padding: 7px 8px 7px 14px;
	border-radius: 8px;
	border: 1px solid rgba(15, 118, 110, 0.18);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.25);
}
.drone-check b {
	font-weight: 600;
	color: rgb(90, 99, 112);
	margin-right: 4px;
}
.drone-check i {
	font-style: normal;
	transition: color 120ms linear;
}
.drone-check i::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 5px;
	border-radius: 50%;
	border: 1px solid currentColor;
	vertical-align: 1px;
	box-sizing: border-box;
}
.drone-check i.ok {
	color: #0f766e;
}
.drone-check i.ok::before {
	background: currentColor;
}
.drone-check em {
	font-style: normal;
	font-weight: 600;
	margin-left: 4px;
	padding: 2px 8px;
	border-radius: 3px;
	border: 1px solid currentColor;
	transition: color 120ms linear, background-color 120ms linear, border-color 120ms linear;
}
.drone-check.armed em {
	color: #fff;
	background: #16a34a;
	border-color: #16a34a;
}

/* ---------- 无人机上方的操作提示 ---------- */
.drone-hint {
	display: flex;
	align-items: center;
	transform: translateX(-50%);
	white-space: nowrap;
	opacity: 0;
	transition: opacity 400ms ease;
	font-family: var(--font-sans, sans-serif);
	font-size: 11.5px;
	line-height: 1;
	color: rgb(90, 99, 112);
}
.drone-hint b {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: #0f766e;
	padding: 4px 6px 3px;
	margin-right: 6px;
	border: 1px solid rgba(15, 118, 110, 0.32);
	border-bottom-width: 2px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.92);
}
.drone-hint span + b {
	margin-left: 12px;
}
.drone-stage.is-parked .drone-hint {
	opacity: 1;
	transition-delay: 600ms;
}
.drone-stage.is-open .drone-hint,
.drone-stage.is-flying .drone-hint {
	opacity: 0;
	transition-delay: 0ms;
}
.drone-stage.is-flying .drone-pad {
	opacity: 1;
}

/* ---------- 感应区：落坪后才接管指针 ---------- */
.drone-stage.is-parked .drone-hit {
	pointer-events: auto;
	cursor: pointer;
}
.drone-stage.is-open .drone-hit {
	cursor: crosshair;
}
.drone-hit {
	user-select: none;
	-webkit-user-select: none;
}

/* ---------- 放大检视 ---------- */
/* 舞台钉到视口上铺满（left/top/height 由脚本改写），盖住整页 */
.drone-stage.is-inspect {
	position: fixed;
	z-index: 1000;
}
.drone-shade {
	inset: 0;
	opacity: 0;
	transition: opacity 420ms ease;
	background:
		linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px) 0 0 / 100% 32px,
		linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px) 0 0 / 32px 100%,
		rgba(255, 255, 255, 0.985);
}
.drone-stage.is-zoom .drone-shade {
	opacity: 1;
}
.drone-stage.is-zoom .drone-pad {
	opacity: 0;
}
.drone-stage.is-inspect .drone-hit {
	cursor: grab;
	touch-action: none;
}
.drone-stage.is-drag .drone-hit {
	cursor: grabbing;
}

/* 拆解图正下方居中的一排按钮：放大检视 / 重播入场 */
.drone-tools {
	position: absolute;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease;
}
.drone-stage.is-open:not(.is-inspect) .drone-tools {
	opacity: 1;
	pointer-events: auto;
	transition-delay: 500ms;
}
.drone-zoom,
.drone-replay {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px 8px 12px;
	border-radius: 999px;
	border: 1px solid rgba(15, 118, 110, 0.3);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.25);
	font-family: var(--font-sans, sans-serif);
	font-size: 12px;
	line-height: 1;
	color: #0f766e;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
/* 重播是次要动作，颜色收一档 */
.drone-replay {
	border-color: rgba(90, 99, 112, 0.26);
	color: rgb(90, 99, 112);
}
.drone-zoom svg,
.drone-replay svg,
.drone-x svg {
	width: 11px;
	height: 11px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.drone-zoom small {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 10px;
	opacity: 0.6;
	margin-left: 2px;
	padding-left: 8px;
	border-left: 1px solid currentColor;
}
.drone-zoom:hover,
.drone-replay:hover {
	background: #0f766e;
	border-color: #0f766e;
	color: #fff;
}

/* 本会话看过入场后再打开首页：不重播，停机坪和头像上的 HUD 跟着机体一起淡进来（机体那部分在脚本里算） */
.drone-stage.is-arrive .drone-pad,
.drone-scan.is-soft {
	animation: drone-soft 620ms ease backwards;
}
@keyframes drone-soft {
	from { opacity: 0; }
}

/* 重播入场前的那一下：整机、停机坪、标注一起淡掉，感应区先不接指针 */
.drone-stage.is-rewind canvas,
.drone-stage.is-rewind .drone-pad,
.drone-stage.is-rewind .drone-labels {
	opacity: 0;
	transition: opacity 240ms ease;
}
.drone-stage.is-rewind .drone-hit {
	pointer-events: none;
}

/* 检视模式的标题 / 关闭 / 工具条 */
.drone-cap,
.drone-x,
.drone-bar {
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease;
}
.drone-stage.is-zoom .drone-cap,
.drone-stage.is-zoom .drone-x,
.drone-stage.is-zoom .drone-bar {
	opacity: 1;
	transition-delay: 220ms;
}
.drone-stage.is-zoom .drone-x,
.drone-stage.is-zoom .drone-bar {
	pointer-events: auto;
}
.drone-cap {
	left: 36px;
	top: 26px;
	display: flex;
	align-items: baseline;
	gap: 12px;
	white-space: nowrap;
}
.drone-cap b {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.16em;
	color: #0f766e;
}
.drone-cap span {
	font-family: var(--font-sans, sans-serif);
	font-size: 12.5px;
	color: rgb(90, 99, 112);
}
.drone-x {
	right: 36px;
	top: 18px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 7px;
	border: 1px solid rgba(90, 99, 112, 0.3);
	background: rgba(255, 255, 255, 0.92);
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 10.5px;
	line-height: 1;
	letter-spacing: 0.12em;
	color: rgb(90, 99, 112);
	cursor: pointer;
	user-select: none;
}
.drone-x:hover {
	color: #0f766e;
	border-color: rgba(15, 118, 110, 0.55);
}
.drone-bar {
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px 6px 6px;
	border-radius: 10px;
	border: 1px solid rgba(15, 118, 110, 0.18);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.28);
	white-space: nowrap;
	user-select: none;
}
.drone-bar .chip {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 6px 10px;
	border-radius: 6px;
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 10.5px;
	line-height: 1;
	letter-spacing: 0.08em;
	color: rgba(90, 99, 112, 0.6);
	text-decoration: line-through;
	cursor: pointer;
	transition: color 140ms ease, background-color 140ms ease;
}
.drone-bar .chip i {
	width: 16px;
	border-top: 2.4px solid currentColor;
	border-radius: 2px;
}
.drone-bar .chip.rf i {
	width: 9px;
	height: 9px;
	box-sizing: border-box;
	border: 1.4px solid currentColor;
	border-radius: 50%;
}
.drone-bar .chip.on {
	text-decoration: none;
}
.drone-bar .chip.power.on {
	color: #b45309;
	background: rgba(217, 115, 11, 0.1);
}
.drone-bar .chip.signal.on {
	color: #0f766e;
	background: rgba(15, 118, 110, 0.1);
}
.drone-bar .chip.rf.on {
	color: #3b6fd4;
	background: rgba(59, 111, 212, 0.1);
}
.drone-bar .chip:hover {
	background: rgba(90, 99, 112, 0.1);
}
.drone-bar em {
	font-style: normal;
	font-family: var(--font-sans, sans-serif);
	font-size: 12px;
	color: rgb(90, 99, 112);
	margin-left: 8px;
	padding-left: 14px;
	border-left: 1px solid rgba(90, 99, 112, 0.22);
}

/* 检视模式里标注和连线都放大一号 */
.drone-labels .en,
.drone-labels .zh,
.drone-labels .ten,
.drone-labels .tzh {
	transition: font-size 420ms ease;
}
.drone-stage.is-zoom .drone-labels .en {
	font-size: 13px;
}
.drone-stage.is-zoom .drone-labels .zh {
	font-size: 12.5px;
}
.drone-stage.is-zoom .drone-labels .ten {
	font-size: 16px;
}
.drone-stage.is-zoom .drone-labels .tzh {
	font-size: 14px;
}
.drone-stage.is-zoom .drone-labels .ln {
	stroke-width: 1.2;
}
.drone-stage.is-zoom .drone-labels .fl-u {
	stroke-width: 6.5;
}
.drone-stage.is-zoom .drone-labels .fl-b {
	stroke-width: 1.8;
	stroke-dasharray: 3 6;
	opacity: 0.8;
}
.drone-stage.is-zoom .drone-labels .fl-t {
	stroke-width: 3.8;
}
.drone-stage.is-zoom .drone-labels .rf {
	stroke-width: 1.6;
}
/* 连线上的协议名：只在检视模式里出现 */
.drone-labels .ftag {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	stroke-width: 4px;
	opacity: 0;
	transition: opacity 260ms ease;
}
.drone-stage.is-zoom .drone-labels .ftag {
	opacity: 1;
	transition-delay: 320ms;
}
.drone-labels .ftag.power {
	fill: #b45309;
}
.drone-labels .ftag.signal {
	fill: #0f766e;
}
.drone-stage.is-flying .drone-hit {
	pointer-events: none;
}

/* ---------- 头像扫描 ---------- */
/* 光束画在舞台里（从镜头出发），HUD 挂在 .hero-avatar 里（对齐由 DOM 保证） */
.drone-beam {
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}
.drone-beam polyline {
	fill: none;
	stroke: #2dd4bf;
	stroke-width: 1;
	stroke-opacity: 0.75;
	stroke-linejoin: round;
}
.drone-scan {
	position: absolute;
	inset: 0;
	width: 132px;
	height: 132px;
	overflow: visible;
	pointer-events: none;
	z-index: 2;
	opacity: 0;
}
.drone-scan .brk path {
	fill: none;
	stroke: #0f766e;
	stroke-width: 2;
	stroke-linecap: square;
}
.drone-scan .ticks,
.drone-scan .orb,
.drone-scan .prog,
.drone-scan .pulse,
.drone-scan .core {
	fill: none;
}
.drone-scan .ticks {
	stroke: rgba(15, 118, 110, 0.42);
	stroke-width: 3;
	stroke-dasharray: 1 5.72;
	transform-origin: 66px 66px;
	animation: ds-spin 48s linear infinite;
}
.drone-scan .orb {
	stroke: #14b8a6;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-dasharray: 34 449.8;
	transform-origin: 66px 66px;
	animation: ds-spin 7s linear infinite reverse;
}
.drone-scan .prog {
	stroke: #0f766e;
	stroke-width: 2;
}
.drone-scan .pulse {
	stroke: #14b8a6;
	stroke-width: 2;
}
.drone-scan .tint {
	fill: rgba(20, 184, 166, 0.16);
}
.drone-scan .grid {
	opacity: 0.5;
}
.drone-scan .line {
	fill: #5eead4;
	filter: drop-shadow(0 0 3px #2dd4bf);
}
.drone-scan .seg {
	stroke: #fff;
	stroke-width: 0.9;
	stroke-opacity: 0.9;
}
.drone-scan .pt {
	fill: #fff;
	stroke: #0f766e;
	stroke-width: 1;
}
.drone-scan .core {
	stroke: #fff;
	stroke-width: 1.4;
}
.drone-scan text {
	font-family: var(--font-mono, ui-monospace, Consolas, monospace);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-anchor: middle;
	fill: #0f766e;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 3px;
	stroke-linejoin: round;
}
.drone-scan .bot {
	font-size: 8.5px;
	font-weight: 400;
	fill: rgba(15, 118, 110, 0.75);
}
/* 平时：四角呼吸、扫描线自己一遍遍扫，和镜头的呼吸同频 */
.drone-scan.is-idle {
	opacity: 1;
}
.drone-scan.is-idle .brk {
	animation: ds-breathe 2.6s ease-in-out infinite;
}
.drone-scan.is-idle .prog {
	stroke-opacity: 0.55;
}
.drone-scan.is-idle .sweep {
	animation: ds-sweep 2.6s ease-in-out infinite;
}
@keyframes ds-spin {
	to { transform: rotate(360deg); }
}
@keyframes ds-breathe {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}
@keyframes ds-sweep {
	0% { transform: translateY(0); opacity: 0; }
	15% { opacity: 0.8; }
	85% { opacity: 0.8; }
	100% { transform: translateY(132px); opacity: 0; }
}

/* 窄屏整套停用：hero 在 720px 以下变单列居中 */
@media (max-width: 720px) {
	.drone-stage,
	.drone-scan {
		display: none;
	}
}
