        :root {
            --demo-shell: #eef1f6;
            --demo-surface: #ffffff;
            --demo-soft: #f6f8fb;
            --demo-line: rgba(15, 23, 42, .08);
            --demo-line-strong: rgba(15, 23, 42, .14);
            --demo-text: #0b1220;
            --demo-muted: #5b6577;
            --demo-faint: #8a94a6;
            --demo-accent: #4f6dff;
            --demo-accent-deep: #3550e8;
            --demo-accent-soft: rgba(79, 109, 255, .1);
            --demo-mint: #0f9f6e;
            --demo-danger: #e5484d;
            --demo-amber: #c27c0e;
            --demo-radius: 16px;
            --demo-radius-sm: 10px;
            --demo-gap: 10px;
            --demo-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
            --demo-ease: cubic-bezier(.22, 1, .36, 1);
            --demo-toolbar-width: 56px;
            --demo-inspector-width: 360px;
            --demo-topbar-height: 58px;
            --demo-status-height: auto;
            --demo-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
            --demo-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
        }

        * { box-sizing: border-box; }

        html,
        body.demo-body {
            width: 100%;
            height: 100%;
            margin: 0;
            overflow: hidden;
        }

        body.demo-body {
            background:
                radial-gradient(60% 50% at 15% 0%, rgba(79, 109, 255, .08), transparent 70%),
                radial-gradient(40% 40% at 100% 100%, rgba(15, 159, 110, .06), transparent 70%),
                var(--demo-shell);
            color: var(--demo-text);
            font-family: var(--demo-font);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .demo-body button,
        .demo-body input,
        .demo-body select,
        .demo-body textarea { font: inherit; }

        .demo-body :focus-visible {
            outline: 2px solid var(--demo-accent);
            outline-offset: 2px;
        }

        .demo-body ::-webkit-scrollbar { width: 8px; height: 8px; }
        .demo-body ::-webkit-scrollbar-thumb {
            border: 2px solid transparent;
            border-radius: 999px;
            background: rgba(15, 23, 42, .16) padding-box;
        }
        .demo-body ::-webkit-scrollbar-track { background: transparent; }

        /* ── 워크스페이스 레이아웃 ── */
        .demo-workspace {
            display: grid;
            grid-template-columns: var(--demo-toolbar-width) minmax(0, 1fr) var(--demo-inspector-width);
            grid-template-rows: var(--demo-topbar-height) minmax(0, 1fr) var(--demo-status-height);
            gap: var(--demo-gap);
            width: 100vw;
            height: 100dvh;
            padding: var(--demo-gap) var(--demo-gap) 4px;
        }

        .demo-topbar,
        .demo-drawing-toolbar,
        .demo-chart-stage,
        .demo-inspector {
            border-radius: var(--demo-radius);
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line), var(--demo-shadow);
        }

        /* ── 상단 바 ── */
        .demo-topbar {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            min-width: 0;
            padding: 0 8px 0 18px;
            z-index: 20;
        }

        .demo-brand {
            display: flex;
            align-items: center;
            gap: 10px;
            height: 100%;
            padding-right: 18px;
            flex: 0 0 auto;
        }

        .demo-brand-logo {
            display: block;
            width: auto;
            max-width: 128px;
            height: 20px;
            object-fit: contain;
            object-position: left center;
        }

        .demo-brand span,
        .demo-brand h1 {
            margin: 0;
            padding: 3px 9px;
            border-radius: 999px;
            background: var(--demo-accent-soft);
            color: var(--demo-accent-deep);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .01em;
            white-space: nowrap;
        }

        .demo-symbol {
            display: flex;
            align-items: center;
            gap: 10px;
            height: 34px;
            padding: 0 16px 0 14px;
            border-left: 1px solid var(--demo-line);
            flex: 0 0 auto;
        }

        .demo-symbol div { display: flex; flex-direction: column; gap: 1px; }
        .demo-symbol strong { font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
        .demo-symbol small { color: var(--demo-muted); font-size: 11px; }

        .demo-live-dot {
            position: relative;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--demo-mint);
        }

        .demo-live-dot::after {
            content: "";
            position: absolute;
            inset: -4px;
            border: 1px solid var(--demo-mint);
            border-radius: 50%;
            animation: demo-pulse 2s var(--demo-ease) infinite;
        }

        @keyframes demo-pulse {
            from { opacity: .9; transform: scale(.6); }
            to { opacity: 0; transform: scale(1.8); }
        }

        .demo-live-dot.paused { background: var(--demo-faint); }
        .demo-live-dot.paused::after { display: none; }

        #liveTickBtn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border-radius: 999px;
        }

        .demo-tick-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--demo-faint);
        }

        #liveTickBtn.active {
            background: color-mix(in srgb, var(--demo-mint) 12%, transparent);
            color: var(--demo-mint);
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--demo-mint) 40%, transparent);
        }

        #liveTickBtn.active .demo-tick-dot {
            background: var(--demo-mint);
            animation: demo-blink 1s steps(2, start) infinite;
        }

        @keyframes demo-blink { to { opacity: .25; } }

        .demo-top-actions {
            display: flex;
            align-items: center;
            gap: 4px;
            min-width: 0;
            height: 100%;
            margin-left: auto;
            padding: 0 4px;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .demo-top-actions button,
        .demo-drawing-toolbar button {
            border: 1px solid transparent;
            background: transparent;
            color: var(--demo-muted);
            cursor: pointer;
            transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--demo-ease), box-shadow .2s;
        }

        .demo-top-actions button {
            height: 36px;
            padding: 0 12px;
            border-radius: var(--demo-radius-sm);
            font-size: 13px;
            font-weight: 650;
            white-space: nowrap;
        }

        .demo-top-actions button:active,
        .demo-drawing-toolbar button:active { transform: scale(.94); }

        .demo-chart-mode {
            height: 36px;
            min-width: 96px;
            padding: 0 32px 0 14px;
            border: 1px solid var(--demo-line-strong);
            border-radius: 999px;
            background: var(--demo-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 13px;
            color: var(--demo-text);
            font-size: 13px;
            font-weight: 650;
            cursor: pointer;
            appearance: none;
            transition: border-color .2s, box-shadow .2s;
        }

        .demo-chart-mode:hover { border-color: rgba(15, 23, 42, .3); }

        .demo-icon-button,
        #saveToImageBtn {
            display: inline-grid;
            place-items: center;
            width: 36px;
            padding: 0;
        }

        #normalizeModeBtn { font-size: 16px; font-weight: 750; line-height: 1; }
        #resetViewBtn svg { width: 19px; height: 19px; }

        .demo-method-proxy { display: none !important; }

        .demo-top-actions button:hover,
        .demo-drawing-toolbar button:hover {
            background: rgba(15, 23, 42, .05);
            color: var(--demo-text);
        }

        .demo-top-actions button.active {
            background: var(--demo-accent-soft);
            color: var(--demo-accent-deep);
            box-shadow: inset 0 0 0 1px rgba(79, 109, 255, .35);
        }

        .demo-divider {
            width: 1px;
            height: 22px;
            margin: 0 6px;
            background: var(--demo-line-strong);
            flex: 0 0 auto;
        }

        /* ── 드로잉 툴바 ── */
        .demo-drawing-toolbar {
            grid-column: 1;
            grid-row: 2 / 4;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            padding: 9px 0;
            overflow-x: hidden;
            overflow-y: auto;
            scrollbar-width: none;
        }

        .demo-drawing-toolbar::-webkit-scrollbar { display: none; }

        .demo-drawing-toolbar button {
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            width: 38px;
            height: 36px;
            padding: 0;
            border-radius: var(--demo-radius-sm);
            font-size: 15px;
            font-weight: 700;
        }

        .demo-drawing-toolbar button.active {
            background: linear-gradient(135deg, #7d95ff, var(--demo-accent-deep));
            color: #fff;
            box-shadow: 0 6px 16px -6px rgba(79, 109, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
        }

        .demo-tool-divider {
            flex: 0 0 auto;
            width: 24px;
            height: 1px;
            margin: 5px 0;
            background: var(--demo-line-strong);
        }

        .demo-drawing-toolbar .danger { color: var(--demo-danger); }
        .demo-drawing-toolbar .danger:hover { background: rgba(229, 72, 77, .09); color: var(--demo-danger); }

        /* ── 차트 영역 ── */
        .demo-chart-stage {
            grid-column: 2;
            grid-row: 2;
            display: grid;
            gap: 1px;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
            background: var(--demo-line);
        }

        .demo-chart-stage[data-sync-layout="one"] {
            grid-template-columns: minmax(0, 1fr);
            grid-template-rows: minmax(0, 1fr);
        }

        .demo-chart-stage[data-sync-layout="two"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-template-rows: minmax(0, 1fr);
        }

        .demo-chart-stage[data-sync-layout="three"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-template-rows: minmax(0, 70%) minmax(220px, 30%);
        }

        .demo-chart-panel {
            display: grid;
            grid-template-rows: 40px minmax(0, 1fr);
            min-width: 0;
            min-height: 0;
            overflow: hidden;
            background: var(--demo-surface);
        }

        .demo-chart-panel[hidden] { display: none; }

        .demo-chart-stage[data-sync-layout="three"] [data-sync-chart="main"] { grid-column: 1 / -1; grid-row: 1; }
        .demo-chart-stage[data-sync-layout="three"] [data-sync-chart="compare1"] { grid-column: 1; grid-row: 2; }
        .demo-chart-stage[data-sync-layout="three"] [data-sync-chart="compare2"] { grid-column: 2; grid-row: 2; }

        .demo-chart-heading {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            padding: 0 16px;
            border-bottom: 1px solid var(--demo-line);
            font-size: 12px;
            white-space: nowrap;
        }

        .demo-chart-heading strong { font-size: 13px; font-weight: 750; letter-spacing: -.01em; }

        .demo-chart-heading .demo-heading-symbol {
            padding: 2px 8px;
            border-radius: 6px;
            background: rgba(15, 23, 42, .05);
            color: var(--demo-text);
            font-family: var(--demo-mono);
            font-size: 11px;
            font-weight: 600;
        }

        .demo-chart-heading .demo-heading-context {
            overflow: hidden;
            color: var(--demo-faint);
            text-overflow: ellipsis;
        }

        .demo-chart-stage .coForward-chart2-price-info > header { display: none; }
        .demo-chart-stage .coForward-chart2-price-info { top: 10px; left: 14px; font-family: var(--demo-font); }
        .demo-chart-stage .chart-legend { top: 36px; left: 14px; font-family: var(--demo-font); }
        .demo-chart-stage .coForward-chart2-subPanelLabel { font-family: var(--demo-font); }

        /* 차트 색상 다듬기: 라이브러리 CSS 변수만 덮어쓴다 */
        .demo-chart-stage {
            --chart-axis-text: #5b6577;
            --chart-axis-line: rgba(15, 23, 42, .18);
            --chart-grid: rgba(15, 23, 42, .06);
            --chart-bullish: #12a87a;
            --chart-bearish: #ef4452;
            --chart-vol-bullish: rgba(18, 168, 122, .28);
            --chart-vol-bearish: rgba(239, 68, 82, .28);
            --chart-crosshair: #3550e8;
            --chart-accent: #4f6dff;
        }

        .demo-chart-stage .chart-last-close-label,
        .demo-chart-stage .chart-crosshair-label { border-radius: 4px; font-family: var(--demo-mono); font-size: 11px; }
        .demo-chart-stage .coForward-chart2-legend li { border-radius: 6px; }

        #test01,
        #test01Sync,
        #test01SyncInverse {
            min-width: 0;
            min-height: 0;
            height: 100%;
            background: var(--demo-surface);
        }

        /* ── 인스펙터 ── */
        .demo-inspector {
            grid-column: 3;
            grid-row: 2;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
        }

        .demo-inspector-inner {
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            width: 100%;
            height: 100%;
        }

        .demo-inspector-tabs {
            display: flex;
            gap: 2px;
            margin: 10px 10px 0;
            padding: 3px;
            overflow-x: auto;
            border-radius: 12px;
            background: rgba(15, 23, 42, .045);
            scrollbar-width: none;
        }

        .demo-inspector-tabs::-webkit-scrollbar { display: none; }

        .demo-body .demo-tab-button {
            flex: 1 1 auto;
            height: 32px;
            padding: 0 6px;
            border: 0;
            border-radius: 9px;
            background: transparent;
            color: var(--demo-muted);
            font-size: 12px;
            font-weight: 650;
            white-space: nowrap;
            cursor: pointer;
            transition: background-color .25s var(--demo-ease), color .2s, box-shadow .25s;
        }

        .demo-body .demo-tab-button:hover { color: var(--demo-text); }

        .demo-body .demo-tab-button.active {
            background: var(--demo-surface);
            color: var(--demo-text);
            box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--demo-line);
        }

        .demo-inspector-content {
            min-height: 0;
            padding: 10px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(15, 23, 42, .16) transparent;
        }

        .demo-tab-pane { display: none; }
        .demo-tab-pane.active { display: block; animation: demo-fade .35s var(--demo-ease); }

        @keyframes demo-fade {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: none; }
        }

        .demo-panel-group {
            margin-bottom: 10px;
            border-radius: 14px;
            background: var(--demo-soft);
            box-shadow: inset 0 0 0 1px var(--demo-line);
        }

        .demo-panel-group h2 {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            padding: 13px 14px 2px;
            color: var(--demo-text);
            font-size: 13px;
            font-weight: 750;
            letter-spacing: -.01em;
            line-height: 1.2;
        }

        .demo-panel-group h2::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 2px;
            background: linear-gradient(135deg, var(--demo-accent), var(--demo-mint));
        }

        .demo-panel-body {
            display: grid;
            gap: 10px;
            padding: 10px 14px 14px;
        }

        /* ── 폼 요소 ── */
        .demo-field-row { display: flex; gap: 8px; }

        .demo-field {
            display: grid;
            flex: 1 1 0;
            gap: 5px;
            min-width: 0;
            color: var(--demo-muted);
            font-size: 11px;
            font-weight: 600;
        }

        .demo-field[hidden] { display: none; }

        .demo-field input,
        .demo-field select,
        .demo-textarea,
        .demo-action-control select,
        .demo-action-control input,
        .demo-date-navigation > input {
            width: 100%;
            min-width: 0;
            height: 36px;
            padding: 0 11px;
            border: 1px solid var(--demo-line-strong);
            border-radius: var(--demo-radius-sm);
            background: var(--demo-surface);
            color: var(--demo-text);
            font-size: 12px;
            transition: border-color .2s, box-shadow .2s;
        }

        .demo-field select,
        .demo-action-control select {
            padding-right: 30px;
            background: var(--demo-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
            appearance: none;
            cursor: pointer;
        }

        .demo-field input:hover,
        .demo-field select:hover,
        .demo-textarea:hover,
        .demo-action-control select:hover,
        .demo-action-control input:hover,
        .demo-date-navigation > input:hover { border-color: rgba(15, 23, 42, .26); }

        .demo-field input:focus,
        .demo-field select:focus,
        .demo-textarea:focus,
        .demo-action-control select:focus,
        .demo-action-control input:focus,
        .demo-date-navigation > input:focus {
            z-index: 1;
            outline: none;
            border-color: var(--demo-accent);
            box-shadow: 0 0 0 3px rgba(79, 109, 255, .16);
        }

        .demo-textarea {
            height: auto;
            padding: 10px 12px;
            resize: vertical;
            font-family: var(--demo-mono);
            line-height: 1.55;
        }

        .demo-check {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--demo-text);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

        .demo-check input,
        .demo-sync-option input {
            width: 16px;
            height: 16px;
            margin: 0;
            accent-color: var(--demo-accent);
            cursor: pointer;
        }

        .demo-form-section,
        .demo-range-section { display: grid; gap: 8px; }

        .demo-form-section + .demo-form-section,
        .demo-range-section + .demo-range-section {
            padding-top: 12px;
            border-top: 1px dashed var(--demo-line-strong);
        }

        .demo-section-label,
        .demo-date-navigation > label,
        .demo-action-field > label {
            color: var(--demo-faint);
            font-size: 10.5px;
            font-weight: 700;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .demo-data-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
            gap: 8px;
        }

        .demo-data-actions,
        .demo-state-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .demo-state-actions-three,
        .demo-alert-actions {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
        }

        .demo-body .demo-wide-button,
        .demo-body .demo-data-actions .demo-panel-button,
        .demo-state-destroy,
        .demo-json-query { width: 100%; }

        /* 입력 + 버튼 결합형 컨트롤 */
        .demo-action-field { display: grid; gap: 5px; }

        .demo-action-control,
        .demo-vwap-add-control {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 64px;
            align-items: end;
            gap: 6px;
        }

        .demo-vwap-add-control.fixed { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 64px; }

        .demo-average-add-control {
            display: grid;
            grid-template-columns: minmax(0, 1.25fr) minmax(64px, .7fr) 64px;
            align-items: end;
            gap: 6px;
        }

        .demo-body .demo-action-control .demo-panel-button,
        .demo-body .demo-average-add-control .demo-panel-button,
        .demo-body .demo-vwap-add-control .demo-panel-button {
            width: 100%;
            height: 36px;
            padding-inline: 8px;
        }

        .demo-date-navigation {
            display: grid;
            gap: 8px;
            padding-bottom: 12px;
            border-bottom: 1px dashed var(--demo-line-strong);
        }

        .demo-date-actions {
            display: grid;
            grid-template-columns: 1fr 1.2fr .75fr;
            padding: 3px;
            border-radius: 12px;
            background: rgba(15, 23, 42, .045);
            gap: 3px;
        }

        .demo-body .demo-date-actions .demo-panel-button {
            width: 100%;
            min-height: 30px;
            border-color: transparent;
            border-radius: 9px;
            background: transparent;
            box-shadow: none;
        }

        .demo-body .demo-date-actions .demo-panel-button:hover {
            background: var(--demo-surface);
            box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--demo-line);
        }

        .demo-range-inputs {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        /* 콘솔형 출력 */
        .demo-range-output,
        .demo-event-log {
            width: 100%;
            margin: 0;
            padding: 12px 14px;
            overflow: auto;
            border-radius: 12px;
            background: #0b1220;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px -14px rgba(15, 23, 42, .6);
            color: #d7deea;
            font: 11.5px/1.65 var(--demo-mono);
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .demo-range-output { min-height: 92px; }
        .demo-event-log { min-height: 190px; max-height: 300px; }

        /* 마크 토글 칩 */
        .demo-mark-options {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .demo-mark-option { position: relative; min-width: 0; cursor: pointer; }

        .demo-mark-option input {
            position: absolute;
            width: 1px;
            height: 1px;
            margin: -1px;
            overflow: hidden;
            clip-path: inset(50%);
            white-space: nowrap;
        }

        .demo-mark-option span {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 38px;
            padding: 0 12px;
            border-radius: var(--demo-radius-sm);
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line-strong);
            color: var(--demo-muted);
            font-size: 12px;
            font-weight: 650;
            transition: background-color .2s, color .2s, box-shadow .2s;
        }

        .demo-mark-option span::before {
            content: "";
            flex: 0 0 auto;
            width: 14px;
            height: 14px;
            border-radius: 4px;
            box-shadow: inset 0 0 0 1.5px rgba(15, 23, 42, .25);
            transition: background-color .2s, box-shadow .2s;
        }

        .demo-mark-option:hover span { color: var(--demo-text); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .28); }

        .demo-mark-option input:checked + span {
            background: rgba(79, 109, 255, .07);
            box-shadow: inset 0 0 0 1px rgba(79, 109, 255, .5);
            color: var(--demo-accent-deep);
        }

        .demo-mark-option input:checked + span::before {
            background: var(--demo-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") no-repeat center / 10px;
            box-shadow: none;
        }

        .demo-mark-option input:focus-visible + span { outline: 2px solid var(--demo-accent); outline-offset: 2px; }

        /* 활성 목록 */
        .demo-average-list-section {
            display: grid;
            gap: 8px;
            padding-top: 12px;
            border-top: 1px dashed var(--demo-line-strong);
        }

        .demo-active-average-list { display: grid; gap: 6px; }

        .demo-active-average {
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 38px;
            padding: 0 6px 0 12px;
            border-radius: var(--demo-radius-sm);
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line);
        }

        .demo-active-average > span { min-width: 0; color: var(--demo-muted); font-size: 12px; }
        .demo-active-average > span strong { margin-left: 2px; color: var(--demo-accent-deep); font-family: var(--demo-mono); }

        .demo-active-average > button {
            height: 26px;
            padding: 0 10px;
            border: 0;
            border-radius: 7px;
            background: transparent;
            color: var(--demo-danger);
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: background-color .2s;
        }

        .demo-active-average > button:hover { background: rgba(229, 72, 77, .09); }

        .demo-empty-state {
            padding: 14px 10px;
            border: 1px dashed var(--demo-line-strong);
            border-radius: var(--demo-radius-sm);
            color: var(--demo-faint);
            font-size: 11px;
            text-align: center;
        }

        .demo-button-row { display: flex; flex-wrap: wrap; gap: 6px; }

        .demo-state-toggle {
            display: grid;
            grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
            align-items: center;
            gap: 8px;
            padding: 6px 6px 6px 12px;
            border-radius: 12px;
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line);
        }

        /* JSON 편집 */
        .demo-json-editor-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            color: var(--demo-text);
            font-size: 12px;
            font-weight: 700;
        }

        .demo-json-status {
            padding: 3px 9px;
            border-radius: 999px;
            background: rgba(15, 23, 42, .06);
            color: var(--demo-muted);
            font-size: 10.5px;
            font-weight: 700;
        }

        .demo-json-status[data-state="changed"] { background: rgba(194, 124, 14, .12); color: var(--demo-amber); }
        .demo-json-status[data-state="success"] { background: rgba(15, 159, 110, .12); color: var(--demo-mint); }
        .demo-json-status[data-state="error"] { background: rgba(229, 72, 77, .12); color: var(--demo-danger); }

        .demo-json-editor {
            min-height: 190px;
            background: #fbfcfe;
            font-size: 11.5px;
            tab-size: 2;
        }

        /* ── 버튼 ── */
        .demo-body .demo-panel-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 1 1 calc(50% - 3px);
            min-height: 36px;
            padding: 0 12px;
            border: 1px solid var(--demo-line-strong);
            border-radius: var(--demo-radius-sm);
            background: var(--demo-surface);
            color: var(--demo-text);
            font-size: 12px;
            font-weight: 650;
            line-height: 1.2;
            text-align: center;
            white-space: nowrap;
            cursor: pointer;
            transition: transform .25s var(--demo-ease), background-color .2s, border-color .2s, box-shadow .25s var(--demo-ease), color .2s;
        }

        .demo-body .demo-panel-button:hover {
            border-color: rgba(15, 23, 42, .28);
            box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .25);
        }

        .demo-body .demo-panel-button:active { transform: scale(.97); }

        .demo-body .demo-panel-button.primary,
        .demo-body .demo-panel-button.active {
            border-color: transparent;
            background: linear-gradient(135deg, #7d95ff, var(--demo-accent-deep));
            color: #fff;
            box-shadow: 0 8px 20px -10px rgba(79, 109, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
        }

        .demo-body .demo-panel-button.primary:hover,
        .demo-body .demo-panel-button.active:hover {
            box-shadow: 0 12px 24px -10px rgba(79, 109, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .3);
        }

        .demo-body .demo-panel-button.danger {
            border-color: rgba(229, 72, 77, .28);
            background: rgba(229, 72, 77, .05);
            color: var(--demo-danger);
        }

        .demo-body .demo-panel-button.danger:hover {
            border-color: rgba(229, 72, 77, .5);
            background: rgba(229, 72, 77, .1);
            box-shadow: none;
        }

        .demo-body .demo-panel-button:disabled {
            border-color: var(--demo-line);
            background: var(--demo-soft);
            color: var(--demo-faint);
            box-shadow: none;
            cursor: not-allowed;
            transform: none;
        }

        .demo-panel-hint {
            margin: 0;
            color: var(--demo-muted);
            font-size: 11px;
            line-height: 1.55;
        }

        /* ── 이벤트 모니터 ── */
        .demo-event-status-row,
        .demo-event-log-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            color: var(--demo-muted);
            font-size: 11px;
        }

        .demo-event-status-row {
            padding: 9px 12px;
            border-radius: var(--demo-radius-sm);
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line);
        }

        .demo-event-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--demo-faint);
            font-size: 11px;
            font-weight: 750;
        }

        .demo-event-status::before {
            content: "";
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: currentColor;
        }

        .demo-event-status[data-connected="true"] { color: var(--demo-mint); }
        .demo-event-status[data-connected="true"]::before { box-shadow: 0 0 0 3px rgba(15, 159, 110, .18); }
        .demo-event-log-heading strong { color: var(--demo-text); font-family: var(--demo-mono); }

        /* ── 동기화 ── */
        .demo-sync-options { display: grid; gap: 6px; }

        .demo-sync-option {
            display: grid;
            grid-template-columns: 18px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            min-height: 48px;
            padding: 8px 12px;
            border-radius: 12px;
            background: var(--demo-surface);
            box-shadow: inset 0 0 0 1px var(--demo-line);
            cursor: pointer;
            transition: box-shadow .2s, background-color .2s;
        }

        .demo-sync-option:hover { box-shadow: inset 0 0 0 1px var(--demo-line-strong); }

        .demo-sync-option.active {
            background: rgba(79, 109, 255, .06);
            box-shadow: inset 0 0 0 1px rgba(79, 109, 255, .45);
        }

        .demo-sync-option-all { margin-bottom: 4px; background: transparent; box-shadow: inset 0 0 0 1px var(--demo-line-strong); }
        .demo-sync-option span { display: grid; gap: 2px; min-width: 0; }
        .demo-sync-option strong { color: var(--demo-text); font-size: 12px; }
        .demo-sync-option small { color: var(--demo-faint); font-size: 10.5px; }

        .demo-sync-status {
            padding: 10px 12px;
            border-radius: var(--demo-radius-sm);
            background: rgba(15, 23, 42, .04);
            color: var(--demo-muted);
            font-size: 11px;
            line-height: 1.5;
        }

        .demo-sync-status[data-connected="true"] { background: rgba(15, 159, 110, .1); color: var(--demo-mint); font-weight: 650; }

        /* ── 안내 토스트 ── */
        .demo-notice-region {
            position: fixed;
            right: 20px;
            bottom: 36px;
            z-index: 1000;
            width: min(380px, calc(100vw - 32px));
            pointer-events: none;
        }

        .demo-notice {
            position: relative;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 12px;
            padding: 14px 12px 14px 18px;
            overflow: hidden;
            border-radius: 14px;
            background: rgba(255, 255, 255, .9);
            box-shadow: inset 0 0 0 1px var(--demo-line-strong), 0 24px 48px -16px rgba(15, 23, 42, .3);
            backdrop-filter: saturate(160%) blur(16px);
            -webkit-backdrop-filter: saturate(160%) blur(16px);
            opacity: 0;
            transform: translateY(12px) scale(.98);
            transition: opacity .25s var(--demo-ease), transform .35s var(--demo-ease);
            pointer-events: auto;
        }

        .demo-notice::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 4px;
            background: linear-gradient(180deg, var(--demo-accent), var(--demo-mint));
        }

        .demo-notice.visible { opacity: 1; transform: none; }
        .demo-notice strong { display: block; margin-bottom: 4px; color: var(--demo-text); font-size: 13px; }
        .demo-notice p { margin: 0; color: var(--demo-muted); font-size: 12px; line-height: 1.55; }

        .demo-notice-close {
            align-self: start;
            width: 26px;
            height: 26px;
            padding: 0;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--demo-faint);
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
        }

        .demo-notice-close:hover { background: rgba(15, 23, 42, .06); color: var(--demo-text); }

        /* ── 다이얼로그 (라이브러리 팝업 포함) ── */
        .demo-body .coForward-drawing-setting-dialog {
            border: 0;
            border-radius: 16px;
            box-shadow: inset 0 0 0 1px var(--demo-line-strong), 0 30px 60px -20px rgba(15, 23, 42, .35);
        }

        .demo-body .coForward-chart2-drawing-setting > header { height: 50px; padding: 0 12px 0 18px; }
        .demo-body .coForward-chart2-drawing-setting .dialog-close { border-radius: 8px; }
        .demo-body .drawing-setting-preview { border-radius: 12px; border-color: var(--demo-line); }
        .demo-body .coForward-chart2-drawing-setting input,
        .demo-body .coForward-chart2-drawing-setting select,
        .demo-body .coForward-chart2-drawing-setting footer button { border-radius: 9px; border-color: var(--demo-line-strong); }
        .demo-body .coForward-chart2-drawing-setting input:focus,
        .demo-body .coForward-chart2-drawing-setting select:focus { box-shadow: 0 0 0 3px rgba(79, 109, 255, .16); }
        .demo-body .coForward-chart2-drawing-setting footer .btn-submit {
            border-color: transparent;
            background: linear-gradient(135deg, #7d95ff, var(--demo-accent-deep));
            box-shadow: 0 8px 20px -10px rgba(79, 109, 255, .9);
        }

        .demo-body .subPanel-setting-dialog {
            border-radius: 14px;
            box-shadow: 0 0 0 1px var(--demo-line-strong), 0 20px 40px -16px rgba(15, 23, 42, .3);
            font-family: var(--demo-font);
        }

        .demo-body .subPanel-setting-dialog input,
        .demo-body .subPanel-setting-dialog .dialog-buttons button { border-radius: 8px; }
        .demo-body .subPanel-setting-dialog .dialog-buttons button:first-child { border-color: transparent; background: var(--demo-accent); }

        .demo-alert-details-dialog {
            top: 18px;
            left: 50%;
            z-index: 1100;
            width: 380px;
            transform: translateX(-50%);
        }

        .demo-alert-dialog-body { padding-block: 12px !important; }

        .demo-alert-details {
            display: grid;
            grid-template-columns: 86px minmax(0, 1fr);
            margin: 0;
            overflow: hidden;
            border-radius: 12px;
            box-shadow: inset 0 0 0 1px var(--demo-line);
        }

        .demo-alert-details dt,
        .demo-alert-details dd {
            min-width: 0;
            margin: 0;
            padding: 9px 12px;
            border-bottom: 1px solid var(--demo-line);
            font-size: 12px;
            line-height: 1.4;
        }

        .demo-alert-details dt:nth-last-of-type(1),
        .demo-alert-details dd:last-child { border-bottom: 0; }
        .demo-alert-details dt { background: var(--demo-soft); color: var(--demo-muted); font-weight: 650; }
        .demo-alert-details dd { color: var(--demo-text); overflow-wrap: anywhere; }

        .demo-alert-dialog-empty {
            margin: 0;
            padding: 24px 10px;
            color: var(--demo-muted);
            font-size: 12px;
            text-align: center;
        }

        /* ── 상태 바 ── */
        .demo-statusbar {
            grid-column: 2 / 4;
            grid-row: 3;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 6px 16px;
            padding: 4px 6px;
            color: var(--demo-faint);
            font-size: 11px;
            white-space: normal;
        }

        .demo-contact {
            flex-basis: 100%;
            min-width: 0;
            padding-top: 6px;
            border-top: 1px solid var(--demo-line-strong);
            color: var(--demo-muted);
            font-size: 12px;
            line-height: 1.6;
            overflow-wrap: anywhere;
        }
        .demo-contact p { margin: 0; }
        .demo-contact a { display: inline-block; color: var(--demo-accent-deep); font-weight: 700; }

        .demo-statusbar span:first-child {
            display: inline-flex;
            align-items: center;
            gap: 7px;
        }

        .demo-statusbar a {
            color: inherit;
        }

        .demo-statusbar span:first-child::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--demo-mint);
            box-shadow: 0 0 0 3px rgba(15, 159, 110, .15);
        }

        /* ── 반응형 ── */
        @media (max-width: 1100px) {
            :root { --demo-inspector-width: 310px; }
            .demo-symbol { display: none; }
        }

        @media (max-width: 720px) {
            :root { --demo-gap: 8px; }

            html,
            body.demo-body { overflow: auto; }

            .demo-workspace {
                grid-template-columns: var(--demo-toolbar-width) minmax(0, 1fr);
                grid-template-rows: auto minmax(560px, 75vh) auto auto;
                width: 100%;
                height: auto;
                min-height: 100dvh;
            }

            .demo-topbar { flex-wrap: wrap; padding: 8px 8px 4px 14px; }
            .demo-brand { height: 40px; }
            .demo-top-actions { order: 3; width: 100%; height: 46px; margin-left: 0; border-top: 1px solid var(--demo-line); }
            .demo-drawing-toolbar { grid-row: 2; }
            .demo-chart-stage { grid-column: 2; grid-row: 2; }
            .demo-chart-stage[data-sync-layout] {
                grid-template-columns: minmax(0, 1fr);
                grid-template-rows: none;
                grid-auto-rows: minmax(520px, 1fr);
                overflow: auto;
            }
            .demo-chart-stage[data-sync-layout] .demo-chart-panel { grid-column: auto; grid-row: auto; }
            .demo-inspector { grid-column: 1 / -1; grid-row: 3; }
            .demo-statusbar { grid-column: 1 / -1; grid-row: 4; min-height: 28px; flex-wrap: wrap; white-space: normal; }
        }

        @media (prefers-reduced-motion: reduce) {
            .demo-body *, .demo-body *::before, .demo-body *::after {
                animation-duration: .01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .01ms !important;
            }
        }
    