        body { 
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
            padding: 0; margin: 0; background: #121212; color: #ffffff; 
            display: flex; flex-direction: column; height: 100vh; overflow: hidden;
            letter-spacing: -0.3px;
        }
        .header { 
            background: #1c1c1e; padding: 16px 24px; border-bottom: 1px solid #2c2c2e; 
            display: flex; justify-content: space-between; align-items: center; 
        }
        .header h2 { margin: 0; font-size: 16px; font-weight: 700; color: #e5e5ea; }
        
        .main-container { flex: 1; display: grid; grid-template-columns: 1fr 1.2fr; overflow: hidden; }
        
        .left-panel { padding: 32px 24px; overflow-y: auto; border-right: 1px solid #2c2c2e; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; }
        .right-panel { padding: 24px; background: #18181a; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; }
        
        .card { background: #1c1c1e; padding: 24px; border-radius: 12px; border: 1px solid #2c2c2e; margin-bottom: 20px; position: relative; }
        .step-title { font-size: 12px; font-weight: 700; color: #0a84ff; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
        h3 { font-size: 18px; font-weight: 700; margin-top: 0; margin-bottom: 24px; color: #ffffff; }
        
        .required { color: #ff453a; margin-left: 3px; font-weight: bold; }
        
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        label { display: block; font-size: 13px; color: #8e8e93; margin-bottom: 8px; }
        input, select, textarea { 
            width: 100%; padding: 12px 14px; box-sizing: border-box; background: #2c2c2e; 
            border: 1px solid #3a3a3c; border-radius: 8px; color: #ffffff; font-size: 14px; transition: all 0.15s ease;
        }
        input:focus, select:focus, textarea:focus { border-color: #ffffff; outline: none; background: #3a3a3c; }
        
        .toggle-container { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: #2c2c2e; padding: 12px 14px; border-radius: 8px; border: 1px solid #3a3a3c; }
        .toggle-container input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; }
        .toggle-label { font-size: 13px; color: #e5e5ea; cursor: pointer; user-select: none; }
        
        .chip-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 10px; background: #141416; border-radius: 6px; border: 1px solid #2c2c2e; min-height: 36px; }
        .page-chip { background: #2c2c2e; color: #0a84ff; font-size: 12px; padding: 4px 8px; border-radius: 4px; border: 1px solid #3a3a3c; font-weight: 600; }
        
        .step-controller { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
        
        .btn { 
            padding: 12px 24px; font-weight: 600; font-size: 14px; border-radius: 8px; cursor: pointer; 
            border: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s ease;
        }
        .btn-white { background: #ffffff; color: #000000; }
        .btn-white:hover { background: #e5e5ea; }
        .btn-dark { background: #2c2c2e; color: #ffffff; border: 1px solid #3a3a3c; }
        .btn-dark:hover { background: #3a3a3c; }
        .btn-success { background: #30d158; color: #000000; }
        .btn-success:hover { background: #28b84e; }
        .btn-info { background: #0a84ff; color: #ffffff; }
        .btn-info:hover { background: #0070e3; }
        
        .loading-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background: #141416; border-radius: 8px; border: 1px solid #2c2c2e; margin-top: 16px; }
        .spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: #0a84ff; animation: spin 0.8s linear infinite; margin-bottom: 12px; }
        
        .progress-wrapper { width: 100%; background: #2c2c2e; height: 6px; border-radius: 3px; margin-top: 12px; overflow: hidden; display: none; }
        .progress-bar { width: 0%; height: 100%; background: #30d158; transition: width 0.1s ease; }

        .viewer-box { 
            background: #111112; padding: 20px; border-radius: 12px; min-height: 540px; margin: 16px 0; 
            box-shadow: inset 0 0 20px rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: flex-start; 
            overflow: auto; border: 1px solid #2c2c2e; transition: all 0.25s ease;
        }
        .mockup-frame {
            background: #ffffff; color: #000000; box-shadow: 0 12px 40px rgba(0,0,0,0.7); 
            border-radius: 8px; overflow-y: auto; box-sizing: border-box; padding: 20px;
            transition: all 0.25s ease; position: relative;
        }
        .device-mobile { width: 360px; height: 640px; border: 4px solid #3a3a3c; border-radius: 24px; }
        .device-tablet { width: 1024px; height: 680px; border: 5px solid #48484a; border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #e5e5ea; }
        
        .tablet-page-container { background: #ffffff; height: 100%; position: relative; border-radius: 4px; padding: 12px; box-sizing: border-box; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

        .simulated-text-element { 
            position: absolute; 
            font-family: -apple-system, sans-serif; 
            white-space: nowrap;      /* 💡 pre에서 nowrap으로 변경하여 강제 개행 및 공백 꼬임 차단 */
            word-break: keep-all;     /* 💡 단어가 중간에 쪼개져서 아래로 튕겨 나가는 현상 방지 */
            color: #111111; 
            z-index: 2; 
            line-height: normal; 
            overflow: visible; 
        }
        .simulated-image-element {
            position: absolute; z-index: 1;
        }
        
        canvas { width: 100% !important; height: auto !important; box-shadow: 0 2px 8px rgba(0,0,0,0.15); border-radius: 4px; }
        .id-warn-text { color: #ff453a; font-size: 11px; font-weight: bold; margin-top: 4px; display: none; }
        .hidden { display: none !important; }
        .disabled-btn { opacity: 0.15 !important; pointer-events: none !important; }

        .selector-group { display: flex; gap: 4px; background: #2c2c2e; padding: 2px; border-radius: 6px; }
        .device-tab-btn { background: transparent; border: none; color: #8e8e93; font-size: 12px; font-weight: 600; padding: 6px 12px; cursor: pointer; border-radius: 4px; }
        .device-tab-btn.active { background: #3a3a3c; color: #ffffff; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


        /* ==========================================================================
   수식 목록 모니터링 콘솔 컴포넌트 
   ========================================================================== */
.math-index-container {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 8px;
    margin-top: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.math-index-header {
    background: #2c2c2e;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #e5e5ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.math-index-header:hover {
    background: #3a3a3c;
}

.math-badge {
    background: #0a84ff;
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.math-index-list {
    max-height: 160px;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
    background: #141416;
}

/* 개별 수식 바로가기 아이템 버튼 */
.math-item-btn {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.math-item-btn:hover {
    border-color: #30d158;
    background: #252528;
}

.math-item-btn .math-code {
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    color: #30d158;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.math-item-btn .math-page-tag {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 600;
    background: #2c2c2e;
    padding: 2px 5px;
    border-radius: 4px;
}