
/* ============================================================
 * sampling-room-3d.css - 冰箱抽样室 3D 视图（原型，独立页面）
 * 视觉沿用大屏工业冷调：石墨深底 / 冰青主色 / 风险红橙
 * ============================================================ */

:root {
	--ink-0: #EAF5FF;
	--ink-1: #A9C7DF;
	--ink-2: #6E8EA9;
	--ink-3: #47637D;

	--cyan: #43D3FF;
	--cyan-dim: rgba(67, 211, 255, .18);
	--ok: #17D98A;
	--warn: #FFB020;
	--danger: #FF4757;

	--bg-0: #060D18;
	--bg-1: #0A1727;
	--line: rgba(120, 182, 228, .13);
	--line-strong: rgba(120, 182, 228, .28);

	--font-num: "Bahnschrift", "DIN Alternate", Consolas, "Courier New", monospace;
	--font-ui: "Microsoft YaHei", "PingFang SC", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
	--r: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
	overflow: hidden;
	color: var(--ink-0);
	background: var(--bg-0);
	font-family: var(--font-ui);
	-webkit-font-smoothing: antialiased;
}

.app { height: 100%; display: flex; flex-direction: column; }

/* ---------- 顶栏 ---------- */
.topbar {
	height: 62px;
	flex: 0 0 62px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 18px;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, #0B1A2B 0%, #08131F 100%);
	position: relative;
	z-index: 20;
}

.topbar::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(67, 211, 255, .5), transparent);
}

.tb-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.back {
	color: var(--ink-1);
	font-size: 13px;
	text-decoration: none;
	padding: 6px 10px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	white-space: nowrap;
	transition: .18s;
}
.back:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(67, 211, 255, .06); }

.tt h1 {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .5px;
	line-height: 1.3;
}
.tt p {
	font-size: 10px;
	color: var(--ink-3);
	letter-spacing: 1.4px;
	margin-top: 2px;
	font-family: var(--font-num);
}

.tb-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* 抽样室切换（顶层维度） */
.room-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 3px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: rgba(6, 13, 24, .55);
}
.room-step {
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	background: none;
	border: 1px solid transparent;
	border-radius: var(--r);
	color: var(--ink-2);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: .16s;
}
.room-step:hover { color: var(--cyan); background: rgba(67, 211, 255, .1); }
.room-step:active { background: rgba(67, 211, 255, .2); }

.room-pick {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--ink-2);
	white-space: nowrap;
}
.room-pick select {
	height: 30px;
	padding: 0 22px 0 8px;
	color: var(--cyan);
	background: rgba(6, 13, 24, .9);
	border: 1px solid var(--line-strong);
	border-radius: var(--r);
	font-family: var(--font-num);
	font-size: 13px;
	outline: none;
	cursor: pointer;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
		linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
	background-position: calc(100% - 12px) 13px, calc(100% - 7px) 13px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}
.room-pick select:focus { border-color: var(--cyan); }

.src-chip {
	font-size: 11px;
	padding: 5px 9px;
	border-radius: 999px;
	border: 1px solid var(--line);
	color: var(--ink-2);
	white-space: nowrap;
}
.src-chip.live { color: var(--ok); border-color: rgba(23, 217, 138, .35); background: rgba(23, 217, 138, .08); }
.src-chip.mock { color: var(--warn); border-color: rgba(255, 176, 32, .35); background: rgba(255, 176, 32, .08); }
.src-chip.err { color: var(--danger); border-color: rgba(255, 71, 87, .35); background: rgba(255, 71, 87, .08); }

.btn {
	font-family: var(--font-ui);
	font-size: 12px;
	color: var(--ink-1);
	background: rgba(67, 211, 255, .05);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 7px 11px;
	cursor: pointer;
	transition: .18s;
	white-space: nowrap;
}
.btn:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(67, 211, 255, .1); }
.btn.primary { color: #04121C; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
.btn.primary:hover { background: #6ee0ff; }

/* ---------- 舞台 ---------- */
.stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }

.canvas-wrap { position: absolute; inset: 0; }

.canvas-wrap canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.canvas-wrap canvas.dragging { cursor: grabbing; }
.canvas-wrap canvas.pointing { cursor: pointer; }

/* 背景光晕 */
.stage::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(900px 420px at 50% -10%, rgba(67, 211, 255, .13), transparent 70%),
		radial-gradient(700px 500px at 85% 110%, rgba(23, 217, 138, .06), transparent 70%);
	z-index: 1;
}

/* ---------- 统计条 ---------- */
.stats {
	position: absolute;
	left: 16px;
	top: 16px;
	display: flex;
	gap: 8px;
	z-index: 4;
}

.stat {
	min-width: 92px;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-left: 2px solid var(--cyan);
	background: rgba(8, 20, 33, .78);
	backdrop-filter: blur(6px);
	border-radius: var(--r);
}
.stat b {
	display: block;
	font-family: var(--font-num);
	font-size: 22px;
	line-height: 1.1;
	color: var(--cyan);
	font-weight: 600;
}
.stat span { display: block; font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.stat.danger { border-left-color: var(--danger); }
.stat.danger b { color: var(--danger); }
.stat.pass { border-left-color: var(--ok); }
.stat.pass b { color: var(--ok); }
.stat.muted { border-left-color: var(--ink-3); }
.stat.muted b { color: var(--ink-1); }

/* 可点击统计卡：定位对应状态的冰箱 */
.stat.clickable {
	cursor: pointer;
	transition: background .16s, transform .16s, box-shadow .16s;
}
.stat.clickable:hover { background: rgba(14, 32, 50, .94); transform: translateY(-1px); }
.stat.clickable:active { transform: translateY(0); }
.stat.clickable:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
.stat.clickable.active { box-shadow: inset 0 0 0 1px var(--cyan), 0 0 14px rgba(67, 211, 255, .2); }
.stat.clickable.active b { text-shadow: 0 0 12px currentColor; }

/* ---------- 本间工况（温度 / 湿度） ---------- */
.env-box {
	position: absolute;
	left: 16px;
	top: 90px;
	z-index: 6;
}
.env-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 11px;
	border: 1px solid var(--line);
	border-left: 2px solid var(--cyan);
	background: rgba(8, 20, 33, .78);
	backdrop-filter: blur(6px);
	border-radius: var(--r);
	color: var(--ink-1);
	font-family: var(--font-ui);
	font-size: 11px;
	cursor: pointer;
	transition: .16s;
}
.env-chip:hover { background: rgba(14, 32, 50, .94); border-color: var(--line-strong); }
.env-chip .env-room { color: var(--ink-3); }
.env-chip .env-name { color: var(--ink-2); }
.env-chip b {
	font-family: var(--font-num);
	font-size: 15px;
	font-weight: 600;
	color: var(--cyan);
	letter-spacing: .3px;
}
.env-chip .env-edit {
	padding-left: 8px;
	border-left: 1px solid var(--line);
	color: var(--ink-2);
}
.env-chip:hover .env-edit { color: var(--cyan); }

.env-editor {
	margin-top: 6px;
	width: 214px;
	padding: 10px 12px;
	display: grid;
	gap: 8px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r);
	background: rgba(8, 20, 33, .94);
	backdrop-filter: blur(8px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.env-editor.hide { display: none; }
.env-editor label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 11px;
	color: var(--ink-2);
}
.env-editor input {
	width: 86px;
	height: 28px;
	padding: 0 7px;
	color: var(--ink-0);
	background: rgba(6, 13, 24, .9);
	border: 1px solid var(--line);
	border-radius: var(--r);
	font-family: var(--font-num);
	font-size: 13px;
	outline: none;
}
.env-editor input:focus { border-color: var(--cyan); }
.env-actions { display: flex; gap: 6px; }
.env-actions .btn { flex: 1; padding: 6px 8px; }

/* ---------- 图例 ---------- */
.legend {
	position: absolute;
	left: 16px;
	bottom: 16px;
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 8px 12px;
	border: 1px solid var(--line);
	background: rgba(8, 20, 33, .78);
	backdrop-filter: blur(6px);
	border-radius: var(--r);
	z-index: 4;
	font-size: 11px;
	color: var(--ink-1);
}
.legend .dot {
	display: inline-block;
	width: 9px; height: 9px;
	margin-right: 5px;
	border-radius: 2px;
	vertical-align: -1px;
}
.dot.pass { background: #2FD3C0; box-shadow: 0 0 8px rgba(47, 211, 192, .7); }
.dot.over { background: var(--danger); box-shadow: 0 0 8px rgba(255, 71, 87, .7); }
.dot.pending { background: #4E7FA3; box-shadow: 0 0 8px rgba(78, 127, 163, .6); }
.dot.free { background: #14293B; border: 1px solid rgba(120, 182, 228, .45); }

.legend .cable {
	display: inline-block;
	width: 15px;
	height: 3px;
	margin-right: 5px;
	border-radius: 2px;
	vertical-align: 3px;
}
.cable.cur { background: #FFC61A; box-shadow: 0 0 8px rgba(255, 198, 26, .7); }
.cable.vol { background: #FF3B30; box-shadow: 0 0 8px rgba(255, 59, 48, .7); }

.legend .lg-hint {
	margin-left: 2px;
	padding-left: 13px;
	border-left: 1px solid var(--line);
	color: var(--ink-3);
	font-size: 10px;
	letter-spacing: .2px;
	white-space: nowrap;
}

/* ---------- 布局参数 ---------- */
.layout-box {
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 268px;
	border: 1px solid var(--line);
	background: rgba(8, 20, 33, .88);
	backdrop-filter: blur(8px);
	border-radius: var(--r);
	z-index: 5;
	overflow: hidden;
	transition: right .28s ease;
}
body.panel-open .layout-box { right: 400px; }

.lb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 12px;
	font-size: 12px;
	color: var(--ink-1);
	border-bottom: 1px solid var(--line);
	letter-spacing: .5px;
}
.lb-toggle {
	background: none;
	border: none;
	color: var(--ink-2);
	font-size: 11px;
	cursor: pointer;
	font-family: var(--font-ui);
}
.lb-toggle:hover { color: var(--cyan); }

.lb-body { padding: 10px 12px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lb-body.hide { display: none; }

.lb-body label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 11px;
	color: var(--ink-2);
}
.lb-body input {
	width: 100%;
	height: 28px;
	padding: 0 7px;
	color: var(--ink-0);
	background: rgba(6, 13, 24, .9);
	border: 1px solid var(--line);
	border-radius: var(--r);
	font-family: var(--font-num);
	font-size: 12px;
	outline: none;
}
.lb-body input:focus { border-color: var(--cyan); }

.lb-body select {
	width: 100%;
	height: 28px;
	padding: 0 4px;
	color: var(--ink-0);
	background: rgba(6, 13, 24, .9);
	border: 1px solid var(--line);
	border-radius: var(--r);
	font-family: var(--font-ui);
	font-size: 11px;
	outline: none;
	cursor: pointer;
}
.lb-body select:focus { border-color: var(--cyan); }
.lb-body label:last-of-type { grid-column: 1 / -1; }

.lb-actions { grid-column: 1 / -1; }
.lb-actions .btn { width: 100%; }

.lb-tip {
	grid-column: 1 / -1;
	font-size: 10px;
	line-height: 1.6;
	color: var(--ink-3);
}

/* ---------- 悬停提示 ---------- */
.tooltip {
	position: absolute;
	z-index: 8;
	pointer-events: none;
	opacity: 0;
	transform: translate(12px, 12px);
	transition: opacity .12s;
	max-width: 260px;
	padding: 7px 10px;
	background: rgba(4, 12, 21, .94);
	border: 1px solid var(--line-strong);
	border-left: 2px solid var(--cyan);
	border-radius: var(--r);
	font-size: 12px;
	line-height: 1.5;
	color: var(--ink-0);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.tooltip.show { opacity: 1; }
.tooltip .t-sub { color: var(--ink-2); font-size: 11px; }
.tooltip .t-over { color: var(--danger); }
.tooltip .t-pass { color: var(--ok); }

/* ---------- 数据面板 ---------- */
.panel {
	position: absolute;
	top: 62px;
	right: 0;
	bottom: 0;
	width: 380px;
	z-index: 15;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, rgba(10, 23, 39, .98), rgba(6, 13, 24, .98));
	border-left: 1px solid var(--line-strong);
	box-shadow: -18px 0 40px rgba(0, 0, 0, .45);
	transform: translateX(102%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.panel.open { transform: translateX(0); }

.pn-head {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 14px;
	border-bottom: 1px solid var(--line);
	background:
		linear-gradient(180deg, rgba(67, 211, 255, .08), transparent),
		repeating-linear-gradient(90deg, transparent 0 7px, rgba(67, 211, 255, .04) 7px 8px);
}
.pn-code {
	font-family: var(--font-num);
	font-size: 20px;
	letter-spacing: .5px;
	word-break: break-all;
	line-height: 1.25;
}
.pn-loc { margin-top: 6px; font-size: 12px; color: var(--ink-1); }

.pn-close {
	flex: 0 0 auto;
	width: 28px; height: 28px;
	display: grid; place-items: center;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--r);
	color: var(--ink-2);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.pn-close:hover { color: var(--danger); border-color: rgba(255, 71, 87, .5); }

.pn-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px 26px; }

/* 面板底部：上一台 / 下一台（逐台巡检） */
.pn-footbar {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 12px 18px;
	border-top: 1px solid var(--line);
	background: rgba(5, 12, 20, .55);
}
.pn-footbar .btn { flex: 1; padding: 8px 10px; }

.pn-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill {
	font-size: 11px;
	padding: 4px 9px;
	border-radius: 999px;
	border: 1px solid var(--line);
	color: var(--ink-1);
}
.pill.ok { color: var(--ok); border-color: rgba(23, 217, 138, .4); background: rgba(23, 217, 138, .1); }
.pill.over { color: var(--danger); border-color: rgba(255, 71, 87, .45); background: rgba(255, 71, 87, .1); }
.pill.pending { color: var(--warn); border-color: rgba(255, 176, 32, .4); background: rgba(255, 176, 32, .09); }
.pill.ghost { color: var(--ink-2); }

.pn-sec {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 18px 0 9px;
	font-size: 11px;
	letter-spacing: 1.2px;
	color: var(--cyan);
	font-family: var(--font-num);
}
.pn-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pn-sec:first-of-type { margin-top: 0; }

.kv { display: grid; grid-template-columns: 78px 1fr; gap: 8px 10px; font-size: 12.5px; }
.kv dt { color: var(--ink-2); }
.kv dd { color: var(--ink-0); word-break: break-all; }
.kv dd.num { font-family: var(--font-num); font-size: 15px; letter-spacing: .4px; }
.kv dd .unit { font-size: 10px; color: var(--ink-3); margin-left: 4px; font-family: var(--font-ui); }
.kv dd .sub { display: block; font-size: 10px; color: var(--ink-3); margin-top: 2px; }

.hist { width: 100%; border-collapse: collapse; font-size: 12px; }
.hist th {
	text-align: left;
	font-weight: 400;
	color: var(--ink-3);
	font-size: 10.5px;
	padding: 0 0 6px;
	border-bottom: 1px solid var(--line);
}
.hist td { padding: 6px 0; border-bottom: 1px solid rgba(120, 182, 228, .07); color: var(--ink-1); font-family: var(--font-num); }
.hist td.v-over { color: var(--danger); }
.hist td.v-pass { color: var(--ok); }

.empty-hint {
	padding: 26px 16px;
	text-align: center;
	font-size: 12px;
	color: var(--ink-3);
	border: 1px dashed var(--line);
	border-radius: var(--r);
	line-height: 1.8;
}

.photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-row img {
	width: 96px; height: 72px;
	object-fit: cover;
	border: 1px solid var(--line);
	border-radius: var(--r);
}

.pn-foot {
	margin-top: 20px;
	padding-top: 10px;
	border-top: 1px dashed var(--line);
	font-size: 10px;
	line-height: 1.7;
	color: var(--ink-3);
}

/* ---------- 加载态 ---------- */
.loading {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(6, 13, 24, .86);
	backdrop-filter: blur(3px);
	font-size: 13px;
	color: var(--ink-1);
	transition: opacity .25s;
}
.loading.hide { opacity: 0; pointer-events: none; }
.loading i {
	width: 30px; height: 30px;
	border: 2px solid rgba(67, 211, 255, .18);
	border-top-color: var(--cyan);
	border-radius: 50%;
	animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 减少动态效果偏好：关闭过渡与旋转，便于无动画环境/无障碍使用 */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* ---------- 中等宽度：顶栏按钮多，压缩副标题与内边距 ---------- */
@media (max-width: 1500px) {
	.tt p { display: none; }
	.topbar { padding: 0 12px; gap: 10px; }
	.tb-right { gap: 6px; }
	.btn { padding: 7px 9px; }
}

/* ---------- 图例与右下角面板可能挤在一起：先收起操作提示 ---------- */
@media (max-width: 1100px) {
	.legend .lg-hint { display: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
	.topbar { height: auto; flex: 0 0 auto; padding: 10px 12px; flex-wrap: wrap; gap: 10px; }
	.tt h1 { font-size: 15px; }
	.tt p { display: none; }
	.tb-right { width: 100%; overflow-x: auto; padding-bottom: 2px; }
	.panel { top: auto; left: 0; right: 0; width: auto; height: 62vh; border-left: none; border-top: 1px solid var(--line-strong); transform: translateY(102%); }
	.panel.open { transform: translateY(0); }
	body.panel-open .layout-box { right: 16px; }
	.stats { gap: 6px; right: 16px; flex-wrap: wrap; }
	.stat { min-width: 0; flex: 1; padding: 7px 8px; }
	.stat b { font-size: 17px; }
	.legend { display: none; }
	.layout-box { width: 224px; }
	.env-box { top: 132px; }
	.env-editor { width: 196px; }
}

/* ============================================================
 * 场地总览（两级视图：site / room）
 * ============================================================ */
.site-back { display: none; }
body.mode-room .site-back { display: inline-block; }

body.mode-site .stats,
body.mode-site .env-box,
body.mode-site .legend,
body.mode-site .layout-box,
body.mode-site .room-nav { display: none; }

.site-stats {
	position: absolute;
	left: 16px;
	top: 16px;
	z-index: 6;
	display: none;
	align-items: center;
	gap: 10px;
	padding: 9px 13px;
	border: 1px solid var(--line);
	border-left: 2px solid var(--cyan);
	background: rgba(8, 20, 33, .82);
	backdrop-filter: blur(6px);
	border-radius: var(--r);
	font-size: 12px;
	color: var(--ink-1);
}
body.mode-site .site-stats { display: flex; }
.site-stats b { color: var(--cyan); font-weight: 600; letter-spacing: .5px; }
.site-stats span { color: var(--ink-2); font-size: 11px; }
.site-stats em { color: var(--danger); font-style: normal; font-family: var(--font-num); }

.site-hint {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	z-index: 6;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 9px 16px;
	border: 1px solid var(--line);
	background: rgba(8, 20, 33, .82);
	backdrop-filter: blur(6px);
	border-radius: 999px;
	font-size: 11px;
	color: var(--ink-2);
	white-space: nowrap;
}
body.mode-site .site-hint { display: flex; }
.site-hint b { color: var(--cyan); font-weight: 600; letter-spacing: .5px; }
.site-hint .site-hint-keys { padding-left: 12px; border-left: 1px solid var(--line); color: var(--ink-3); }

.site-labels {
	position: absolute;
	inset: 0;
	z-index: 5;
	pointer-events: none;
	overflow: hidden;
}
.site-label {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	padding: 4px 8px 5px;
	transform: translate(-50%, -100%);
	pointer-events: auto;
	background: rgba(6, 13, 24, .84);
	border: 1px solid var(--line-strong);
	border-left: 2px solid var(--ink-3);
	border-radius: var(--r);
	color: var(--ink-0);
	font-family: var(--font-ui);
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	transition: border-color .16s, background .16s;
}
.site-label b { font-family: var(--font-num); font-size: 12px; line-height: 1.2; letter-spacing: .5px; }
.site-label i { font-style: normal; font-size: 10px; line-height: 1.3; color: var(--ink-2); }
.site-label .sl-short { display: none; }
.site-label:hover { border-color: var(--cyan); background: rgba(14, 32, 50, .94); box-shadow: 0 0 0 1px rgba(67, 211, 255, .35), 0 8px 22px rgba(0, 0, 0, .4); }
.site-label.ok { border-left-color: var(--ok); }
.site-label.over { border-left-color: var(--danger); }
.site-label.over b { color: var(--danger); }
.site-label.pending { border-left-color: var(--warn); }
.site-label.ghost { border-left-color: var(--ink-3); }
.site-label.entrance {
	border-color: rgba(23, 217, 138, .5);
	border-left-color: var(--ok);
	background: rgba(4, 22, 17, .9);
	cursor: default;
	/* 入口标签向锚点左上方展开，锚点在门楣外侧，避免压住门扇 */
	transform: translate(-100%, -100%);
}
.site-label.entrance b { color: #17D98A; }
/* 窄屏只留「场地入口」，不再重复一行「入口」 */
.site-label.entrance .sl-short { display: none; }
.site-label.entrance:hover {
	border-color: rgba(23, 217, 138, .8);
	background: rgba(6, 28, 22, .95);
	box-shadow: 0 0 0 1px rgba(23, 217, 138, .3), 0 8px 22px rgba(0, 0, 0, .4);
}

.mode-fade {
	position: absolute;
	inset: 0;
	z-index: 25;
	pointer-events: none;
	background: #050B12;
	opacity: 0;
	transition: opacity .22s ease;
}
.mode-fade.on { opacity: .85; }

/* 数据面板：门型设置 */
.door-pick { display: flex; gap: 6px; }
.door-btn {
	flex: 1;
	padding: 8px 4px;
	font-family: var(--font-ui);
	font-size: 11.5px;
	color: var(--ink-1);
	background: rgba(67, 211, 255, .04);
	border: 1px solid var(--line);
	border-radius: var(--r);
	cursor: pointer;
	transition: .16s;
}
.door-btn:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(67, 211, 255, .1); }
.door-btn.active {
	color: #04121C;
	background: var(--cyan);
	border-color: var(--cyan);
	font-weight: 600;
}
.door-note { margin-top: 7px; font-size: 10px; line-height: 1.65; color: var(--ink-3); }
.door-note b { color: var(--ink-1); font-weight: 500; }
.door-batch {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	padding-top: 8px;
	border-top: 1px dashed var(--line);
	font-size: 10px;
	color: var(--ink-3);
}
.door-batch span { margin-right: 2px; }
.door-batch button {
	padding: 4px 8px;
	font-family: var(--font-ui);
	font-size: 10px;
	color: var(--ink-2);
	background: rgba(6, 13, 24, .6);
	border: 1px solid var(--line);
	border-radius: var(--r);
	cursor: pointer;
}
.door-batch button:hover { color: var(--cyan); border-color: var(--line-strong); }

@media (max-width: 900px) {
	.site-hint {
		bottom: 10px;
		max-width: calc(100% - 20px);
		padding: 7px 12px;
		border-radius: 10px;
		white-space: normal;
		text-align: center;
		justify-content: center;
		font-size: 10px;
		line-height: 1.5;
	}
	.site-hint .site-hint-keys { display: none; }
	.site-stats { left: 12px; top: 12px; padding: 7px 10px; font-size: 11px; }
	.site-label { padding: 3px 6px 4px; gap: 0; }
	.site-label b { font-size: 11px; }
	.site-label i { font-size: 9px; }
	.site-label .sl-full { display: none; }
	.site-label .sl-short { display: block; }
}
