
        @import url("https://fonts.cdnfonts.com/css/thegoodmonolith");
        :root {
            --bg-color: #12100f;
            --site-header-offset: 56px;
            --grid-color: rgba(255, 240, 230, 0.05);
            --text-primary: #f3ede9;
            --text-secondary: #c2b8b2;
            --text-highlight: #ff4e42;
            --accent-primary: #ff4e42;
            --accent-secondary: #c2362f;
            --accent-tertiary: #ffb3ab;
            --panel-bg: rgba(30, 26, 24, 0.7);
            --panel-border: rgba(255, 78, 66, 0.3);
            --panel-highlight: rgba(255, 78, 66, 0.1);
            --scanner-line: rgba(255, 78, 66, 0.7);
            --mesh-scrollbar-track: rgba(255, 78, 66, 0.12);
            --mesh-scrollbar-thumb: rgba(255, 78, 66, 0.65);
            --mesh-scrollbar-thumb-hover: rgba(255, 78, 66, 0.85);
            --explode-track-fill: rgba(255, 255, 255, 0.86);
            --explode-bubble-fill: #ffffff;
            --explode-dragger-fill: #ffffff;
            --explode-bubble-stroke: rgba(255, 78, 66, 0.24);
            --bbox-edge-color: var(--accent-primary);
            --bbox-dim-line-color: var(--accent-primary);
            --bbox-label-text-color: var(--text-primary);
            --bbox-label-stroke-color: rgba(0, 0, 0, 0.45);
            --bbox-label-bg-color: rgba(14, 12, 11, 0.62);
            --bbox-label-border-color: var(--panel-border);
        }

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

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            font-family: "TheGoodMonolith", monospace;
            overflow: hidden;
            height: 100vh;
            text-transform: uppercase;
            font-size: 1rem;
        }

        button, input, select, textarea { font-family: inherit; }

        /* Intro: Logo stroke animation (scoped, avoid overriding page layout) */
        .intro-overlay {
            position: fixed;
            inset: 0;
            z-index: 2000;
            display: grid;
            place-items: center;
            background:
                radial-gradient(1200px 600px at 50% 45%, rgba(28,36,68,0.85) 0%, rgba(14,18,32,0.96) 62%, rgba(5,6,12,1) 100%),
                linear-gradient(180deg, hsl(223, 32%, 10%) 0%, hsl(223, 38%, 5%) 100%);
            color: hsl(0, 0%, 100%);
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }
        .intro-overlay.is-hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }
        .intro-overlay button {
            --transDur: 0.3s;
            background-color: transparent;
            -webkit-tap-highlight-color: transparent;
            color: currentColor;
            transition: color var(--transDur);
            cursor: pointer;
        }
        .intro-overlay button:focus { outline: transparent; }
        .intro-overlay button:not(:disabled):focus,
        .intro-overlay button:not(:disabled):hover { color: hsl(223, 90%, 55%); }
        .intro-overlay .logo {
            width: min(84vw, 700px);
            height: auto;
            color: hsl(0, 0%, 100%);
        }
        .intro-overlay .logo__path {
            fill: hsl(0, 0%, 100%);
            fill-opacity: 0;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            paint-order: stroke;
            stroke-dasharray: 6200;
            stroke-dashoffset: 6200;
            filter: drop-shadow(0 12px 34px rgba(0,0,0,0.18));
        }
        .intro-overlay .logo__path--glow {
            fill: none;
            stroke-width: 5.2;
            opacity: 0.3;
            filter:
                drop-shadow(0 0 14px rgba(96, 156, 255, 0.95))
                drop-shadow(0 0 32px rgba(96, 156, 255, 0.72))
                drop-shadow(0 0 68px rgba(96, 156, 255, 0.45));
        }
        .intro-overlay .logo__path--main {
            opacity: 1;
            filter:
                drop-shadow(0 0 14px rgba(96, 156, 255, 0.35))
                drop-shadow(0 10px 30px rgba(0,0,0,0.18));
        }
        .intro-overlay .logo--running .logo__path--glow {
            animation: introStroke 3.6s cubic-bezier(0.65, 0, 0.35, 1) 0s forwards;
        }
        .intro-overlay .logo--running .logo__path--main {
            animation:
                introStroke 3.4s cubic-bezier(0.65, 0, 0.35, 1) 0.15s forwards,
                introFill 0.55s ease-out 2.95s forwards;
        }

        @media (prefers-color-scheme: dark) {
            .intro-overlay {
                background:
                    radial-gradient(1200px 600px at 50% 45%, rgba(24,32,58,0.92) 0%, rgba(10,12,20,0.98) 60%, rgba(5,6,10,1) 100%),
                    hsl(223, 10%, 10%);
                color: hsl(0, 0%, 100%);
            }
            .intro-overlay button:not(:disabled):focus,
            .intro-overlay button:not(:disabled):hover { color: hsl(223, 90%, 65%); }
        }

        @keyframes introStroke {
            from { stroke-dashoffset: 6200; }
            to { stroke-dashoffset: 0; }
        }
        @keyframes introFill {
            from { fill-opacity: 0; }
            to { fill-opacity: 1; }
        }

        .space-background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: none;
            background-size: cover;
            background-position: center;
            z-index: 0;
            opacity: 0.8;
        }

        #three-container {
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 1;
            cursor: default;
        }
        #three-container:active { cursor: default; }

        .interface-container {
            position: relative;
            width: 100%;
            height: 100vh;
            z-index: 2;
            pointer-events: none;
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .grid-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
                linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
            background-size: 40px 40px;
            pointer-events: none;
            z-index: 0;
        }

        .header { display: flex; justify-content: space-between; padding: 1.25rem; }
        .header-item { font-size: 0.75rem; color: var(--text-secondary); }
        .header-item--center { display: flex; justify-content: center; flex: 1; pointer-events: auto; }
        .viewcube-panel {
            width: 110px;
            height: 110px;
            display: flex;
            align-items: center;
            justify-content: center;
            perspective: 600px;
            pointer-events: auto;
        }
        .viewcube-wrap {
            width: 76px;
            height: 76px;
            cursor: grab;
            touch-action: none;
            user-select: none;
        }
        .viewcube-wrap:active { cursor: grabbing; }
        .viewcube {
            position: relative;
            width: 76px;
            height: 76px;
            transform-style: preserve-3d;
            transition: transform 0.1s linear;
        }
        .viewcube-face {
            position: absolute;
            width: 76px;
            height: 76px;
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.78);
            color: #4a5568;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            font-weight: 700;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
            text-transform: none;
            pointer-events: auto;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }
        .viewcube-face:hover { background: rgba(255, 255, 255, 0.95); }
        .viewcube-face--front { transform: rotateY(0deg) translateZ(38px); }
        .viewcube-face--back { transform: rotateY(180deg) translateZ(38px); }
        .viewcube-face--left { transform: rotateY(-90deg) translateZ(38px); }
        .viewcube-face--right { transform: rotateY(90deg) translateZ(38px); }
        .viewcube-face--top { transform: rotateX(90deg) translateZ(38px); }
        .viewcube-face--bottom { transform: rotateX(-90deg) translateZ(38px); }

        .scanner-frame {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 400px;
            height: 400px;
            border: 1px solid var(--accent-primary);
            display: flex;
            justify-content: center;
            align-items: center;
            pointer-events: none;
        }

        .scanner-frame::before,
        .scanner-frame::after {
            content: "";
            position: absolute;
            width: 20px;
            height: 20px;
            border-color: var(--accent-primary);
            border-style: solid;
        }
        .scanner-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
        .scanner-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

        .scanner-frame .corner-tl {
            position: absolute; top: -1px; left: -1px; width: 20px; height: 20px;
            border-top: 2px solid var(--accent-primary); border-left: 2px solid var(--accent-primary);
        }
        .scanner-frame .corner-tr {
            position: absolute; top: -1px; right: -1px; width: 20px; height: 20px;
            border-top: 2px solid var(--accent-primary); border-right: 2px solid var(--accent-primary);
        }
        .scanner-frame .corner-bl {
            position: absolute; bottom: -1px; left: -1px; width: 20px; height: 20px;
            border-bottom: 2px solid var(--accent-primary); border-left: 2px solid var(--accent-primary);
        }
        .scanner-frame .corner-br {
            position: absolute; bottom: -1px; right: -1px; width: 20px; height: 20px;
            border-bottom: 2px solid var(--accent-primary); border-right: 2px solid var(--accent-primary);
        }

        .scanner-id {
            position: absolute;
            bottom: -30px;
            left: 0;
            font-size: 0.75rem;
            color: var(--accent-primary);
        }
        .scanner-id-right {
            position: absolute;
            bottom: -30px;
            right: 0;
            font-size: 0.75rem;
            color: var(--accent-primary);
        }

        .data-panel {
            width: 300px;
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            border-radius: 5px;
            padding: 0.9375rem;
            backdrop-filter: blur(8px);
            pointer-events: auto;
        }
        .data-panel-title {
            font-size: 0.875rem;
            color: var(--accent-primary);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .data-readouts { margin-top: 0.625rem; }
        .data-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.3125rem;
            font-size: 0.75rem;
        }
        .model-stat-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.375rem;
            font-size: 0.75rem;
        }
        .model-stat-k { color: var(--text-secondary); }
        .model-stat-v { color: var(--text-primary); }
        .model-stat-foot {
            margin-top: 0.625rem;
            padding-top: 0.5rem;
            border-top: 1px dashed var(--panel-border);
            font-size: 0.72rem;
            text-transform: none;
        }
        .model-floor-grid-row { align-items: center; }
        .model-floor-grid-toggle {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
        }
        .model-floor-grid-toggle input { accent-color: var(--accent-primary); margin-right: 0.5rem; }
        .model-floor-grid-switch { display: inline-flex; align-items: center; }
        .data-label { color: var(--text-secondary); }
        .data-value { color: var(--text-primary); }
        .data-bar {
            height: 6px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0.625rem 0;
            position: relative;
            border-radius: 3px;
        }
        .data-bar-fill {
            height: 100%;
            background: var(--accent-primary);
            border-radius: 3px;
            transition: width 0.5s;
        }
        .model-right-column {
            position: absolute;
            top: calc(var(--site-header-offset) + 20px);
            right: 20px;
            width: 300px;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            z-index: 10;
            pointer-events: auto;
        }
        .model-right-column > .data-panel {
            pointer-events: auto;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }
        .model-right-column > .model-overview-panel,
        .model-right-column > .theme-mesh-combined {
            width: 300px;
            min-width: 300px;
            max-width: 300px;
        }
        .model-overview-panel {
            position: fixed !important;
            top: calc(var(--site-header-offset) + 20px);
            right: 20px;
            width: 300px;
            min-width: 300px;
            max-width: 300px;
            z-index: 20;
        }
        .model-right-column .control-panel {
            position: relative;
            top: auto;
            left: auto;
            transform: none;
            z-index: auto;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            background: transparent;
            border: none;
            border-radius: 0;
            padding: 0 0 0;
            backdrop-filter: none;
        }
        .theme-mesh-combined {
            position: fixed;
            top: calc(var(--site-header-offset) + 20px);
            left: 20px;
            width: 300px;
            max-width: 300px;
            z-index: 20;
        }
        .model-right-column .data-panel-title { justify-content: space-between; gap: 0.375rem; }
        .data-panel-title-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            margin-left: auto;
        }
        .theme-mesh-combined {
            margin-top: 0;
            padding-top: 0.9375rem;
            border-top: none;
        }
        .theme-mesh-combined.is-collapsed .theme-switcher-title,
        .theme-mesh-combined.is-collapsed .theme-switcher-options,
        .theme-mesh-combined.is-collapsed .theme-color-picker-group,
        .theme-mesh-combined.is-collapsed .theme-switcher-hint,
        .theme-mesh-combined.is-collapsed .theme-mesh-divider,
        .theme-mesh-combined.is-collapsed .spectrum-content {
            display: none;
        }
        .theme-mesh-combined.is-collapsed .spectrum-header {
            padding-bottom: 0;
        }
        .model-overview-panel.is-collapsed .model-overview-content {
            display: none;
        }
        .control-panel.is-hidden-by-overview {
            display: none;
        }
        .theme-mesh-divider { display: none; }
        .theme-switcher-title {
            font-size: 0.72rem;
            color: var(--text-secondary);
            margin-top: 0.4rem;
        }
        .theme-switcher-options {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.55rem;
        }
        .theme-option {
            width: 100%;
            border: 1px solid var(--panel-border);
            background: var(--panel-highlight);
            color: var(--text-primary);
            border-radius: 4px;
            padding: 0.42rem 0.35rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 0.3rem;
            font-size: 0.68rem;
            transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
        }
        .theme-option:hover {
            border-color: var(--accent-primary);
            transform: translateY(-1px);
        }
        .theme-option.is-active {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 1px var(--panel-border) inset;
        }
        .theme-option-label {
            flex: 1;
            text-align: center;
            letter-spacing: 0.02em;
        }
        .theme-option-swatch {
            width: 2.2rem;
            height: 0.7rem;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            flex-shrink: 0;
        }
        .theme-option-swatch--default {
            background: linear-gradient(90deg, #ff4e42 0%, #ff9e57 100%);
        }
        .theme-option-swatch--neon {
            background: linear-gradient(90deg, #1cc4ff 0%, #6b8cff 100%);
        }
        .theme-option-swatch--forest {
            background: linear-gradient(90deg, #2ed38c 0%, #0fa968 100%);
        }
        .theme-option-swatch--light {
            background: linear-gradient(90deg, #ffffff 0%, #e9eef5 100%);
            border-color: rgba(120, 136, 158, 0.45);
        }
        .theme-option-swatch--bg-none {
            background:
                repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 4px, transparent 4px 8px),
                rgba(255, 255, 255, 0.08);
        }
        .theme-option-swatch--bg-space {
            background: linear-gradient(90deg, #ff4e42 0%, #ff9e57 100%);
        }
        .theme-option-swatch--bg-nebula {
            background: linear-gradient(90deg, #3f215f 0%, #1e6d87 100%);
        }
        .theme-switcher-hint {
            margin-top: 0.7rem;
            font-size: 0.68rem;
            color: var(--text-secondary);
            text-transform: none;
        }
        .theme-color-picker-group {
            margin-top: 0.55rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.6rem;
        }
        .theme-color-picker-actions {
            display: flex;
            align-items: center;
            gap: 0.45rem;
        }
        .theme-color-picker-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
            letter-spacing: 0.02em;
        }
        .theme-color-picker-input {
            width: 2.2rem;
            height: 1.4rem;
            border: 1px solid var(--panel-border);
            border-radius: 4px;
            background: var(--panel-highlight);
            padding: 0;
            cursor: pointer;
        }
        .theme-color-picker-input::-webkit-color-swatch-wrapper {
            padding: 0;
            border-radius: 4px;
        }
        .theme-color-picker-input::-webkit-color-swatch {
            border: none;
            border-radius: 3px;
        }
        .theme-color-reset-btn {
            border: 1px solid var(--panel-border);
            background: var(--panel-highlight);
            color: var(--text-secondary);
            border-radius: 4px;
            padding: 0.2rem 0.42rem;
            font-size: 0.65rem;
            cursor: pointer;
            transition: border-color 0.2s ease, color 0.2s ease;
        }
        .theme-color-reset-btn:hover {
            border-color: var(--accent-primary);
            color: var(--accent-primary);
        }

        :root[data-model-theme="neon"],
        body[data-model-theme="neon"] {
            --bg-color: #0d1326;
            --grid-color: rgba(134, 186, 255, 0.08);
            --text-primary: #e8f0ff;
            --text-secondary: #b5c7f0;
            --text-highlight: #57c6ff;
            --accent-primary: #57c6ff;
            --accent-secondary: #2f7ec2;
            --accent-tertiary: #9fd6ff;
            --panel-bg: rgba(18, 31, 56, 0.74);
            --panel-border: rgba(87, 198, 255, 0.35);
            --panel-highlight: rgba(87, 198, 255, 0.12);
            --scanner-line: rgba(87, 198, 255, 0.8);
            --mesh-scrollbar-track: rgba(87, 198, 255, 0.14);
            --mesh-scrollbar-thumb: rgba(87, 198, 255, 0.68);
            --mesh-scrollbar-thumb-hover: rgba(87, 198, 255, 0.88);
        }

        :root[data-model-theme="forest"],
        body[data-model-theme="forest"] {
            --bg-color: #0f1b16;
            --grid-color: rgba(102, 222, 159, 0.08);
            --text-primary: #e7fff2;
            --text-secondary: #b2d8c2;
            --text-highlight: #30d68f;
            --accent-primary: #30d68f;
            --accent-secondary: #1b9d68;
            --accent-tertiary: #98ebc5;
            --panel-bg: rgba(17, 43, 32, 0.74);
            --panel-border: rgba(48, 214, 143, 0.34);
            --panel-highlight: rgba(48, 214, 143, 0.11);
            --scanner-line: rgba(48, 214, 143, 0.8);
            --mesh-scrollbar-track: rgba(48, 214, 143, 0.14);
            --mesh-scrollbar-thumb: rgba(48, 214, 143, 0.66);
            --mesh-scrollbar-thumb-hover: rgba(48, 214, 143, 0.86);
        }
        :root[data-model-theme="light"],
        body[data-model-theme="light"] {
            --bg-color: #f4f7fb;
            --grid-color: rgba(89, 110, 138, 0.12);
            --text-primary: #1f2a38;
            --text-secondary: #607286;
            --text-highlight: #2d6eb4;
            --accent-primary: #2d6eb4;
            --accent-secondary: #4f88c2;
            --accent-tertiary: #87a9cf;
            --panel-bg: rgba(255, 255, 255, 0.84);
            --panel-border: rgba(117, 138, 165, 0.34);
            --panel-highlight: rgba(90, 116, 146, 0.08);
            --scanner-line: rgba(61, 101, 146, 0.72);
            --mesh-scrollbar-track: rgba(124, 145, 170, 0.2);
            --mesh-scrollbar-thumb: rgba(103, 130, 162, 0.64);
            --mesh-scrollbar-thumb-hover: rgba(85, 112, 146, 0.8);
            --explode-track-fill: rgba(86, 113, 146, 0.52);
            --explode-bubble-fill: #e8f0fb;
            --explode-dragger-fill: #f7fbff;
            --explode-bubble-stroke: rgba(86, 113, 146, 0.45);
            --bbox-label-text-color: var(--accent-primary);
            --bbox-label-stroke-color: rgba(245, 250, 255, 0.85);
            --bbox-label-bg-color: rgba(244, 248, 255, 0.88);
            --bbox-label-border-color: rgba(86, 113, 146, 0.42);
        }

        .control-panel {
            width: 300px;
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            border-radius: 5px;
            padding: 0.9375rem;
            position: absolute;
            top: 20px;
            left: 20px;
            backdrop-filter: blur(8px);
            pointer-events: auto;
            z-index: 10;
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        .panel-title-wrap {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            flex: 1 1 auto;
            min-width: 0;
            white-space: nowrap;
        }
        .panel-collapse-btn {
            width: 1.5rem;
            height: 1.5rem;
            border: 1px solid var(--panel-border);
            background: var(--panel-highlight);
            color: var(--accent-primary);
            border-radius: 3px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            line-height: 1;
        }
        .panel-collapse-btn:hover { background: var(--panel-border); }
        .control-panel.is-collapsed .panel-header { margin-bottom: 0; }
        .control-panel-content.is-collapsed { display: none; }
        .drag-handle {
            cursor: move;
            width: 1.1rem;
            height: 1.1rem;
            color: var(--accent-primary);
            flex: 0 0 auto;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            touch-action: none;
        }

        .control-group { margin-bottom: 0.9375rem; }
        .control-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
        .control-label { font-size: 0.75rem; color: var(--text-secondary); }
        .control-value { font-size: 0.75rem; color: var(--text-primary); }
        .slider-container { width: 100%; display: flex; flex-direction: column; }
        .switch,
        .switch__input { -webkit-tap-highlight-color: transparent; }
        .switch {
            --hue: 223;
            --off-hue: 3;
            --on-hue1: 123;
            --on-hue2: 168;
            --primary: hsl(var(--hue), 90%, 50%);
            --trans-dur: 0.6s;
            --trans-timing: cubic-bezier(0.65, 0, 0.35, 1);
            font-size: 12px;
            display: block;
            position: relative;
            width: 4.6em;
            height: 2.7em;
        }
        .switch__base-outer,
        .switch__base-inner { display: block; position: absolute; }
        .switch__base-outer {
            border-radius: 1.25em;
            box-shadow:
                -0.125em -0.125em 0.25em hsl(var(--hue), 10%, 30%),
                0.125em 0.125em 0.125em hsl(var(--hue), 10%, 30%) inset,
                0.125em 0.125em 0.25em hsl(0, 0%, 0%),
                -0.125em -0.125em 0.125em hsl(var(--hue), 10%, 5%) inset;
            top: 0.125em;
            left: 0.125em;
            width: 4.75em;
            height: 2.75em;
        }
        .switch__base-inner {
            border-radius: 1.125em;
            box-shadow:
                -0.25em -0.25em 0.25em hsl(var(--hue), 10%, 30%) inset,
                0.0625em 0.0625em 0.125em hsla(var(--hue), 10%, 30%),
                0.125em 0.25em 0.25em hsl(var(--hue), 10%, 5%) inset,
                -0.0625em -0.0625em 0.125em hsla(var(--hue), 10%, 5%);
            top: 0.375em;
            left: 0.375em;
            width: 4.25em;
            height: 2.25em;
        }
        .switch__base-neon {
            display: block;
            overflow: visible;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: auto;
        }
        .switch__base-neon path {
            stroke-dasharray: 0 104.26 0;
            transition: stroke-dasharray var(--trans-dur) var(--trans-timing);
        }
        .switch__input {
            outline: transparent;
            position: relative;
            width: 100%;
            height: 100%;
            -webkit-appearance: none;
            appearance: none;
            cursor: pointer;
        }
        .switch__input:before {
            border-radius: 0.125em;
            box-shadow: 0 0 0 0.125em hsla(var(--hue), 90%, 50%, 0);
            content: "";
            display: block;
            position: absolute;
            inset: -0.125em;
            transition: box-shadow 0.15s linear;
        }
        .switch__input:focus-visible:before { box-shadow: 0 0 0 0.125em var(--primary); }
        .switch__knob,
        .switch__knob-container { border-radius: 1em; display: block; position: absolute; }
        .switch__knob {
            background-color: hsl(var(--hue), 10%, 15%);
            background-image:
                radial-gradient(88% 88% at 50% 50%, hsl(var(--hue), 10%, 20%) 47%, hsla(var(--hue), 10%, 20%, 0) 50%),
                radial-gradient(88% 88% at 47% 47%, hsl(var(--hue), 10%, 85%) 45%, hsla(var(--hue), 10%, 85%, 0) 50%),
                radial-gradient(65% 70% at 40% 60%, hsl(var(--hue), 10%, 20%) 46%, hsla(var(--hue), 10%, 20%, 0) 50%);
            box-shadow:
                -0.0625em -0.0625em 0.0625em hsl(var(--hue), 10%, 15%) inset,
                -0.125em -0.125em 0.0625em hsl(var(--hue), 10%, 5%) inset,
                0.75em 0.25em 0.125em hsla(0, 0%, 0%, 0.8);
            width: 2em;
            height: 2em;
            transition: transform var(--trans-dur) var(--trans-timing);
        }
        .switch__knob-container {
            overflow: hidden;
            top: 0.5em;
            left: 0.5em;
            width: 4em;
            height: 2em;
        }
        .switch__knob-neon { display: block; width: 2em; height: auto; }
        .switch__knob-neon circle {
            opacity: 0;
            stroke-dasharray: 0 90.32 0 54.19;
            transition:
                opacity var(--trans-dur) steps(1, end),
                stroke-dasharray var(--trans-dur) var(--trans-timing);
        }
        .switch__knob-shadow {
            border-radius: 50%;
            box-shadow: 0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.9);
            display: block;
            position: absolute;
            top: 0.5em;
            left: 0.5em;
            width: 2em;
            height: 2em;
            transition: transform var(--trans-dur) var(--trans-timing);
        }
        .switch__led {
            background-color: hsl(var(--off-hue), 90%, 70%);
            border-radius: 50%;
            box-shadow:
                0 -0.0625em 0.0625em hsl(var(--off-hue), 90%, 40%) inset,
                0 0 0.125em hsla(var(--off-hue), 90%, 70%, 0.3),
                0 0 0.125em hsla(var(--off-hue), 90%, 70%, 0.3),
                0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 0.25em;
            height: 0.25em;
            transition:
                background-color var(--trans-dur) var(--trans-timing),
                box-shadow var(--trans-dur) var(--trans-timing);
        }
        .switch__text {
            overflow: hidden;
            position: absolute;
            width: 1px;
            height: 1px;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
        }
        .switch__input:checked ~ .switch__led {
            background-color: hsl(var(--on-hue1), 90%, 70%);
            box-shadow:
                0 -0.0625em 0.0625em hsl(var(--on-hue1), 90%, 40%) inset,
                0 -0.125em 0.125em hsla(var(--on-hue1), 90%, 70%, 0.3),
                0 0.125em 0.125em hsla(var(--on-hue1), 90%, 70%, 0.3),
                0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
        }
        .switch__input:checked ~ .switch__base-neon path { stroke-dasharray: 52.13 0 52.13; }
        .switch__input:checked ~ .switch__knob-shadow,
        .switch__input:checked ~ .switch__knob-container .switch__knob { transform: translateX(100%); }
        .switch__input:checked ~ .switch__knob-container .switch__knob-neon circle {
            opacity: 1;
            stroke-dasharray: 45.16 0 45.16 54.19;
            transition-timing-function: steps(1, start), var(--trans-timing);
        }
        :root[data-model-theme="light"] .switch__base-outer,
        body[data-model-theme="light"] .switch__base-outer {
            background: #edf2f7;
            box-shadow:
                0 1px 2px rgba(80, 104, 134, 0.26),
                0 0 0 1px rgba(126, 147, 173, 0.4) inset;
        }
        :root[data-model-theme="light"] .switch__base-inner,
        body[data-model-theme="light"] .switch__base-inner {
            background: linear-gradient(180deg, #fff5f4 0%, #f6ddda 100%);
            box-shadow:
                0 1px 1px rgba(255, 255, 255, 0.85) inset,
                0 -1px 2px rgba(113, 134, 162, 0.22) inset;
        }
        :root[data-model-theme="light"] .switch__input:checked ~ .switch__base-inner,
        body[data-model-theme="light"] .switch__input:checked ~ .switch__base-inner {
            background: linear-gradient(180deg, #effcf4 0%, #d5f1df 100%);
            box-shadow:
                0 1px 1px rgba(255, 255, 255, 0.88) inset,
                0 -1px 2px rgba(73, 141, 105, 0.25) inset;
        }
        :root[data-model-theme="light"] .switch__knob,
        body[data-model-theme="light"] .switch__knob {
            background-color: #f4f8fd;
            background-image:
                radial-gradient(88% 88% at 50% 50%, #ffffff 47%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(70% 70% at 38% 38%, #ffffff 45%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(65% 70% at 42% 64%, #d4e0ee 46%, rgba(212, 224, 238, 0) 50%);
            box-shadow:
                0 1px 2px rgba(102, 125, 154, 0.3),
                0 0 0 1px rgba(140, 160, 184, 0.45) inset;
        }
        :root[data-model-theme="light"] .switch__knob-shadow,
        body[data-model-theme="light"] .switch__knob-shadow {
            box-shadow: 0 1px 2px rgba(92, 116, 145, 0.35);
        }
        :root[data-model-theme="light"] .switch__led,
        body[data-model-theme="light"] .switch__led {
            background-color: #f2a5a0;
            box-shadow:
                0 0 0 1px rgba(165, 94, 88, 0.22),
                0 0 6px rgba(242, 165, 160, 0.35);
        }
        :root[data-model-theme="light"] .switch__input:checked ~ .switch__led,
        body[data-model-theme="light"] .switch__input:checked ~ .switch__led {
            background-color: #74c99f;
            box-shadow:
                0 0 0 1px rgba(58, 141, 103, 0.25),
                0 0 8px rgba(116, 201, 159, 0.45);
        }
        :root[data-model-theme="light"] .switch__base-neon path,
        body[data-model-theme="light"] .switch__base-neon path {
            stroke: rgba(102, 128, 158, 0.46);
        }
        :root[data-model-theme="light"] .switch__input:checked ~ .switch__base-neon path,
        body[data-model-theme="light"] .switch__input:checked ~ .switch__base-neon path {
            stroke: rgba(67, 148, 106, 0.68);
        }
        .slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            background: var(--mesh-scrollbar-track);
            outline: none;
            border-radius: 3px;
            border: 1px solid var(--panel-border);
        }
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--accent-primary);
            border: 1px solid var(--panel-bg);
            cursor: pointer;
        }
        .slider::-moz-range-track {
            height: 6px;
            background: var(--mesh-scrollbar-track);
            border: 1px solid var(--panel-border);
            border-radius: 3px;
        }
        .slider::-moz-range-thumb {
            width: 12px;
            height: 12px;
            border: 1px solid var(--panel-bg);
            border-radius: 50%;
            background: var(--accent-primary);
            cursor: pointer;
        }
        .explode-control-group { display: none; }
        .explode-control-group.is-visible { display: block; }
        .explode-float-control {
            position: absolute;
            left: calc(100% + 12px);
            top: 0;
            width: 276px;
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            border-radius: 0.75rem;
            padding: 0.42rem 0.45rem;
            pointer-events: auto;
            display: none;
            backdrop-filter: blur(6px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.22);
        }
        .explode-float-control.is-visible { display: block; }
        .explode-float-control .control-row {
            margin-bottom: 0.1rem;
            align-items: center;
        }
        .explode-float-control .control-label,
        .explode-float-control .control-value {
            font-size: 0.62rem;
            letter-spacing: 0.02em;
        }
        .display-mode-control {
            position: absolute;
            left: calc(100% + 12px);
            top: 0;
            width: 240px;
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            border-radius: 0.75rem;
            padding: 0.52rem;
            pointer-events: auto;
            display: none;
            backdrop-filter: blur(6px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.22);
            text-align: left;
        }
        .display-mode-control.is-visible { display: block; }
        .display-mode-title {
            font-size: 0.66rem;
            color: var(--text-primary);
            margin-bottom: 0.45rem;
            text-transform: none;
        }
        .display-mode-options {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.45rem;
        }
        .display-mode-option {
            border: 1px solid var(--panel-border);
            background: var(--panel-highlight);
            color: var(--text-primary);
            border-radius: 0.45rem;
            padding: 0.42rem 0.45rem;
            font-size: 0.66rem;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
            text-transform: none;
            font-family: "TheGoodMonolith", monospace;
        }
        .display-mode-option:hover {
            border-color: var(--accent-primary);
            background: var(--panel-border);
            transform: translateY(-1px);
        }
        .display-mode-option.is-active {
            border-color: var(--accent-primary);
            background: var(--panel-border);
            color: var(--text-primary);
            box-shadow: 0 0 0 1px var(--accent-primary) inset;
        }
        .explode-control-wrap {
            width: 100%;
            padding: 0;
        }
        .explode-control-svg {
            width: 100%;
            height: 108px;
            overflow: visible;
            visibility: hidden;
        }
        #explode-drag-bar {
            fill: var(--explode-track-fill);
        }
        #explode-display {
            fill: var(--explode-bubble-fill);
            stroke: var(--explode-bubble-stroke);
            stroke-width: 1.2;
        }
        .explode-control-svg .upText,
        .explode-control-svg .downText {
            text-anchor: middle;
            font-weight: 700;
            fill: var(--accent-primary);
            user-select: none;
            -webkit-user-select: none;
            pointer-events: none;
            text-rendering: optimizeSpeed;
            font-family: "Ropa Sans", "TheGoodMonolith", sans-serif;
        }
        .explode-control-svg .upText { font-size: 20px; letter-spacing: 0.28px; }
        .explode-control-svg .downText {
            font-size: 12px;
            letter-spacing: -0.4px;
        }
        #explode-dragger {
            -webkit-tap-highlight-color: rgba(0,0,0,0);
            fill: var(--explode-dragger-fill);
            stroke: var(--accent-primary);
        }
        .buttons { display: flex; gap: 0.625rem; margin-top: 0.9375rem; }
        .btn {
            flex: 1;
            padding: 0.5rem 0;
            background: var(--panel-highlight);
            border: 1px solid var(--panel-border);
            color: var(--accent-primary);
            font-size: 0.75rem;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn:hover { background: var(--panel-border); }

        #wrapper {
            position: fixed;
            left: 20px;
            bottom: 20px;
            width: 420px;
            pointer-events: auto;
            z-index: 10;
            text-align: center;
            font-family: "TheGoodMonolith", monospace;
            text-transform: uppercase;
        }
        #toolbar {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
        }
        #toolbar .button {
            width: 54px;
            height: 54px;
            border-radius: 50%;
            background-color: var(--accent-primary);
            color: #fff;
            text-align: center;
            font-size: 2.5em;
            line-height: 54px;
            position: relative;
            left: 50%;
            margin-left: -27px;
            z-index: 2;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
        }
        #toolbar .button,
        #toolbar .icons {
            transition: all 0.8s cubic-bezier(.87,-.41,.19,1.44);
        }
        #toolbar .button:after { content: "+"; }
        #toolbar .button.active {
            transform: rotate(45deg);
        }
        #toolbar .icons {
            width: 100%;
            overflow: hidden;
            max-height: 0;
            list-style: none;
            padding: 0;
            background-color: var(--panel-bg);
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
            margin: 0.55rem 0 0;
            border-radius: 0.75rem;
            border: 1px solid var(--panel-border);
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            opacity: 0;
        }
        #toolbar .icons.open {
            max-height: 240px;
            padding: 0.6rem;
            opacity: 1;
        }
        #toolbar .icons li {
            display: none;
            width: calc(50% - 0.225rem);
            color: var(--accent-primary);
            cursor: pointer;
            text-align: left;
            align-items: center;
            gap: 0.45rem;
            border: 1px solid var(--panel-border);
            border-radius: 0.4rem;
            padding: 0.3rem 0.45rem;
            text-transform: none;
            font-size: 0.66rem;
        }
        #toolbar .icons.open li {
            display: inline-flex;
        }
        #toolbar .icons i { font-size: 1.2rem; }
        .toolbar-label { color: var(--text-primary); font-size: 0.66rem; line-height: 1.2; }
        #toolbar .icons li.is-active i { color: var(--text-primary); }
        #toolbar .icons li.is-active {
            background: var(--panel-highlight);
            border-color: var(--accent-secondary);
        }
        .toolbar-position-badge {
            margin-top: 0.5rem;
            padding: 0.35rem 0.5rem;
            border-radius: 4px;
            border: 1px solid var(--panel-border);
            background: var(--panel-bg);
            color: var(--text-primary);
            font-size: 0.65rem;
            text-transform: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: none;
        }
        .toolbar-position-badge.is-visible { display: block; }
        .toolbar-position-badge.is-follow-cursor {
            position: fixed;
            margin-top: 0;
            max-width: none;
            z-index: 1300;
            pointer-events: none;
        }
        .position-crosshair {
            position: fixed;
            left: -9999px;
            top: -9999px;
            width: 22px;
            height: 22px;
            transform: translate(-50%, -50%);
            z-index: 1250;
            pointer-events: none;
            display: none;
        }
        .position-crosshair.is-visible { display: block; }
        .position-crosshair-line {
            position: absolute;
            background: var(--accent-primary);
            opacity: 0.92;
            box-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
        }
        .position-crosshair-line.horizontal {
            left: 0;
            top: 50%;
            width: 100%;
            height: 1px;
            transform: translateY(-50%);
        }
        .position-crosshair-line.vertical {
            top: 0;
            left: 50%;
            width: 1px;
            height: 100%;
            transform: translateX(-50%);
        }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-color);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: opacity 0.5s;
        }
        .loading-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 500px;
            padding: 1.25rem;
        }
        .preloader-canvas-container { width: 180px; height: 180px; position: relative; }
        .preloader-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
        .loading-text {
            margin-top: 1.25rem;
            text-align: center;
            color: var(--accent-primary);
            letter-spacing: 2px;
            font-size: 0.875rem;
        }

        .notification {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            padding: 0.625rem 1.25rem;
            border-radius: 5px;
            font-size: 0.75rem;
            color: var(--accent-primary);
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 100;
        }

        .spectrum-analyzer {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 400px;
            background: var(--panel-bg);
            border: 1px solid var(--panel-border);
            border-radius: 5px;
            overflow: hidden;
            pointer-events: auto;
            z-index: 10;
        }
        .spectrum-header {
            padding: 0.5rem 0.625rem;
            background: rgba(0, 0, 0, 0.3);
            font-size: 0.875rem;
            color: var(--accent-primary);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .spectrum-title-wrap { display: inline-flex; align-items: center; gap: 0.375rem; }
        .spectrum-content { padding: 0; position: relative; }
        .spectrum-analyzer.is-collapsed .spectrum-content { display: none; }
        .spectrum-analyzer.spectrum-analyzer--in-right-column {
            position: relative;
            bottom: auto;
            right: auto;
            left: auto;
            top: auto;
            width: 100%;
            background: transparent;
            border: none;
            border-radius: 0;
            overflow: visible;
        }
        .spectrum-analyzer.spectrum-analyzer--in-right-column .spectrum-header {
            padding-left: 0;
            padding-right: 0;
            background: transparent;
        }
        .spectrum-analyzer.spectrum-analyzer--in-right-column .spectrum-content {
            padding-left: 0;
            padding-right: 0;
            padding-bottom: 0;
        }
        .mesh-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.625rem;
        }
        .mesh-list-actions { display: flex; gap: 0.375rem; }
        .mesh-list-icon-btn {
            padding: 0.25rem 0.5rem;
            border: 1px solid var(--panel-border);
            background: var(--panel-highlight);
            color: var(--accent-primary);
            border-radius: 3px;
            cursor: pointer;
            font-size: 0.6875rem;
        }
        .mesh-list-icon-btn:hover { background: var(--panel-border); }
        .mesh-list {
            max-height: 260px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.3125rem;
            scrollbar-width: thin;
            scrollbar-color: var(--mesh-scrollbar-thumb) var(--mesh-scrollbar-track);
        }
        .mesh-list::-webkit-scrollbar {
            width: 8px;
        }
        .mesh-list::-webkit-scrollbar-track {
            background: var(--mesh-scrollbar-track);
            border-radius: 999px;
        }
        .mesh-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--mesh-scrollbar-thumb) 0%, var(--accent-primary) 100%);
            border-radius: 999px;
            border: 1px solid var(--panel-border);
        }
        .mesh-list::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, var(--mesh-scrollbar-thumb-hover) 0%, var(--accent-primary) 100%);
        }
        .mesh-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.5rem;
            padding: 0.375rem 0.5rem;
            border: 1px solid var(--panel-border);
            border-radius: 3px;
            background: rgba(255, 78, 66, 0.03);
            cursor: pointer;
        }
        .mesh-row.is-active {
            border-color: var(--accent-primary);
            background: rgba(255, 78, 66, 0.15);
        }
        .mesh-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.75rem;
            color: var(--text-primary);
            text-transform: none;
        }
        .mesh-empty {
            color: var(--text-secondary);
            font-size: 0.75rem;
            text-transform: none;
        }

        .demo-tracks-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.3125rem; display: block; }

        .model-import-input { display: none; }
        .model-load-status {
            margin-top: 0.5rem;
            font-size: 0.72rem;
            color: var(--text-secondary);
            text-transform: none;
            line-height: 1.35;
            min-height: 1.1rem;
        }