/* Unified Model Visualizer — scoped styles */
.umv-widget {
	--umv-bg: #0b1524;
	--umv-panel: #101e31;
	--umv-border: rgba(190, 211, 238, .16);
	--umv-text: #eaf1fb;
	--umv-muted: #a9bad0;
	--umv-gold: #f3c969;
	--umv-blue: #65c8ef;
	--umv-purple: #c5a4ff;
	--umv-green: #8de0b7;
	--umv-red: #ff977b;
	color: var(--umv-text);
	background: linear-gradient(145deg, #0b1524, #11243a);
	border: 1px solid var(--umv-border);
	border-radius: 18px;
	padding: clamp(16px, 3vw, 28px);
	margin: 1.5rem 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-shadow: 0 18px 48px rgba(3, 10, 20, .22);
}
.umv-widget * { box-sizing: border-box; }
.umv-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:20px; }
.umv-eyebrow { color:var(--umv-blue); font-size:11px; letter-spacing:.14em; font-weight:800; margin:0 0 8px; }
.umv-header h2 { color:var(--umv-text); font-size:clamp(22px, 3vw, 32px); line-height:1.15; margin:0 0 9px; }
.umv-intro { color:var(--umv-muted); font-size:14px; max-width:760px; line-height:1.55; margin:0; }
.umv-status { flex:0 0 auto; display:flex; align-items:center; gap:8px; color:#b9cbe0; font-size:10px; letter-spacing:.08em; font-weight:750; background:rgba(255,255,255,.045); border:1px solid var(--umv-border); border-radius:999px; padding:9px 12px; }
.umv-status-dot { width:7px; height:7px; border-radius:50%; background:var(--umv-gold); box-shadow:0 0 10px rgba(243,201,105,.65); }
.umv-controls { display:flex; gap:16px; align-items:end; justify-content:space-between; background:rgba(255,255,255,.035); border:1px solid var(--umv-border); border-radius:12px; padding:13px 15px; margin-bottom:16px; }
.umv-model-control { min-width:min(330px, 100%); }
.umv-model-control label { display:block; color:var(--umv-muted); font-size:11px; font-weight:700; margin:0 0 6px; }
.umv-model-control select { width:100%; border-radius:8px; border:1px solid #354a64; padding:10px 12px; background:#0a1728; color:var(--umv-text); font:inherit; font-size:13px; }
.umv-model-control select:focus, .umv-toggle input:focus-visible { outline:2px solid var(--umv-blue); outline-offset:2px; }
.umv-control-note { max-width:570px; color:var(--umv-muted); font-size:12px; line-height:1.45; padding-bottom:3px; }
.umv-layout { display:grid; grid-template-columns:minmax(0, 1.8fr) minmax(250px, .8fr); gap:16px; align-items:stretch; }
.umv-visual-panel, .umv-side-panel { background:rgba(7,15,26,.58); border:1px solid var(--umv-border); border-radius:13px; overflow:hidden; }
.umv-panel-title { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:13px 15px 9px; color:var(--umv-text); font-size:13px; }
.umv-panel-title span { color:var(--umv-muted); font-size:11px; }
.umv-svg-wrap { width:100%; overflow:auto; }
.umv-scene { display:block; width:100%; min-width:550px; height:auto; }
.umv-stars circle { fill:#dbe9ff; opacity:.75; }
.umv-shell { fill:none; stroke-width:1.4; stroke-dasharray:4 7; opacity:.6; }
.umv-shell-cosmic { stroke:#7087a5; }
.umv-shell-localgroup { stroke:#8a83bb; }
.umv-shell-galaxy { stroke:#4e9ab5; }
.umv-shell-stars { stroke:#c39163; }
.umv-shell-solar { stroke:#e1bd69; }
.umv-shell-labels text { fill:#b5c8de; font:700 9px system-ui,sans-serif; letter-spacing:1.6px; opacity:.82; }
.umv-structure-label, .umv-channel-label, .umv-source-label, .umv-observer-label, .umv-inset-label, .umv-inset-title, .umv-callout-head, .umv-callout-body, .umv-overlay-note { font-family:system-ui,sans-serif; }
.umv-structure-label { fill:#e8d9ff; font-size:10px; font-weight:800; }
.umv-mass { stroke:rgba(255,255,255,.55); stroke-width:1; }
.umv-mass-lg { fill:#b77bff; }
.umv-mass-small { fill:#7d91ff; }
.umv-mass-star { fill:#ffd87c; }
.umv-ray { fill:none; stroke:var(--umv-gold); stroke-width:2.3; }
.umv-ray-secondary { fill:none; stroke:#d7e5fb; stroke-width:1.2; stroke-dasharray:5 6; opacity:.58; }
.umv-source { fill:#fff5cd; stroke:#f3c969; stroke-width:2; filter:drop-shadow(0 0 6px rgba(243,201,105,.75)); }
.umv-source-label { fill:#e8eef8; font-size:9px; font-weight:700; letter-spacing:.7px; }
.umv-angular-ray { fill:none; stroke:var(--umv-red); stroke-width:2; stroke-dasharray:5 4; opacity:.95; }
.umv-apparent-shift { stroke:var(--umv-red); stroke-width:2; }
.umv-velocity { fill:none; stroke:var(--umv-blue); stroke-width:2.2; }
.umv-frequency-wave { fill:none; stroke:var(--umv-purple); stroke-width:2.4; }
.umv-lens-halo { fill:rgba(197,164,255,.12); stroke:var(--umv-purple); stroke-dasharray:3 4; }
.umv-lens-vector { fill:none; stroke:var(--umv-green); stroke-width:2; }
.umv-channel-label { fill:#d9e3f1; font-size:9px; }
.umv-earth-halo { fill:rgba(101,200,239,.11); stroke:rgba(101,200,239,.55); stroke-width:1; }
.umv-earth { fill:#62bde8; stroke:#d6f4ff; stroke-width:2; }
.umv-earth-axis { stroke:#c5ecfb; stroke-width:1; opacity:.55; }
.umv-observer-label { fill:#f1f7ff; font-size:9px; font-weight:800; letter-spacing:1px; }
.umv-inset-box, .umv-callout-box { fill:rgba(9,20,34,.93); stroke:rgba(190,211,238,.28); }
.umv-inset-title, .umv-callout-head { fill:#f3c969; font-size:9px; font-weight:800; letter-spacing:1.1px; }
.umv-sun { fill:#ffc85b; stroke:#fff0b8; stroke-width:2; }
.umv-inset-ray { fill:none; stroke:#f3c969; stroke-width:1.7; }
.umv-inset-label { fill:#d7e2f1; font-size:8px; }
.umv-mercury-track { fill:none; stroke:#65c8ef; stroke-width:2; }
.umv-callout-body { fill:#d9e4f2; font-size:9px; }
.umv-overlay-note { fill:#cad8e9; font-size:11px; font-weight:650; }
.umv-model-a-overlay, .umv-model-b-overlay, .umv-model-c-overlay { display:none; }
.umv-mode-a .umv-model-a-overlay, .umv-mode-b .umv-model-b-overlay, .umv-mode-c .umv-model-c-overlay { display:block; }
.umv-mode-a .umv-structures, .umv-mode-a .umv-sun-inset, .umv-mode-a .umv-channel-angular, .umv-mode-a .umv-channel-kinematic, .umv-mode-a .umv-channel-frequency, .umv-mode-a .umv-channel-lensing { opacity:.22; }
.umv-mode-b .umv-structures, .umv-mode-b .umv-channel-lensing { opacity:.85; }
.umv-mode-c .umv-structures, .umv-mode-c .umv-sun-inset { opacity:1; }
.umv-legend { display:flex; flex-wrap:wrap; gap:8px 15px; padding:12px 15px 14px; color:#c1d0e2; font-size:10px; }
.umv-legend span { display:flex; align-items:center; gap:6px; }
.umv-key { display:inline-block; width:15px; height:3px; border-radius:3px; }
.umv-key-path { background:var(--umv-gold); }
.umv-key-angular { background:var(--umv-red); }
.umv-key-kinematic { background:var(--umv-blue); }
.umv-key-frequency { background:var(--umv-purple); }
.umv-key-lensing { background:var(--umv-green); }
.umv-side-panel { padding:16px; }
.umv-side-panel h3 { margin:0 0 6px; color:var(--umv-text); font-size:15px; }
.umv-side-intro { color:var(--umv-muted); font-size:11px; line-height:1.45; margin:0 0 14px; }
.umv-toggle { display:flex; align-items:flex-start; gap:10px; border-top:1px solid rgba(190,211,238,.11); padding:11px 0; cursor:pointer; }
.umv-toggle input { position:absolute; opacity:0; width:1px; height:1px; }
.umv-toggle-mark { flex:0 0 17px; width:17px; height:17px; margin-top:1px; border:1px solid #60748e; border-radius:4px; background:#0a1728; position:relative; }
.umv-toggle input:checked + .umv-toggle-mark { border-color:var(--umv-blue); background:#163b55; }
.umv-toggle input:checked + .umv-toggle-mark:after { content:""; position:absolute; left:4px; top:1px; width:5px; height:9px; border:solid #eaf8ff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.umv-toggle strong { display:block; color:#e7eff9; font-size:11px; }
.umv-toggle small { display:block; color:#9fb0c5; font-size:10px; line-height:1.4; margin-top:2px; }
.umv-hide-path .umv-channel-path, .umv-hide-angular .umv-channel-angular, .umv-hide-kinematic .umv-channel-kinematic, .umv-hide-frequency .umv-channel-frequency, .umv-hide-lensing .umv-channel-lensing { display:none; }
.umv-model-summary { margin-top:13px; padding:12px; border:1px solid rgba(101,200,239,.24); border-radius:9px; background:rgba(101,200,239,.055); }
.umv-model-summary h4 { color:#bcecff; font-size:11px; margin:0 0 5px; }
.umv-model-summary p { color:#c2d2e4; font-size:10px; line-height:1.5; margin:0; }
.umv-local-note { margin-top:10px; padding:11px 12px; border-left:2px solid var(--umv-gold); background:rgba(243,201,105,.055); }
.umv-local-note strong { color:#f5d88e; display:block; font-size:10px; }
.umv-local-note p { color:#bfccdc; font-size:10px; line-height:1.45; margin:4px 0 0; }
.umv-footer { display:flex; justify-content:space-between; gap:12px; margin-top:13px; color:#92a5bc; font-size:10px; }
.umv-footer strong { color:#c3d2e4; }
@media (max-width: 900px) {
	.umv-header { display:block; }
	.umv-status { display:inline-flex; margin-top:13px; }
	.umv-layout { grid-template-columns:1fr; }
	.umv-side-panel { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
	.umv-side-panel h3, .umv-side-intro, .umv-model-summary, .umv-local-note { grid-column:1 / -1; }
}
@media (max-width: 600px) {
	.umv-widget { padding:14px; border-radius:13px; }
	.umv-controls { display:block; }
	.umv-model-control { min-width:0; }
	.umv-control-note { margin-top:10px; }
	.umv-side-panel { display:block; }
	.umv-footer { display:block; line-height:1.6; }
	.umv-scene { min-width:520px; }
}
@media (prefers-reduced-motion: no-preference) {
	.umv-mode-c .umv-ray-main { stroke-dasharray:9 6; animation:umv-flow 8s linear infinite; }
	.umv-mode-c .umv-earth-halo { animation:umv-pulse 3.5s ease-in-out infinite; transform-origin:410px 282px; }
	@keyframes umv-flow { to { stroke-dashoffset:-60; } }
	@keyframes umv-pulse { 50% { opacity:.45; } }
}
