/* NORDLYS — UI styles. Dark glass, tabular numbers, accent colors carry meaning:
   cyan = data, amber = power, magenta→blue = thermal, green = healthy. */
:root {
	--bg: #05070b;
	--glass: rgba(11, 15, 22, 0.66);
	--glass-strong: rgba(9, 12, 18, 0.86);
	--stroke: rgba(255, 255, 255, 0.08);
	--stroke-2: rgba(255, 255, 255, 0.15);
	--text: #e8edf5;
	--muted: #8b95a7;
	--dim: #5b6576;
	--cyan: #3ee6ff;
	--amber: #ffb547;
	--magenta: #ff4fd8;
	--green: #3dffa2;
	--red: #ff3b4e;
	--blue: #4d8dff;
	--violet: #9b6bff;
	--radius: 14px;
	--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--top: 70px;
	--bottom: 100px;
}

* { box-sizing: border-box; }
html, body {
	margin: 0; height: 100%; overflow: hidden;
	background: var(--bg); color: var(--text);
	font-family: var(--font); font-size: 13px; line-height: 1.4;
	-webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
	user-select: none; -webkit-user-select: none;
	touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,0.05); color: var(--text); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }

.glass {
	background: var(--glass);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── loader ─────────────────────────────────────────────────────────────── */
#loader { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; background: radial-gradient(1200px 600px at 50% 60%, #0b1420 0%, #05070b 60%); transition: opacity 0.8s var(--ease); }
#loader.done { opacity: 0; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-mark { width: 54px; color: var(--cyan); filter: drop-shadow(0 0 14px rgba(62, 230, 255, 0.6)); }
.loader-title { font-size: 30px; letter-spacing: 0.42em; font-weight: 200; margin-top: 14px; padding-left: 0.42em; }
.loader-title span { color: var(--magenta); }
.loader-sub { color: var(--muted); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; margin-top: 6px; }
.loader-bar { width: 280px; height: 2px; background: rgba(255, 255, 255, 0.07); margin: 26px auto 0; border-radius: 2px; overflow: hidden; }
.loader-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width 0.4s var(--ease); box-shadow: 0 0 12px var(--cyan); }
.loader-step { color: var(--muted); font-size: 12px; margin-top: 14px; min-height: 18px; }
.loader-step code { font-family: var(--mono); color: var(--cyan); }
/* design credit */
.credit { color: var(--dim); font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em; text-decoration: none; transition: color 0.2s; }
.credit:hover, .credit:focus-visible { color: var(--cyan); }
.loader-credit { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap; padding-left: 0.22em; }
.w-credit { margin-top: 14px; text-align: right; }
.help-credit { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--stroke); text-align: right; }

/* ── labels (3D-projected) ─────────────────────────────────────────────── */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.zlabel {
	position: absolute; left: 0; top: 0; pointer-events: auto; text-align: center; white-space: nowrap;
	padding: 5px 10px 6px; border-radius: 9px; background: rgba(8, 12, 18, 0.6); border: 1px solid var(--stroke);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity 0.25s, background 0.2s; will-change: transform;
}
.zlabel::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 1px; height: 6px; background: rgba(255, 255, 255, 0.35); }
.zlabel b { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.zlabel span { display: block; font-size: 10px; color: var(--muted); }
.zlabel:hover { background: rgba(62, 230, 255, 0.16); border-color: rgba(62, 230, 255, 0.4); }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 6px; will-change: transform; }
.pin span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 59, 78, 0.6); animation: pulse 1.4s infinite; }
.pin.warn span { background: var(--amber); color: #1a1205; animation-name: pulseA; }
.pin em { font-style: normal; font-size: 11px; background: rgba(8, 12, 18, 0.8); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--stroke); opacity: 0; transition: opacity 0.2s; }
.pin:hover em { opacity: 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0.6); } 70% { box-shadow: 0 0 0 12px rgba(255, 59, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); } }
@keyframes pulseA { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0.6); } 70% { box-shadow: 0 0 0 12px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }
.sellabel { position: absolute; left: 0; top: 0; pointer-events: none; text-align: center; padding: 4px 10px; border-radius: 8px; background: rgba(62, 230, 255, 0.14); border: 1px solid rgba(62, 230, 255, 0.45); white-space: nowrap; }
.sellabel b { display: block; font-size: 12px; }
.sellabel span { display: block; font-size: 10px; color: var(--muted); }
.sellabel span:empty { display: none; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none !important; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(8, 12, 18, 0.6); border: 1px solid var(--stroke); }
.logo svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(62, 230, 255, 0.6)); }
.brand-name { font-size: 15px; font-weight: 300; letter-spacing: 0.32em; }
.brand-name span { color: var(--magenta); }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; white-space: nowrap; }
.btn-tour, .clock-text, .icon-btn { white-space: nowrap; }
.clock { display: flex; align-items: center; gap: 12px; padding: 5px 8px 5px 16px; border-radius: 999px; }
.clock-text { display: flex; align-items: baseline; gap: 8px; }
.clock .date { color: var(--muted); font-size: 12px; }
.clock .time { font-size: 17px; font-weight: 500; min-width: 74px; letter-spacing: 0.02em; }
.clock .site { color: var(--muted); font-size: 11px; padding-left: 8px; border-left: 1px solid var(--stroke); }
.wx { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 8px; border-left: 1px solid var(--stroke); color: #cfd8e4; font-size: 12px; }
.wx b { font-weight: 500; }
.wx:hover { color: var(--cyan); }
.wx.aurora { color: #6dffb0; text-shadow: 0 0 10px rgba(61, 255, 143, 0.7); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); margin-right: 6px; animation: blink 2s infinite; }
body.paused .live { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: none; }
@keyframes blink { 50% { opacity: 0.35; } }
.seg { display: inline-flex; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); border-radius: 999px; padding: 2px; gap: 1px; }
.seg button { height: 26px; min-width: 34px; padding: 0 9px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 500; transition: background 0.2s, color 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.seg button.on { background: rgba(62, 230, 255, 0.16); color: var(--cyan); }
.seg.small button { height: 26px; font-size: 11.5px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; height: 36px; min-width: 36px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; background: var(--glass); border: 1px solid var(--stroke); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 0.2s, background 0.2s; }
.icon-btn:hover { border-color: var(--stroke-2); background: rgba(30, 38, 52, 0.7); }
.icon-btn.on { color: var(--cyan); border-color: rgba(62, 230, 255, 0.4); }
.icon-btn.q span { font-size: 11.5px; color: var(--muted); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--amber); color: #1b1203; font-size: 10px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.badge.show { display: inline-flex; }
.badge.crit { background: var(--red); color: #fff; animation: pulse 1.4s infinite; }
.btn-tour {
	position: relative; height: 36px; padding: 0 16px 0 13px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
	font-weight: 600; font-size: 12.5px; letter-spacing: 0.01em; color: #031015;
	background: linear-gradient(100deg, #3ee6ff 0%, #7fd7ff 45%, #ff7fe4 100%);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 6px 24px rgba(62, 230, 255, 0.35);
	transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-tour:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 10px 32px rgba(62, 230, 255, 0.5); }
.btn-tour.lg { height: 48px; padding: 0 22px 0 18px; font-size: 14px; }
.btn-tour em { font-style: normal; font-weight: 500; opacity: 0.6; font-size: 12px; }
.ghost { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--stroke-2); color: var(--text); display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s; }
.ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* ── dock ─────────────────────────────────────────────────────────────── */
.dock { position: fixed; left: 12px; top: var(--top); width: 70px; display: flex; flex-direction: column; align-items: center; padding: 8px 6px; gap: 2px; max-height: calc(100vh - var(--top) - var(--bottom) - 8px); overflow-y: auto; scrollbar-width: none; }
.dock::-webkit-scrollbar { display: none; }
.dock-title { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dim); margin: 4px 0 3px; }
.dock-sep { width: 36px; height: 1px; background: var(--stroke); margin: 6px 0; flex: none; }
.dock-btn { position: relative; width: 58px; height: 48px; flex: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); transition: background 0.2s, color 0.2s; }
.dock-btn span:last-child { font-size: 9.5px; letter-spacing: 0.02em; }
.dock-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.dock-btn.on { background: rgba(62, 230, 255, 0.13); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(62, 230, 255, 0.25); }
.dock-btn.on::before { content: ''; position: absolute; left: -6px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
[data-tip]:hover::after {
	content: attr(data-tip); position: fixed; left: 92px; transform: translateY(-50%); margin-top: 0;
	background: var(--glass-strong); border: 1px solid var(--stroke-2); padding: 6px 10px; border-radius: 8px; font-size: 11.5px; color: var(--text);
	white-space: nowrap; pointer-events: none; z-index: 50; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.dock-btn[data-tip]:hover::after { top: auto; }

/* ── inspector ─────────────────────────────────────────────────────────── */
.inspector { position: fixed; right: 12px; top: var(--top); bottom: var(--bottom); width: 352px; display: flex; flex-direction: column; overflow: hidden; transition: transform 0.4s var(--ease), opacity 0.3s; }
.ins-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--stroke); }
.ins-head h2 { margin: 2px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.ins-head .sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.head-btns { display: flex; gap: 6px; }
.head-btns .icon-btn { height: 30px; min-width: 30px; }
.kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--cyan); }
.ins-scroll { flex: 1; overflow-y: auto; padding: 12px 18px 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.ins-scroll section { margin-top: 16px; }
.ins-scroll h4 { margin: 0 0 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ins-scroll h4 .hint { text-transform: none; letter-spacing: 0; color: var(--dim); font-weight: 400; font-size: 10.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip.ok { color: var(--green); background: rgba(61, 255, 162, 0.1); }
.chip.warn { color: var(--amber); background: rgba(255, 181, 71, 0.12); }
.chip.crit { color: #ff6b7a; background: rgba(255, 59, 78, 0.14); }
.chip.idle { color: #a9b6c8; background: rgba(169, 182, 200, 0.1); }
.bigs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.big { padding: 9px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--stroke); }
.big > span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.big b { font-size: 17px; font-weight: 600; display: inline-block; margin-top: 2px; }
.big i { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 3px; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.m { padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); min-width: 0; }
.m .ml { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m .mv { font-size: 15px; font-weight: 600; }
.m i { font-style: normal; color: var(--muted); font-size: 10.5px; margin-left: 4px; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.05); gap: 2px; }
.stack .sb { height: 100%; border-radius: 3px; transition: width 0.4s var(--ease); }
.stack-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.stack-legend div { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); min-width: 0; }
.stack-legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.stack-legend span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-legend b { color: var(--text); font-weight: 500; }
canvas.chart { display: block; width: 100%; border-radius: 8px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--stroke); }
canvas.gpugrid { display: block; border-radius: 8px; }
.jobs { display: flex; flex-direction: column; gap: 6px; }
.job { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); text-align: left; }
.job:hover { border-color: var(--stroke-2); }
.job i { width: 8px; height: 26px; border-radius: 3px; flex: none; }
.job div { flex: 1; min-width: 0; }
.job b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job span { font-size: 10.5px; color: var(--muted); }
.job em { font-style: normal; font-size: 11.5px; color: var(--cyan); white-space: nowrap; }
.zones { display: flex; flex-wrap: wrap; gap: 6px; }
.zone { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--stroke); font-size: 11.5px; color: var(--muted); transition: all 0.2s; }
.zone:hover { color: var(--text); border-color: rgba(62, 230, 255, 0.4); background: rgba(62, 230, 255, 0.08); }
.alarms { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.alarms:empty { display: none; }
.alarm { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); }
.alarm .sev, .ev .sev, .toast .sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--cyan); box-shadow: 0 0 8px currentColor; color: var(--cyan); }
.alarm.crit { border-color: rgba(255, 59, 78, 0.35); background: rgba(255, 59, 78, 0.08); }
.alarm.crit .sev, .ev.crit .sev, .toast.crit .sev { background: var(--red); color: var(--red); }
.alarm.warn .sev, .ev.warn .sev, .toast.warn .sev { background: var(--amber); color: var(--amber); }
.alarm b { display: block; font-size: 12px; }
.alarm span { font-size: 11px; color: var(--muted); }
.desc { color: #b4bfcd; font-size: 12px; line-height: 1.55; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.act { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--stroke-2); display: inline-flex; align-items: center; gap: 7px; font-size: 12px; transition: all 0.2s; }
.act:hover { background: rgba(255, 255, 255, 0.06); }
.act.primary { border-color: rgba(62, 230, 255, 0.45); color: var(--cyan); background: rgba(62, 230, 255, 0.08); }
.act.danger { border-color: rgba(255, 59, 78, 0.4); color: #ff7a87; }
.act.danger:hover { background: rgba(255, 59, 78, 0.12); }
.act.wide { width: 100%; justify-content: center; margin-top: 12px; }

/* ── KPI bar ─────────────────────────────────────────────────────────── */
.kpibar { position: fixed; left: 12px; right: 12px; bottom: 12px; height: 76px; display: flex; align-items: stretch; padding: 6px; gap: 4px; }
.kpi { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 4px 10px 4px 12px; border-radius: 10px; text-align: left; position: relative; transition: background 0.2s; }
.kpi:hover { background: rgba(255, 255, 255, 0.05); }
.kpi::before { content: ''; position: absolute; left: 3px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--c); opacity: 0.85; box-shadow: 0 0 8px var(--c); }
.kpi .l { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; }
.kpi .row { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.kpi .v { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.kpi .v i { font-style: normal; color: var(--muted); font-weight: 400; margin: 0 2px; }
.kpi .s { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.kpi .spark { margin-top: 2px; opacity: 0.9; }

/* ── control center drawer ───────────────────────────────────────────── */
.drawer { position: fixed; left: 92px; top: var(--top); bottom: var(--bottom); width: 400px; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateX(-16px); pointer-events: none !important; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); background: var(--glass-strong); }
.drawer.open { opacity: 1; transform: none; pointer-events: auto !important; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.drawer-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.drawer-head .icon-btn { height: 30px; min-width: 30px; }
.tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--stroke); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 9px 10px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--cyan); border-bottom-color: var(--cyan); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.pane { display: none; }
.pane.show { display: block; }
.pane-intro { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 0; }
.pane h5 { margin: 18px 0 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.scn-list { display: flex; flex-direction: column; gap: 8px; }
.scn { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); transition: border-color 0.3s, background 0.3s; }
.scn.active { border-color: rgba(255, 181, 71, 0.5); background: rgba(255, 181, 71, 0.07); }
.scn-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: var(--amber); flex: none; }
.scn-body { flex: 1; min-width: 0; }
.scn-body b { font-size: 13px; }
.scn-body p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.scn-bar { height: 2px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; margin-top: 8px; overflow: hidden; display: none; }
.scn.active .scn-bar { display: block; }
.scn-bar div { height: 100%; background: var(--amber); width: 0; }
.scn-run { height: 30px; min-width: 66px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--stroke-2); font-size: 12px; font-weight: 600; flex: none; transition: all 0.2s; }
.scn-run:hover { background: rgba(255, 181, 71, 0.15); border-color: rgba(255, 181, 71, 0.5); color: var(--amber); }
.scn.active .scn-run { background: var(--amber); color: #1b1203; border-color: var(--amber); }
.knob { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.knob-l span { display: block; font-size: 12.5px; }
.knob-l i { display: block; font-style: normal; font-size: 10.5px; color: var(--dim); }
.slider { display: flex; align-items: center; gap: 8px; }
.slider output { min-width: 48px; text-align: right; font-size: 12px; color: var(--cyan); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 130px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(62, 230, 255, 0.35); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 0 0 3px rgba(62, 230, 255, 0.35); }
.switch { width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.25s; flex: none; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #dfe6ef; transition: transform 0.25s var(--ease); }
.switch.on { background: rgba(62, 230, 255, 0.7); }
.switch.on span { transform: translateX(16px); background: #fff; }
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.knob.col { flex-direction: column; align-items: stretch; gap: 8px; }
.wx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.wx-grid button { height: 28px; border-radius: 8px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 11.5px; transition: all 0.2s; }
.wx-grid button:hover { color: var(--text); border-color: var(--stroke-2); }
.wx-grid button.on { color: var(--cyan); border-color: rgba(62, 230, 255, 0.45); background: rgba(62, 230, 255, 0.1); }
.wx-now { font-size: 11px; color: var(--dim); padding: 2px 0 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.site { text-align: left; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.03); transition: all 0.2s; }
.site b { display: block; font-size: 12.5px; }
.site span { font-size: 10.5px; color: var(--muted); }
.site:hover { border-color: var(--stroke-2); }
.site.on { border-color: rgba(62, 230, 255, 0.5); background: rgba(62, 230, 255, 0.08); }
.jobcard { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); margin-top: 10px; }
.jhead { display: flex; align-items: center; gap: 10px; }
.jhead i { width: 6px; height: 30px; border-radius: 3px; flex: none; }
.jhead > div { flex: 1; min-width: 0; }
.jhead b { display: block; font-size: 12.5px; }
.jhead span { font-size: 10.5px; color: var(--muted); }
.jstate { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: rgba(61, 255, 162, 0.1); color: var(--green); white-space: nowrap; }
.jstate.warn { background: rgba(255, 181, 71, 0.12); color: var(--amber); }
.jstate.info { background: rgba(155, 107, 255, 0.14); color: #c3a8ff; }
.jrow { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.jrow b { color: var(--text); font-weight: 500; }
.jprog { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); margin-top: 8px; overflow: hidden; }
.jprog div { height: 100%; background: var(--cyan); transition: width 0.5s; }
.sched { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.events { display: flex; flex-direction: column; margin-top: 10px; }
.ev { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 11.5px; }
.ev:hover { background: rgba(255, 255, 255, 0.03); }
.ev time { color: var(--dim); font-family: var(--mono); font-size: 11px; flex: none; }
.ev .sev { margin-top: 5px; }
.alarm-now { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

/* ── toasts, hints, legend, follow ────────────────────────────────────── */
.toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); width: 400px; display: flex; flex-direction: column; gap: 8px; pointer-events: none !important; z-index: 30; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--stroke-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(-8px) scale(0.98); transition: all 0.35s var(--ease); cursor: pointer; }
.toast.in { opacity: 1; transform: none; }
.toast.crit { border-color: rgba(255, 59, 78, 0.5); }
.toast.warn { border-color: rgba(255, 181, 71, 0.45); }
.toast .tt { font-size: 12.5px; font-weight: 600; }
.toast .td { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.hint { position: fixed; left: 50%; bottom: calc(var(--bottom) + 10px); transform: translate(-50%, 8px); padding: 8px 16px; border-radius: 999px; font-size: 12px; color: #c9d3e0; opacity: 0; transition: all 0.4s var(--ease); pointer-events: none !important; white-space: nowrap; }
.hint.show { opacity: 1; transform: translate(-50%, 0); }
.crosshair { position: fixed; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 50%; opacity: 0; pointer-events: none !important; transition: opacity 0.3s; }
.crosshair::after { content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #fff; }
.crosshair.show { opacity: 1; }
.legend { position: fixed; left: 92px; bottom: calc(var(--bottom) + 8px); width: 236px; padding: 10px 12px; opacity: 0; transform: translateY(6px); transition: all 0.4s var(--ease); pointer-events: none !important; }
.legend.show { opacity: 1; transform: none; }
.legend .lt { font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.legend .grad { height: 8px; border-radius: 4px; }
.grad.thermal { background: linear-gradient(90deg, #1d4dff, #2fb4ff 25%, #8a4dff 45%, #ff3fd2 65%, #ff6a3d 85%, #fff1b0); }
.grad.amber { background: linear-gradient(90deg, rgba(255, 181, 71, 0.1), #ffb547); }
.grad.cyan { background: linear-gradient(90deg, rgba(62, 230, 255, 0.1), #3ee6ff); }
.legend .lr { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.legend .ln { font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.legend .jobs { gap: 4px; }
.legend .job { padding: 0; background: none; border: 0; font-size: 11px; color: #c8d1dd; }
.legend .job i { width: 10px; height: 10px; border-radius: 3px; }
.scalebar { position: fixed; right: 380px; bottom: calc(var(--bottom) + 12px); display: none; align-items: center; gap: 8px; color: #cfe8ff; font-size: 11px; pointer-events: none !important; }
.scalebar.show { display: flex; }
.scalebar .bar { width: 80px; height: 6px; border: 1.5px solid #cfe8ff; border-top: 0; }
.scalebar .north { color: var(--cyan); margin-left: 14px; }
.scalebar b { font-weight: 700; }
.follow { position: fixed; left: 50%; bottom: calc(var(--bottom) + 10px); transform: translate(-50%, 12px); width: min(620px, calc(100vw - 32px)); padding: 12px 14px; opacity: 0; pointer-events: none !important; transition: all 0.45s var(--ease); --c: #3ee6ff; }
.follow.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.fchips { display: flex; gap: 6px; }
.chip { cursor: default; }
.fchips .chip { cursor: pointer; height: 28px; background: rgba(255, 255, 255, 0.05); color: var(--muted); gap: 6px; }
.fchips .chip::before { display: none; }
.fchips .chip.on { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.fbody { margin-top: 10px; min-height: 44px; }
.ft { font-size: 17px; font-weight: 600; }
.fs { font-size: 12px; color: var(--muted); margin-top: 2px; }
.follow.pop .fbody { animation: fpop 0.6s var(--ease); }
@keyframes fpop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fbar { height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.fbar div { height: 100%; background: var(--c); box-shadow: 0 0 10px var(--c); width: 0; }
.fctl { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.fctl .icon-btn { height: 28px; min-width: 28px; font-size: 11.5px; }

/* ── welcome ────────────────────────────────────────────────────────── */
.welcome { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(540px, calc(100vw - 32px)); padding: 30px 32px 24px; opacity: 0; transition: all 0.7s var(--ease); background: rgba(9, 13, 20, 0.78); z-index: 40; }
.welcome.show { opacity: 1; transform: translate(-50%, -50%); }
.w-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--cyan); }
.welcome h1 { margin: 6px 0 10px; font-size: 40px; font-weight: 200; letter-spacing: 0.3em; }
.welcome h1 span { color: var(--magenta); }
.welcome p { color: #b9c4d2; font-size: 13.5px; line-height: 1.6; margin: 0 0 22px; }
.w-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.w-tips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: 11.5px; }

/* ── challenges ─────────────────────────────────────────────────────── */
.icon-btn.challenges span { font-size: 12px; color: #e9d9a8; }
.icon-btn.challenges .ic { color: #ffcf70; }
.m-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(2, 4, 8, 0.55); opacity: 0; pointer-events: none !important; transition: opacity 0.3s; z-index: 55; }
.m-overlay.show { opacity: 1; pointer-events: auto !important; }
.m-modal { position: relative; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; padding: 26px 28px 22px; background: rgba(9, 13, 20, 0.92); transform: translateY(8px); transition: transform 0.4s var(--ease); }
.m-overlay.show .m-modal { transform: none; }
.m-modal.brief, .m-modal.result { width: min(560px, calc(100vw - 32px)); }
.m-modal h2 { margin: 4px 0 8px; font-size: 26px; font-weight: 300; letter-spacing: 0.02em; }
.m-modal h4 { margin: 18px 0 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.m-modal .lede { color: #b9c4d2; line-height: 1.55; margin: 0; }
.m-modal .close { position: absolute; top: 14px; right: 14px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.m-card { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); transition: border-color 0.2s; }
.m-card:hover { border-color: var(--stroke-2); }
.m-card-top { display: flex; align-items: center; gap: 8px; }
.m-card .chip::before { display: none; }
.m-place { font-size: 11px; color: var(--muted); }
.m-card h3 { margin: 10px 0 4px; font-size: 17px; font-weight: 600; }
.m-card p { margin: 0 0 12px; font-size: 12px; color: #aab5c4; line-height: 1.5; flex: 1; }
.m-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-best { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e9d9a8; }
.m-best.none { color: var(--dim); }
.stars { display: inline-flex; gap: 2px; color: rgba(255, 255, 255, 0.14); }
.stars span.on { color: #ffcf70; filter: drop-shadow(0 0 6px rgba(255, 207, 112, 0.6)); }
.m-best .stars .ic svg { width: 15px; height: 15px; }
.m-total { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: right; }
.m-obj, .m-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.m-obj li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.m-obj li .ic { color: var(--cyan); }
.m-obj li span:not(.ic) { flex: 1; }
.m-obj li .ic { flex: none; }
.m-obj li b { font-weight: 500; color: #e9d9a8; font-size: 12.5px; }
.m-tips li { font-size: 12.5px; color: #aab5c4; padding-left: 16px; position: relative; line-height: 1.45; }
.m-tips li::before { content: '›'; position: absolute; left: 3px; color: var(--amber); }
.m-time { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.m-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.m-modal.result { text-align: center; }
.m-modal.result .kicker { color: var(--muted); }
.m-modal.result.won h2 { color: #c9ffe2; }
.m-modal.result.lost h2 { color: #ffb3bb; }
.m-modal.result .stars { margin: 6px 0 4px; }
.m-modal.result .stars .ic svg { width: 34px; height: 34px; }
.m-score { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.m-score b { font-size: 44px; font-weight: 200; }
.m-score span { color: var(--muted); }
.m-score em { font-style: normal; font-size: 12px; color: #1b1203; background: #ffcf70; padding: 2px 8px; border-radius: 999px; }
.m-score i { font-style: normal; font-size: 12px; color: var(--muted); }
.m-fail { color: #ffb3bb; margin: 8px 0 0; }
.m-modal.result .m-actions { justify-content: center; }
.m-rows { display: flex; flex-direction: column; gap: 4px; }
.m-rows.final { margin-top: 16px; text-align: left; }
.m-row { display: grid; grid-template-columns: 12px 1fr auto 64px; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); font-size: 12px; }
.m-row .m-st { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.m-row.ok .m-st { background: var(--green); box-shadow: 0 0 8px var(--green); }
.m-row.bad .m-st { background: var(--red); box-shadow: 0 0 8px var(--red); }
.m-row.bad { background: rgba(255, 59, 78, 0.1); }
.m-row b { font-weight: 600; font-size: 12.5px; }
.m-row .m-t { color: var(--muted); font-size: 11px; text-align: right; }
.m-hud { position: fixed; left: 50%; top: 66px; transform: translate(-50%, -8px); width: min(440px, calc(100vw - 24px)); padding: 10px 12px; opacity: 0; pointer-events: none !important; transition: all 0.4s var(--ease); z-index: 25; background: rgba(9, 13, 20, 0.86); }
.m-hud.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.m-head { display: flex; align-items: center; gap: 8px; }
.m-head > .ic { color: #ffcf70; }
.m-head b { font-size: 13px; }
.m-head .chip { height: 20px; font-size: 10.5px; }
.m-head .chip::before { display: none; }
.m-head .m-time-left { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.m-head .icon-btn { height: 26px; min-width: 26px; padding: 0 5px; }
.m-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); margin: 8px 0; overflow: hidden; }
.m-bar div { height: 100%; width: 0; background: linear-gradient(90deg, #ffcf70, #ff4fd8); }
.m-hud .m-tips { display: none; margin-top: 8px; }
.m-hud.tips .m-tips { display: flex; }
body.mission .toasts { top: 250px; }

/* ── help ──────────────────────────────────────────────────────────── */
.help-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(2, 4, 8, 0.55); opacity: 0; pointer-events: none !important; transition: opacity 0.3s; z-index: 60; }
.help-overlay.show { opacity: 1; pointer-events: auto !important; }
.help { position: relative; width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 28px 30px; background: rgba(9, 13, 20, 0.92); user-select: text; -webkit-user-select: text; }
.help h2 { margin: 0 0 8px; font-weight: 300; letter-spacing: 0.08em; font-size: 24px; }
.help h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--cyan); margin: 18px 0 10px; }
.help .lede { color: #b9c4d2; line-height: 1.6; margin: 0; max-width: 760px; }
.help .close { position: absolute; top: 16px; right: 16px; }
.help-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 12.5px; }
.keys dt { font-family: var(--mono); color: var(--text); font-size: 11.5px; white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }
.notes { margin: 0; padding-left: 16px; color: #b4bfcd; font-size: 12.5px; line-height: 1.55; }
.notes li { margin-bottom: 7px; }
.notes b { color: var(--text); }

/* ── tour ───────────────────────────────────────────────────────────── */
.tour { position: fixed; inset: 0; pointer-events: none !important; opacity: 0; transition: opacity 0.6s; z-index: 20; }
.tour.on { opacity: 1; }
.tour .lb { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height 1.2s var(--ease); }
.tour.on .lb { height: 9.5vh; }
.tour .lb.top { top: 0; }
.tour .lb.bot { bottom: 0; }
.t-card { position: absolute; left: 7vw; top: 30vh; max-width: 70vw; opacity: 0; transform: translateY(12px); transition: all 1.1s var(--ease); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7); }
.t-card.show { opacity: 1; transform: none; }
.t-kicker { font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--cyan); }
.t-title { font-size: clamp(30px, 4.6vw, 64px); font-weight: 200; letter-spacing: 0.02em; margin-top: 8px; white-space: nowrap; }
.t-card.hero { left: 50%; top: 36vh; transform: translate(-50%, 12px); text-align: center; }
.t-card.hero.show { transform: translate(-50%, 0); }
.t-card.hero { max-width: none; }
.t-card.hero .t-title { font-size: clamp(40px, 6.4vw, 96px); letter-spacing: 0.3em; padding-left: 0.3em; }
.t-caption { position: absolute; left: 50%; bottom: calc(9.5vh + 54px); transform: translate(-50%, 8px); max-width: min(900px, 86vw); text-align: center; font-size: clamp(15px, 1.6vw, 21px); font-weight: 400; color: #f2f6fb; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9); opacity: 0; transition: all 0.8s var(--ease); }
.t-caption.show { opacity: 1; transform: translate(-50%, 0); }
.t-bar { position: absolute; left: 50%; bottom: calc(9.5vh - 46px); transform: translateX(-50%); width: min(820px, 92vw); display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.t-bar .icon-btn { height: 30px; min-width: 30px; background: rgba(255, 255, 255, 0.06); border-color: transparent; }
.t-ticks { flex: 1; display: flex; gap: 4px; align-items: center; }
.tick { height: 18px; display: flex; align-items: center; }
.tick div { height: 3px; width: 0; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 8px var(--cyan); }
.tick { background: linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)) center / 100% 3px no-repeat; border-radius: 2px; }
.tick.done div { width: 100% !important; opacity: 0.6; box-shadow: none; }
.t-exit { height: 30px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 8px; }
.t-exit:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.t-end { position: absolute; left: 50%; top: 58vh; transform: translateX(-50%); display: flex; gap: 12px; opacity: 0; transition: opacity 0.8s; pointer-events: none; }
.t-end.show { opacity: 1; pointer-events: auto; }
body.touring .topbar, body.touring .dock, body.touring .inspector, body.touring .kpibar, body.touring .legend, body.touring .drawer, body.touring .hint, body.touring .follow, body.touring .scalebar { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.6s; }
.topbar, .dock, .inspector, .kpibar { transition: opacity 0.6s; }

/* ── video recording ────────────────────────────────────────────────── */
.icon-btn.rec .ic { color: #ff6b7a; }
body.recording .icon-btn.rec .ic { animation: recPulse 1.2s infinite; }
.rec-ind { position: fixed; top: calc(4.75vh - 15px); right: 22px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; display: flex; align-items: center; gap: 8px; background: rgba(20, 4, 8, 0.7); border: 1px solid rgba(255, 59, 78, 0.45); color: #ffd5da; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; z-index: 30; opacity: 0; transform: translateY(-8px); transition: all 0.4s var(--ease); pointer-events: none !important; }
.rec-ind b { font-weight: 500; letter-spacing: 0.02em; color: #fff; min-width: 36px; }
.rec-ind .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: recPulse 1.2s infinite; }
.rec-ind button { height: 22px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 11px; letter-spacing: 0.02em; font-weight: 500; color: #fff; }
.rec-ind button:hover { background: rgba(255, 59, 78, 0.45); }
body.recording .rec-ind { opacity: 1; transform: none; pointer-events: auto !important; }
@keyframes recPulse { 50% { opacity: 0.35; } }
.rec-done { position: fixed; left: 50%; top: 84px; transform: translate(-50%, -10px); display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; opacity: 0; transition: all 0.4s var(--ease); z-index: 70; pointer-events: none !important; max-width: calc(100vw - 32px); }
.rec-done.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.rec-done > .ic { color: var(--red); flex: none; }
.rec-done div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-done div b { font-weight: 600; }
.rec-done div span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-done a { text-decoration: none; flex: none; }
.help-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.help-acts .ghost { height: 34px; font-size: 12px; }
.help-acts .ghost .ic { color: var(--cyan); }
.help-note { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 10px 0 0; }
.help-note code { font-family: var(--mono); font-size: 11px; color: var(--text); background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 4px; }

/* ── kiosk / attract loop ───────────────────────────────────────────── */
body.attract, body.attract * { cursor: none !important; }
body.attract .t-bar, body.attract .t-end, body.attract .toasts, body.attract .m-hud { display: none !important; }
.attract-hint { position: fixed; left: 0; right: 0; bottom: 0; height: 9.5vh; padding: 0 16px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 22px; z-index: 25; opacity: 0; transition: opacity 1.2s; pointer-events: none !important; }
body.attract .attract-hint { opacity: 1; }
.ah-brand { font-size: 12px; font-weight: 600; letter-spacing: 0.42em; color: rgba(232, 237, 245, 0.55); }
.ah-cta { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); animation: ahPulse 2.6s ease-in-out infinite; }
@keyframes ahPulse { 50% { opacity: 0.35; } }

/* mode-specific chrome */
body[data-mode="walk"] .inspector:not(.comp) { opacity: 0; pointer-events: none !important; transform: translateX(20px); }
body[data-mode="blueprint"] .kpibar { opacity: 0.92; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1360px) {
	.icon-btn.q span, .clock .site { display: none; }
}
@media (max-width: 1280px) {
	.kpi .spark { display: none; }
	.kpibar { height: 58px; }
	:root { --bottom: 82px; }
}
@media (max-width: 1100px) {
	.kpi:nth-child(n+8) { display: none; }
	.clock .date, .clock .site { display: none; }
	.inspector { width: 320px; }
	.scalebar { right: 345px; }
}
@media (max-width: 860px) {
	:root { --top: 66px; --bottom: 146px; }
	.brand-sub, .topbar .btn-tour span, .icon-btn.q span { display: none; }
	.btn-tour { padding: 0 11px; }
	.topbar { gap: 6px; }
	.clock { padding-left: 10px; gap: 6px; }
	.clock .time { font-size: 14px; min-width: 62px; }
	.seg button { min-width: 28px; padding: 0 6px; }
	.top-actions { gap: 5px; }
	.top-actions .icon-btn.rec, .top-actions .icon-btn:nth-of-type(n+5) { display: none; }
	.kpi:nth-child(n+5) { display: none; }
	.dock { top: auto; bottom: 78px; left: 12px; right: 12px; width: auto; height: 62px; flex-direction: row; padding: 6px; overflow-x: auto; max-height: none; }
	.dock-title { display: none; }
	.dock-sep { width: 1px; height: 36px; margin: 0 4px; }
	.dock-btn.on::before { display: none; }
	[data-tip]:hover::after { display: none; }
	.inspector { left: 12px; right: 12px; width: auto; top: auto; bottom: 150px; height: 46vh; transform: translateY(20px); opacity: 0; pointer-events: none !important; }
	.inspector.comp { transform: none; opacity: 1; pointer-events: auto !important; }
	.drawer { left: 12px; right: 12px; width: auto; bottom: 150px; }
	.legend { left: 12px; bottom: 152px; }
	.toasts { width: calc(100vw - 24px); }
	.help-cols { grid-template-columns: 1fr; }
	.m-grid { grid-template-columns: 1fr; }
	.icon-btn.challenges span { display: none; }
	.t-card { left: 6vw; }
}
@media (max-width: 520px) {
	.brand > div:last-child { display: none; }
	.logo { width: 34px; height: 34px; }
	.topbar { left: 8px; right: 8px; gap: 6px; }
	.clock { padding: 4px 6px 4px 10px; gap: 4px; }
	.clock .time { font-size: 13px; min-width: 58px; }
	.speed button:nth-child(n+4) { display: none; }
	.live { display: none; }
	.top-actions .icon-btn:not(.challenges) { display: none; }
	.top-actions .btn-tour { height: 34px; padding: 0 12px; }
	.kpi .v { font-size: 15px; }
	.welcome { padding: 22px 20px 18px; }
	.welcome h1 { font-size: 30px; }
	.btn-tour.lg { height: 44px; padding: 0 16px; font-size: 13px; }
	.ah-brand { display: none; }
	.ah-cta { font-size: 12px; letter-spacing: 0.16em; }
	.rec-done { top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
