<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>케이블발열 &#8211; MyEngNote</title>
	<atom:link href="https://myengnote.com/tag/%EC%BC%80%EC%9D%B4%EB%B8%94%EB%B0%9C%EC%97%B4/feed/" rel="self" type="application/rss+xml" />
	<link>https://myengnote.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Jul 2026 04:43:08 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>케이블 허용전류 계산기 &#038; 시뮬레이터</title>
		<link>https://myengnote.com/cable-sizing-calculator-simulator/</link>
					<comments>https://myengnote.com/cable-sizing-calculator-simulator/#respond</comments>
		
		<dc:creator><![CDATA[동동]]></dc:creator>
		<pubDate>Fri, 26 Jun 2026 21:28:09 +0000</pubDate>
				<category><![CDATA[공학계산기]]></category>
		<category><![CDATA[전선단면적]]></category>
		<category><![CDATA[전압강하]]></category>
		<category><![CDATA[케이블공칭규격]]></category>
		<category><![CDATA[케이블발열]]></category>
		<category><![CDATA[허용전류]]></category>
		<guid isPermaLink="false">https://myengnote.com/cable-sizing-calculator-simulator/</guid>

					<description><![CDATA[부하 전류, 전송 거리, 허용 전압 강하율 및 포설 환경을 입력하여 규격에 적합한 케이블 단면적(sq/mm²)을 설계하고 전하 밀도와 케이블 발열 상태를 2D 시각화하는 시뮬레이터입니다. <a href="https://myengnote.com/cable-sizing-calculator-simulator/" style="text-decoration:none; color:#0073aa; font-weight:bold;">[본문 전체보기 >]</a>]]></description>
										<content:encoded><![CDATA[
<h2 style="font-size: 1.6em; font-weight: 800; color: #0c0e25; border-bottom: 2px solid #00f2fe; padding-bottom: 8px; margin-bottom: 20px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 케이블 허용전류 계산기 &#038; 시뮬레이터</h2>


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&#038;family=Outfit:wght@400;500;600;700;800&#038;display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Scoped & Isolated Styles for cablesizing-calculator-wrapper */
        /* Modern Reset and Design Tokens */
        .cablesizing-calculator-wrapper *, .cablesizing-calculator-wrapper *::before, .cablesizing-calculator-wrapper *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        .cablesizing-calculator-wrapper {
            --color-bg-dark: #f8f9fd;
            --color-bg-deep: #ffffff;
            --color-panel-bg: rgba(255, 255, 255, 0.85);
            --color-border: rgba(0, 0, 0, 0.06);
            --color-border-hover: rgba(0, 0, 0, 0.12);
            --color-text-main: #1e293b;
            --color-text-muted: #475569;
            --color-text-dark: #94a3b8;
            --color-cyan: #0284c7; /* Cobalt blue accent */
            --color-cyan-glow: rgba(2, 132, 199, 0.15);
            --color-magenta: #db2777; /* Pink/magenta accent */
            --color-magenta-glow: rgba(219, 39, 119, 0.15);
            --color-purple: #7c3aed;
            --color-purple-glow: rgba(124, 58, 237, 0.12);
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-danger: #ef4444;
            --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
            --gradient-accent: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-purple) 100%);
            --gradient-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
            --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            --shadow-neon-cyan: 0 0 15px var(--color-cyan-glow);
            --shadow-neon-magenta: 0 0 15px var(--color-magenta-glow);
            --shadow-card: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
            --blur-glass: blur(16px);
        }
        .cablesizing-calculator-wrapper {
            background-color: var(--color-bg-dark);
            color: var(--color-text-main);
            font-family: var(--font-body);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
        }
        .app-background-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }
        .app-background-glow::before, 
        .app-background-glow::after {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            border-radius: 50%;
            filter: blur(140px);
            opacity: 0.15;
        }
        .app-background-glow::before {
            background: var(--color-cyan);
            top: -10%;
            right: -5%;
            animation: pulse-slow 15s infinite alternate;
        }
        .app-background-glow::after {
            background: var(--color-purple);
            bottom: -10%;
            left: -5%;
            animation: pulse-slow 20s infinite alternate-reverse;
        }
        @keyframes pulse-slow {
            0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
            100% { transform: scale(1.2) translate(50px, 50px); opacity: 0.22; }
        }
        .app-container {
            width: 100%;
            max-width: 1440px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background: var(--color-panel-bg);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 16px;
            box-shadow: var(--shadow-card);
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .logo-icon {
            font-size: 32px;
            background: linear-gradient(135deg, var(--color-cyan), var(--color-magenta));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .logo-area h1 {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 24px;
            letter-spacing: 1.5px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-text-muted));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo-area .subtitle {
            font-size: 12px;
            color: var(--color-text-muted);
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        .fa-spin-slow {
            animation: fa-spin 15s linear infinite;
        }
        .header-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            padding: 6px 14px;
            border-radius: 20px;
        }
        .pulse-dot {
            width: 8px;
            height: 8px;
            background-color: var(--color-success);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--color-success);
            animation: pulse-dot-anim 1.5s infinite;
        }
        @keyframes pulse-dot-anim {
            0% { transform: scale(0.9); opacity: 0.6; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(0.9); opacity: 0.6; }
        }
        .badge-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-success);
            letter-spacing: 0.5px;
        }
        .app-main-grid {
            display: grid;
            grid-template-columns: 340px 1fr 340px;
            gap: 24px;
            align-items: start;
        }
        .panel {
            background: var(--gradient-panel);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 20px;
            padding: 24px;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
            gap: 20px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .panel:hover {
            border-color: var(--color-border-hover);
        }
        .panel-header {
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--color-border);
            padding-bottom: 14px;
        }
        .panel-header i {
            font-size: 18px;
        }
        .panel-header h2 {
            font-family: var(--font-heading);
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .text-cyan { color: var(--color-cyan); }
        .text-magenta { color: var(--color-magenta); }
        .text-purple { color: var(--color-purple); }
        .control-panel {
            grid-column: 1;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .input-label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .input-label-row label {
            font-size: 13px;
            font-weight: 600;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .helper-text {
            font-size: 10px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
                .number-input-wrapper {
            display: flex;
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--color-border);
            background: #ffffff;
            transition: all 0.2s ease;
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
                .custom-number-input {
            flex: 1;
            width: 0;
            min-width: 0;
            background: #f8fafc !important;
            border: none !important;
            outline: none !important;
            color: #0f172a !important;
            padding: 10px 14px !important;
            font-family: var(--font-body) !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            text-align: right !important;
            box-shadow: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: textfield !important;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
                .unit-badge {
            background: rgba(0, 0, 0, 0.03);
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 700;
            padding: 0 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-left: 1px solid var(--color-border);
            pointer-events: none;
            flex-shrink: 0;
        }
        .custom-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(0, 0, 0, 0.05);
            outline: none;
            margin: 8px 0;
            transition: background 0.2s ease;
        }
        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.2s ease;
        }
        #slider-current::-webkit-slider-thumb { background: var(--color-cyan); box-shadow: 0 0 10px var(--color-cyan); }
        #slider-length::-webkit-slider-thumb { background: var(--color-magenta); box-shadow: 0 0 10px var(--color-magenta); }
        #slider-drop::-webkit-slider-thumb { background: var(--color-purple); box-shadow: 0 0 10px var(--color-purple); }
        /* Segmented switch styling */
        .segmented-control {
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: rgba(0,0,0,0.03);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
        }
        .segment-btn {
            background: transparent;
            border: none;
            outline: none;
            color: var(--color-text-muted);
            font-size: 12px;
            font-weight: 600;
            padding: 8px;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s ease;
            text-align: center;
        }
        .segment-btn.active {
            background: #ffffff;
            color: var(--color-cyan);
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        }
        .presets-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-top: 1px solid var(--color-border);
            padding-top: 18px;
        }
        .presets-section h3 {
            font-size: 13px;
            font-weight: 700;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .presets-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .preset-btn {
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            padding: 8px 12px;
            cursor: pointer;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            background: rgba(0, 0, 0, 0.05);
            border-color: var(--color-border);
            transform: translateX(4px);
        }
        .preset-btn.active {
            background: linear-gradient(90deg, var(--color-cyan-glow), var(--color-magenta-glow));
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .preset-icon {
            width: 28px;
            height: 28px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: var(--color-cyan);
        }
        .preset-btn:hover .preset-icon, .preset-btn.active .preset-icon {
            background: var(--gradient-primary);
            color: #fff;
            box-shadow: var(--shadow-neon-cyan);
        }
        .preset-name {
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.25px;
        }
        .simulation-panel { grid-column: 2; align-self: start; }
        .canvas-wrapper {
            position: relative;
            width: 100%;
            background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #physics-canvas {
            display: block;
            width: 100%;
            height: auto;
            aspect-ratio: 16 / 10;
        }
        .simulation-metrics-strip {
            display: flex;
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 20px;
            justify-content: space-around;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }
        .mini-metric {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            text-align: center;
        }
        .mini-metric .label {
            font-size: 10px;
            font-weight: 600;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .mini-metric .value {
            font-size: 14px;
            font-weight: 700;
            color: var(--color-text-main);
            font-family: var(--font-heading);
        }
        .mini-divider {
            width: 1px;
            height: 24px;
            background: rgba(0, 0, 0, 0.03);
        }
        .results-panel {
            grid-column: 3;
        }
        .ratio-readout-box {
            background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(138, 43, 226, 0.03) 100%);
            border: 1px solid rgba(0, 242, 254, 0.25);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
        }
        .ratio-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--color-cyan);
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .ratio-value {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 32px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-cyan));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .ratio-type {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .results-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .result-card {
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s ease;
        }
        .result-card:hover {
            transform: translateY(-2px);
            border-color: rgba(0, 242, 254, 0.2);
            background: rgba(0, 242, 254, 0.03);
        }
        .card-icon {
            width: 38px;
            height: 38px;
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--color-text-muted);
        }
        .result-card:hover .card-icon {
            color: var(--color-cyan);
            border-color: rgba(0, 242, 254, 0.3);
            background: rgba(0, 242, 254, 0.1);
        }
        .card-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .card-unit {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .card-value {
            font-family: var(--font-heading);
            font-weight: 700;
            font-size: 18px;
            color: var(--color-text-main);
        }
        .formula-card {
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            font-size: 12px;
        }
        .formula-card h4 {
            font-weight: 700;
            color: var(--color-text-main);
        }
        .formula-equation {
            font-family: monospace;
            color: var(--color-cyan);
            font-size: 13px;
            background: #f8fafc;
            padding: 6px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
            text-align: center;
        }
        @container cable-container (max-width: 1100px) {
            .app-main-grid {
                grid-template-columns: 1fr 1fr;
                gap: 20px;
            }
            .control-panel {
                grid-column: 1;
            }
            .simulation-panel {
                grid-column: 2;
            }
            .results-panel {
                grid-column: 1 / span 2;
            }
        }
        @container cable-container (max-width: 768px) {
            .app-main-grid {
                grid-template-columns: 1fr;
            }
            .control-panel, .simulation-panel, .results-panel {
                grid-column: 1;
            }
            .simulation-panel {
                order: -1;
            }
            .app-header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
            .logo-area {
                flex-direction: column;
                gap: 8px;
            }
        }
        @container cable-container (max-width: 480px) {
            .app-container {
                padding: 12px;
                gap: 16px;
            }
            .panel {
                padding: 16px;
            }
            .simulation-metrics-strip {
                flex-direction: column;
                gap: 12px;
            }
            .mini-divider {
                width: 80%;
                height: 1px;
            }
        }
        .preset-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: flex-start;
            text-align: left;
        }
        .preset-spec {
            font-size: 11px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
        .preset-name {
            font-size: 13px !important;
        }
/* ━━ WordPress 레이아웃 Override: 디자인 1 (2열 컴팩트 대칭 레이아웃) ━━ */
.cablesizing-calculator-wrapper .app-main-grid,
.cablesizing-calculator-wrapper .main-grid,
.cablesizing-calculator-wrapper .sim-grid {
    display: grid !important;
    grid-template-columns: 340px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
}
/* 3열 레이아웃을 2열 레이아웃으로 변경하는 특화 스타일 */
.cablesizing-calculator-wrapper .right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    min-width: 0 !important;
    grid-column: 2 !important;
}
.cablesizing-calculator-wrapper .simulation-panel,
.cablesizing-calculator-wrapper .canvas-panel,
.cablesizing-calculator-wrapper .sim-panel {
    grid-column: auto !important;
    order: 1 !important;
    align-self: stretch !important;
}
.cablesizing-calculator-wrapper .control-panel {
    grid-column: 1 !important;
}
/* 2열 통합 결과 분석 영역 레이아웃 */
.cablesizing-calculator-wrapper .simulation-results-section {
    display: grid !important;
    grid-template-columns: 1.1fr 1.3fr !important;
    gap: 20px !important;
    border-top: 1px solid var(--color-border) !important;
    padding-top: 20px !important;
    margin-top: 10px !important;
    align-items: stretch !important;
}
/* Readout Box 스타일 */
.cablesizing-calculator-wrapper .simulation-results-section .ratio-readout-box,
.cablesizing-calculator-wrapper .simulation-results-section .re-readout-box,
.cablesizing-calculator-wrapper .simulation-results-section .status-readout-box,
.cablesizing-calculator-wrapper .simulation-results-section .flow-readout-box,
.cablesizing-calculator-wrapper .simulation-results-section [class*="readout-box"],
.cablesizing-calculator-wrapper .simulation-results-section .gauge-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.cablesizing-calculator-wrapper .simulation-results-section .results-grid {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}
.cablesizing-calculator-wrapper .simulation-results-section .results-grid .result-card {
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    min-height: 72px !important;
    height: auto !important;
    padding: 12px 16px !important;
}
.cablesizing-calculator-wrapper .simulation-results-section .formula-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
}
/* 모바일/반응형 (800px 이하) ── 항상 세로형(1열) 정렬 및 시뮬레이터 캔버스 최상단 배치 */
@media (max-width: 800px) {
    .cablesizing-calculator-wrapper .app-main-grid,
    .cablesizing-calculator-wrapper .main-grid,
    .cablesizing-calculator-wrapper .sim-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .cablesizing-calculator-wrapper .control-panel {
        order: 2 !important;
        width: 100% !important;
    }
    .cablesizing-calculator-wrapper .right-column {
        order: 1 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .cablesizing-calculator-wrapper .simulation-panel,
    .cablesizing-calculator-wrapper .canvas-panel,
    .cablesizing-calculator-wrapper .sim-panel,
    .cablesizing-calculator-wrapper .canvas-section {
        order: -1 !important;
    }
    .cablesizing-calculator-wrapper .simulation-results-section {
        grid-template-columns: 1fr !important;
    }
    .cablesizing-calculator-wrapper .simulation-results-section .ratio-readout-box,
    .cablesizing-calculator-wrapper .simulation-results-section .re-readout-box,
    .cablesizing-calculator-wrapper .simulation-results-section .status-readout-box,
    .cablesizing-calculator-wrapper .simulation-results-section .flow-readout-box,
    .cablesizing-calculator-wrapper .simulation-results-section [class*="readout-box"],
    .cablesizing-calculator-wrapper .simulation-results-section .gauge-container {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto !important;
    }
    .cablesizing-calculator-wrapper .simulation-results-section .results-grid {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .cablesizing-calculator-wrapper .simulation-results-section .formula-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}
.cablesizing-calculator-wrapper .app-container,
.cablesizing-calculator-wrapper .main-container {
    max-width: 100% !important;
    padding: 12px !important;
}
/* Premium Advice/Formula Card & Typography Overrides */
.cablesizing-calculator-wrapper .simulation-results-section .formula-card,
.cablesizing-calculator-wrapper .results-panel .formula-card {
    background: #ffffff !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-card) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
}
.cablesizing-calculator-wrapper .simulation-results-section .formula-card h4,
.cablesizing-calculator-wrapper .results-panel .formula-card h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--color-text-main) !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    word-break: keep-all !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.cablesizing-calculator-wrapper .formula-equation {
    font-family: 'Outfit', 'Cambria Math', 'Times New Roman', monospace !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    word-break: keep-all !important;
    text-align: center !important;
}
.cablesizing-calculator-wrapper #text-judgment {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--color-text-muted) !important;
    line-height: 1.6 !important;
    word-break: keep-all !important;
}
</style>
<div class="cablesizing-calculator-wrapper" style="position: relative; width: 100%; box-sizing: border-box; overflow: hidden; margin: 30px auto; border-radius: 20px;">
    <div class="app-background-glow" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: hidden;"></div>
    <div style="position: relative; z-index: 2; width: 100%;">
    <div class="app-container">
        <!-- Header -->
        <header class="app-header">
            <div class="logo-area">
                <div class="logo-icon"><i class="fa-solid fa-gauge text-cyan"></i></div>
                <div>
                    <h1>CABLE SIZING</h1>
                    <div class="subtitle">케이블 공칭 단면적 선정 &#038; 전압강하 시뮬레이터</div>
                </div>
            </div>
            <div class="header-badge">
                <div class="pulse-dot"></div>
                <div class="badge-text">KEC STANDARDS CONFORMITY</div>
            </div>
        </header>
        <!-- Main Layout Grid -->
        <main class="app-main-grid">
            <!-- Left Panel: Controls -->
            <section class="panel control-panel">
                <div class="panel-header">
                    <i class="fa-solid fa-sliders text-cyan"></i>
                    <h2>배선 조건 변수</h2>
                </div>
                <!-- Voltage Type selection -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-bolt text-cyan"></i> 배전 전력 계통</label>
                    </div>
                    <div class="segmented-control" id="control-phase">
                        <button class="segment-btn active" data-value="1">단상 220 V</button>
                        <button class="segment-btn" data-value="3">삼상 380 V</button>
                    </div>
                </div>
                <!-- Load Current (A) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-bolt text-magenta"></i> 부하 전류 (I)</label>
                        <span class="helper-text">(1 ~ 300 A)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-current" class="custom-number-input" min="1" max="300" value="45">
                        <div class="unit-badge">A</div>
                    </div>
                    <input type="range" id="slider-current" class="custom-slider" min="1" max="300" step="1" value="45">
                </div>
                <!-- Distance length (m) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-route text-purple"></i> 케이블 이송 거리 (L)</label>
                        <span class="helper-text">(5 ~ 200 m)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-length" class="custom-number-input" min="5" max="200" value="50">
                        <div class="unit-badge">m</div>
                    </div>
                    <input type="range" id="slider-length" class="custom-slider" min="5" max="200" step="5" value="50">
                </div>
                <!-- Allowable drop (%) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-chart-line"></i> 허용 전압 강하율 (%)</label>
                        <span class="helper-text">(1.0 ~ 5.0 %)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-drop" class="custom-number-input" min="1.0" max="5.0" step="0.1" value="3.0">
                        <div class="unit-badge">%</div>
                    </div>
                    <input type="range" id="slider-drop" class="custom-slider" min="10" max="50" step="1" value="30">
                </div>
                <!-- Material Type -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-atom"></i> 도체 재질</label>
                    </div>
                    <div class="segmented-control" id="control-material">
                        <button class="segment-btn active" data-value="cu">구리 (Cu)</button>
                        <button class="segment-btn" data-value="al">알루미늄 (Al)</button>
                    </div>
                </div>
                <!-- Installation style -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-layer-group"></i> 배선 포설 형태</label>
                    </div>
                    <div class="segmented-control" id="control-install">
                        <button class="segment-btn active" data-value="tray">오픈 케이블 트레이</button>
                        <button class="segment-btn" data-value="conduit">매입 배관(콘크리트)</button>
                    </div>
                </div>
                <!-- Presets -->
                <div class="presets-section">
                    <h3><i class="fa-solid fa-tags text-cyan"></i> 배선 케이스 프리셋</h3>
                    <div class="presets-grid">
                        <button class="preset-btn" data-preset="household">
                            <div class="preset-icon"><i class="fa-solid fa-house"></i></div>
                            <div class="preset-details"><span class="preset-name">가정용 전열 콘센트</span><span class="preset-spec">단상, 15A, 25m</span></div>
                        </button>
                        <button class="preset-btn" data-preset="subpanel">
                            <div class="preset-icon"><i class="fa-solid fa-industry"></i></div>
                            <div class="preset-details"><span class="preset-name">공장 소형 동력반 분기</span><span class="preset-spec">삼상, 60A, 60m</span></div>
                        </button>
                        <button class="preset-btn" data-preset="pump">
                            <div class="preset-icon"><i class="fa-solid fa-water"></i></div>
                            <div class="preset-details"><span class="preset-name">원거리 펌프 모터 전원</span><span class="preset-spec">삼상, 180A, 140m</span></div>
                        </button>
                    </div>
                </div>
            </section>
            <!-- Auto Injected Right Column wrapper for Design 1 -->
            <div class="right-column">
                <section class="panel simulation-panel">
                                <div class="panel-header">
                                    <div style="display: flex; align-items: center; gap: 12px;">
                                        <i class="fa-solid fa-circle-nodes text-cyan"></i>
                                        <h2>케이블 단면 발열 &#038; 선로 물리 모니터</h2>
                                    </div>
                                    <div id="txt-cable-safety" class="canvas-scale-indicator text-cyan">정상 동작</div>
                                </div>
                                <div class="canvas-wrapper">
                                    <canvas id="physics-canvas"></canvas>
                                </div>
                                <!-- Mini Metrics -->
                                <div class="simulation-metrics-strip">
                                    <div class="mini-metric">
                                        <div class="label">선로 도량 저항치</div>
                                        <div id="txt-resistance-out" class="value">0.0 Ω</div>
                                    </div>
                                    <div class="mini-divider"></div>
                                    <div class="mini-metric">
                                        <div class="label">케이블 열 방출 지수</div>
                                        <div id="txt-heat-index" class="value">0 %</div>
                                    </div>
                                </div>
                            <div class="simulation-results-section">
                                <div class="ratio-readout-box">
                                    <div class="ratio-title">KEC 설계 추천 전선 굵기</div>
                                    <div id="txt-cable-size" class="ratio-value">6.0 mm²</div>
                                    <div id="txt-ampacity-limit" class="ratio-type">(허용 전류 한계: 52 A)</div>
                                </div>
                                <div class="results-grid">
                                    <!-- Voltage Drop -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-arrow-down-wide-short text-cyan"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">최종 전압 강하치 (e)</span>
                                            <span id="txt-drop-volts" class="card-value">5.2 V (2.4%)</span>
                                        </div>
                                    </div>
                                    <!-- Cable Loss Power -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-fire text-magenta"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">전선 줄열 손실 전력 (P_loss)</span>
                                            <span id="txt-power-loss" class="card-value">250 W</span>
                                        </div>
                                    </div>
                                    <!-- Safety Margin -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-shield text-purple"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">케이블 정격 전류 대비 마진</span>
                                            <span id="txt-safety-margin" class="card-value">115 %</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="formula-card">
                                    <h4><i class="fa-solid fa-circle-info text-cyan"></i> KEC 선로 전압강하 공식</h4>
                                    <div class="formula-equation">e = 30.8 × L × I / 1000A [삼상]</div>
                                    <div class="formula-equation">e = 35.6 × L × I / 1000A [단상]</div>
                                </div>
                            </div>
                </section>
            </div>
        </main>
        <!-- Disclaimer Footer -->
        <footer class="app-disclaimer" style="margin-top: 20px; padding: 12px 16px; background: rgba(0, 0, 0, 0.015); border: 1px solid var(--color-border); border-radius: 12px; font-size: 11px; color: var(--color-text-muted); line-height: 1.5; text-align: left; display: flex; gap: 10px; align-items: flex-start; clear: both;">
            <i class="fa-solid fa-circle-info" style="color: var(--color-cyan); font-size: 14px; margin-top: 2px; flex-shrink: 0;"></i>
            <span><strong>면책 조항 (Disclaimer):</strong> 본 시뮬레이터의 계산 결과는 교육 및 참고용으로만 제공되며, 실제 제품 설계나 제작 시에는 반드시 최신 공학 규격 및 공식 표준 설계 기준을 재확인하시기 바랍니다. 계산 값의 무결성을 보장하지 않으며, 이로 인해 발생하는 직접적/간접적 손해에 대해 제작자 및 본 블로그는 어떠한 책임을 지지 않습니다.</span>
        </footer>
</div>
    <!-- JavaScript Cable Sizing Engine -->
    </div>
</div>
<script>
        (function() {
        let isInit = false;
        function initSimulator() {
            if (isInit) return;
            const canvas = document.getElementById('physics-canvas');
            if (!canvas) return;
            const ctx = canvas.getContext('2d');
            if (!ctx) return;
            isInit = true;
            window.__cable_initialized = true;
            // DOM Elements
            const sliderCurrent = document.getElementById('slider-current');
            const inputCurrent = document.getElementById('input-current');
            const sliderLength = document.getElementById('slider-length');
            const inputLength = document.getElementById('input-length');
            const sliderDrop = document.getElementById('slider-drop');
            const inputDrop = document.getElementById('input-drop');
            const controlPhase = document.getElementById('control-phase');
            const controlMaterial = document.getElementById('control-material');
            const controlInstall = document.getElementById('control-install');
            const presetButtons = document.querySelectorAll('.preset-btn');
            const txtCableSize = document.getElementById('txt-cable-size');
            const txtAmpacityLimit = document.getElementById('txt-ampacity-limit');
            const txtDropVolts = document.getElementById('txt-drop-volts');
            const txtPowerLoss = document.getElementById('txt-power-loss');
            const txtSafetyMargin = document.getElementById('txt-safety-margin');
            const txtCableSafety = document.getElementById('txt-cable-safety');
            const txtResistanceOut = document.getElementById('txt-resistance-out');
            const txtHeatIndex = document.getElementById('txt-heat-index');
            // State variables
            const state = {
                phase: 1, // 1 for single phase, 3 for three phase
                current: 45.0,
                length: 50.0,
                allowableDropPercent: 3.0,
                material: "cu", // cu or al
                installation: "tray", // tray or conduit
                // Calculated Outputs
                chosenSize: 6.0,
                ampacityLimit: 52.0,
                actualVoltageDrop: 3.2,
                resistance: 0.15,
                powerLoss: 120,
                // Animation states
                electronPhase: 0,
                lastTime: 0
            };
            // Standard Cable Sizes (sq/mm2)
            const standardSizes = [1.5, 2.5, 4, 6, 10, 16, 25, 35, 50, 70, 95, 120, 150, 185, 240];
            // Material resistivity (ohm * mm2 / m)
            const resistivityCu = 1.0 / 58.0;
            const resistivityAl = 1.0 / 35.0;
            function resizeCanvas() {
                const rect = canvas.getBoundingClientRect();
                const dpr = window.devicePixelRatio || 1;
                canvas.width = rect.width * dpr;
                canvas.height = rect.height * dpr;
                ctx.scale(dpr, dpr);
            }
            resizeCanvas();
            window.addEventListener('resize', resizeCanvas);
            setTimeout(resizeCanvas, 300);
            // Synchronizing Inputs
            function syncCurrentFromSlider() {
                const val = parseInt(sliderCurrent.value);
                inputCurrent.value = val;
                state.current = val;
                clearPresets();
                updateCalculations();
            }
            function syncCurrentFromInput() {
                let val = parseInt(inputCurrent.value);
                if (isNaN(val)) { val = 1; }
                if (val < 1) { val = 1; }
                if (val > 300) { val = 300; }
                sliderCurrent.value = val;
                state.current = val;
                clearPresets();
                updateCalculations();
            }
            function syncLengthFromSlider() {
                const val = parseInt(sliderLength.value);
                inputLength.value = val;
                state.length = val;
                clearPresets();
                updateCalculations();
            }
            function syncLengthFromInput() {
                let val = parseInt(inputLength.value);
                if (isNaN(val)) { val = 5; }
                if (val < 5) { val = 5; }
                if (val > 200) { val = 200; }
                sliderLength.value = val;
                state.length = val;
                clearPresets();
                updateCalculations();
            }
            function syncDropFromSlider() {
                const val = parseFloat(sliderDrop.value) / 10.0;
                inputDrop.value = val.toFixed(1);
                state.allowableDropPercent = val;
                clearPresets();
                updateCalculations();
            }
            function syncDropFromInput() {
                let val = parseFloat(inputDrop.value);
                if (isNaN(val)) { val = 1.0; }
                if (val < 1.0) { val = 1.0; }
                if (val > 5.0) { val = 5.0; }
                sliderDrop.value = Math.round(val * 10);
                state.allowableDropPercent = val;
                clearPresets();
                updateCalculations();
            }
            // Calculations based on KEC/Korean inner regulation tables
            function updateCalculations() {
                const voltsLimit = state.phase === 1 ? 220.0 : 380.0;
                const allowableDropVolts = (state.allowableDropPercent / 100.0) * voltsLimit;
                // Step 1: Calculate sizing based on voltage drop
                // A_drop = (30.8 or 35.6) * L * I / (1000 * e_allow)
                const factor = state.phase === 1 ? 35.6 : 30.8;
                const sizeReqVoltage = (factor * state.length * state.current) / (1000.0 * allowableDropVolts);
                // Step 2: Sizing based on Ampacity safety
                // Standard ampacity lookup approximation
                // Ampacity depends on size, material (Cu, Al), and installation environment (tray/conduit)
                let baseAmpacityMultiplier = state.material === "cu" ? 1.0 : 0.65;
                if (state.installation === "conduit") {
                    baseAmpacityMultiplier *= 0.78; // derating for conduit
                }
                // Choose smallest standard size that fits both criteria
                let bestSize = standardSizes[standardSizes.length - 1];
                let ampacityOfChosen = 0.0;
                for (let i = 0; i < standardSizes.length; i++) {
                    const size = standardSizes[i];
                    // Approximate safe ampacity: I_safe = k * size ^ 0.62
                    const safeAmp = 15.0 * Math.pow(size, 0.65) * baseAmpacityMultiplier;
                    if (size >= sizeReqVoltage) {
                        if (safeAmp >= state.current) {
                            bestSize = size;
                            ampacityOfChosen = safeAmp;
                            break;
                        }
                    }
                }
                state.chosenSize = bestSize;
                state.ampacityLimit = ampacityOfChosen;
                // Actual electrical calculations of chosen cable
                const resistivity = state.material === "cu" ? resistivityCu : resistivityAl;
                // Resistance R = rho * L / A
                const singleLineResistance = resistivity * (state.length / state.chosenSize);
                state.resistance = singleLineResistance * (state.phase === 1 ? 2.0 : 1.73);
                // Actual voltage drop = I * R
                state.actualVoltageDrop = state.current * state.resistance;
                const actualDropPct = (state.actualVoltageDrop / voltsLimit) * 100.0;
                // Loss Power (W) = I^2 * R
                state.powerLoss = state.current * state.current * state.resistance;
                // Margins & heats
                const margin = (ampacityOfChosen / state.current) * 100.0;
                const heatIndex = Math.min((state.current / ampacityOfChosen) * 100.0, 150.0);
                // Update UI text values
                txtCableSize.innerText = state.chosenSize.toFixed(1) + ' mm²';
                txtAmpacityLimit.innerText = '(허용 전류 한계: ' + Math.round(ampacityOfChosen) + ' A)';
                txtDropVolts.innerText = state.actualVoltageDrop.toFixed(1) + ' V (' + actualDropPct.toFixed(2) + '%)';
                if (state.powerLoss > 1000) {
                    txtPowerLoss.innerText = (state.powerLoss / 1000).toFixed(2) + ' kW';
                } else {
                    txtPowerLoss.innerText = Math.round(state.powerLoss) + ' W';
                }
                txtSafetyMargin.innerText = Math.round(margin) + ' %';
                txtResistanceOut.innerText = state.resistance.toFixed(4) + ' Ω';
                txtHeatIndex.innerText = Math.round(heatIndex) + ' %';
                // Safety warnings
                if (heatIndex > 100.0) {
                    txtCableSafety.innerText = '위험 (과부하 과열)';
                    txtCableSafety.style.color = 'var(--color-danger)';
                } else {
                    if (heatIndex > 80.0) {
                        txtCableSafety.innerText = '경고 (부하 한계 근접)';
                        txtCableSafety.style.color = '#f59e0b';
                    } else {
                        txtCableSafety.innerText = '안전 (기준치 이내)';
                        txtCableSafety.style.color = '#10b981';
                    }
                }
            }
            // Presets
            function loadPreset(key) {
                clearPresets();
                presetButtons.forEach(btn => {
                    if (btn.dataset.preset === key) {
                        btn.classList.add('active');
                    }
                });
                if (key === 'household') {
                    state.phase = 1;
                    state.current = 15;
                    state.length = 25;
                    state.allowableDropPercent = 2.0;
                    state.material = "cu";
                    state.installation = "conduit";
                }
                if (key === 'subpanel') {
                    state.phase = 3;
                    state.current = 60;
                    state.length = 60;
                    state.allowableDropPercent = 3.0;
                    state.material = "cu";
                    state.installation = "tray";
                }
                if (key === 'pump') {
                    state.phase = 3;
                    state.current = 180;
                    state.length = 140;
                    state.allowableDropPercent = 4.0;
                    state.material = "cu";
                    state.installation = "tray";
                }
                // Sync UI elements
                // Set Phase active buttons
                document.querySelectorAll('#control-phase .segment-btn').forEach(btn => {
                    btn.classList.remove('active');
                    if (parseInt(btn.dataset.value) === state.phase) {
                        btn.classList.add('active');
                    }
                });
                document.querySelectorAll('#control-material .segment-btn').forEach(btn => {
                    btn.classList.remove('active');
                    if (btn.dataset.value === state.material) {
                        btn.classList.add('active');
                    }
                });
                document.querySelectorAll('#control-install .segment-btn').forEach(btn => {
                    btn.classList.remove('active');
                    if (btn.dataset.value === state.installation) {
                        btn.classList.add('active');
                    }
                });
                inputCurrent.value = state.current;
                sliderCurrent.value = state.current;
                inputLength.value = state.length;
                sliderLength.value = state.length;
                inputDrop.value = state.allowableDropPercent.toFixed(1);
                sliderDrop.value = Math.round(state.allowableDropPercent * 10);
                updateCalculations();
            }
            function clearPresets() {
                presetButtons.forEach(btn => btn.classList.remove('active'));
            }
            // Bind Event Listeners
            sliderCurrent.addEventListener('input', syncCurrentFromSlider);
            inputCurrent.addEventListener('change', syncCurrentFromInput);
            sliderLength.addEventListener('input', syncLengthFromSlider);
            inputLength.addEventListener('change', syncLengthFromInput);
            sliderDrop.addEventListener('input', syncDropFromSlider);
            inputDrop.addEventListener('change', syncDropFromInput);
            // Phase Buttons
            document.querySelectorAll('#control-phase .segment-btn').forEach(btn => {
                btn.addEventListener('click', () => {
                    document.querySelectorAll('#control-phase .segment-btn').forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    state.phase = parseInt(btn.dataset.value);
                    clearPresets();
                    updateCalculations();
                });
            });
            // Material Buttons
            document.querySelectorAll('#control-material .segment-btn').forEach(btn => {
                btn.addEventListener('click', () => {
                    document.querySelectorAll('#control-material .segment-btn').forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    state.material = btn.dataset.value;
                    clearPresets();
                    updateCalculations();
                });
            });
            // Installation Buttons
            document.querySelectorAll('#control-install .segment-btn').forEach(btn => {
                btn.addEventListener('click', () => {
                    document.querySelectorAll('#control-install .segment-btn').forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    state.installation = btn.dataset.value;
                    clearPresets();
                    updateCalculations();
                });
            });
            presetButtons.forEach(btn => {
                btn.addEventListener('click', () => {
                    loadPreset(btn.dataset.preset);
                });
            });
            // Technical Arrow drawing helper for CAD dimensions
            function drawArrow(x1, y1, x2, y2, arrowSize = 4) {
                const angle = Math.atan2(y2 - y1, x2 - x1);
                ctx.beginPath();
                ctx.moveTo(x1, y1);
                ctx.lineTo(x2, y2);
                ctx.stroke();
                ctx.beginPath();
                ctx.moveTo(x2, y2);
                ctx.lineTo(x2 - arrowSize * Math.cos(angle - Math.PI / 6), y2 - arrowSize * Math.sin(angle - Math.PI / 6));
                ctx.lineTo(x2 - arrowSize * Math.cos(angle + Math.PI / 6), y2 - arrowSize * Math.sin(angle + Math.PI / 6));
                ctx.closePath();
                ctx.fillStyle = ctx.strokeStyle;
                ctx.fill();
            }
            // Particle list along wire length
            const lineParticles = [];
            for (let i = 0; i < 50; i++) {
                lineParticles.push({
                    xRatio: Math.random(),
                    offsetY: (Math.random() - 0.5) * 8.0 // Normalized offset factor
                });
            }
            // Heat/thermal smoke particles
            const heatParticles = [];
            const maxHeatParticles = 100;
            // Animation Loop
            function animate(currentTime) {
                requestAnimationFrame(animate);
                let dt = (currentTime - state.lastTime) / 1000;
                if (isNaN(dt)) { dt = 0.016; }
                if (dt < 0) { dt = 0.016; }
                if (dt > 1.0) { dt = 0.016; }
                state.lastTime = currentTime;
                const width = canvas.width / (window.devicePixelRatio || 1);
                const height = canvas.height / (window.devicePixelRatio || 1);
                ctx.clearRect(0, 0, width, height);
                // Draw blueprint grid
                ctx.save();
                ctx.strokeStyle = 'rgba(2, 132, 199, 0.06)';
                ctx.lineWidth = 1;
                const gridSpacing = 25;
                for (let x = 0; x < width; x += gridSpacing) {
                    ctx.beginPath();
                    ctx.moveTo(x, 0);
                    ctx.lineTo(x, height);
                    ctx.stroke();
                }
                for (let y = 0; y < height; y += gridSpacing) {
                    ctx.beginPath();
                    ctx.moveTo(0, y);
                    ctx.lineTo(width, y);
                    ctx.stroke();
                }
                ctx.restore();
                // Dynamic Geometry Mapping to prevent conductor overlaps
                const coreCount = state.phase === 1 ? 3 : 4; // Single phase = 3 (Live, N, PE), Three phase = 4 (L1, L2, L3, PE)
                // Calculate dynamic core radius based on square root of chosen sizing to give scaling feedback
                const coreRadius = 6 + 1.25 * Math.sqrt(state.chosenSize);
                // Calculate minimum center-to-center distance to avoid overlaps using trigonometric exterior-contact formula
                const cDist = 1.18 * coreRadius / Math.sin(Math.PI / coreCount);
                // Outer cable jacket radius (sheath thickness: 8px)
                const crossR = cDist + coreRadius + 8;
                // Dynamic cable center coordinates to prevent boundary overlap and preserve margin for left dimension text
                const crossCx = Math.max(120, crossR + 55);
                const crossCy = height / 2;
                // Dynamic side-view wire size settings matching the cross-section scale
                const wireWidth = Math.max(10, Math.min(24, crossR * 0.35)); // Scaled thickness of horizontal wire
                const lineX1 = crossCx + crossR + (wireWidth / 2) + 8; // tangent start with explicit margin to prevent overlaps
                const lineX2 = width - 110;
                const lineY = height / 2;
                // Port style background visualization (Cable section background)
                if (state.installation === "tray") {
                    ctx.save();
                    ctx.strokeStyle = "#cbd5e1";
                    ctx.lineWidth = 4;
                    ctx.beginPath();
                    ctx.moveTo(crossCx - crossR - 20, crossCy + crossR + 8);
                    ctx.lineTo(crossCx + crossR + 20, crossCy + crossR + 8);
                    ctx.stroke();
                    ctx.strokeStyle = "#e2e8f0";
                    ctx.lineWidth = 2;
                    for (let lx = crossCx - crossR - 15; lx <= crossCx + crossR + 15; lx += 10) {
                        ctx.beginPath();
                        ctx.moveTo(lx, crossCy + crossR + 8);
                        ctx.lineTo(lx - 5, crossCy + crossR + 18);
                        ctx.stroke();
                    }
                    ctx.restore();
                } else if (state.installation === "conduit") {
                    ctx.save();
                    ctx.fillStyle = "rgba(226, 232, 240, 0.5)";
                    ctx.fillRect(crossCx - crossR - 25, crossCy - crossR - 25, (crossR + 25) * 2, (crossR + 25) * 2);
                    ctx.strokeStyle = "rgba(148, 163, 184, 0.25)";
                    ctx.lineWidth = 1;
                    const step = 15;
                    const startX = crossCx - crossR - 25;
                    const endX = crossCx + crossR + 25;
                    const startY = crossCy - crossR - 25;
                    const endY = crossCy + crossR + 25;
                    for (let offset = - (endY - startY); offset < (endX - startX); offset += step) {
                        ctx.beginPath();
                        ctx.moveTo(Math.max(startX, startX + offset), Math.max(startY, startY - offset));
                        ctx.lineTo(Math.min(endX, endX + offset), Math.min(endY, endY - offset));
                        ctx.stroke();
                    }
                    const pipeInnerR = crossR + 8;
                    const pipeOuterR = crossR + 16;
                    const heatIndexVal = Math.min((state.current / state.ampacityLimit) * 100.0, 150.0);
                    if (heatIndexVal > 50) {
                        const pipeGlow = ctx.createRadialGradient(crossCx, crossCy, crossR, crossCx, crossCy, pipeInnerR);
                        pipeGlow.addColorStop(0, "rgba(239, 68, 68, 0)");
                        pipeGlow.addColorStop(1, "rgba(239, 68, 68, " + Math.min((heatIndexVal - 50) / 100 * 0.4, 0.4) + ")");
                        ctx.fillStyle = pipeGlow;
                        ctx.beginPath();
                        ctx.arc(crossCx, crossCy, pipeInnerR, 0, Math.PI * 2);
                        ctx.fill();
                    }
                    ctx.fillStyle = "#94a3b8";
                    ctx.strokeStyle = "#475569";
                    ctx.lineWidth = 2;
                    ctx.beginPath();
                    ctx.arc(crossCx, crossCy, pipeOuterR, 0, Math.PI * 2);
                    ctx.arc(crossCx, crossCy, pipeInnerR, 0, Math.PI * 2, true);
                    ctx.fill();
                    ctx.stroke();
                    ctx.restore();
                }
                // A. Render 2D Cable Cross section
                ctx.save();
                ctx.fillStyle = "#ffffff";
                ctx.strokeStyle = "#475569";
                ctx.lineWidth = 4;
                ctx.beginPath();
                ctx.arc(crossCx, crossCy, crossR, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                // Draw outer black rubber jacket
                ctx.strokeStyle = "#0f172a";
                ctx.lineWidth = 5;
                ctx.beginPath();
                ctx.arc(crossCx, crossCy, crossR - 3, 0, Math.PI * 2);
                ctx.stroke();
                // Render Inner Core Circles
                const colorsCoresSingle = ["var(--color-cyan)", "#94a3b8", "var(--color-success)"];
                const colorsCoresThree = ["#ef4444", "var(--color-purple)", "var(--color-cyan)", "var(--color-success)"];
                const colors = state.phase === 1 ? colorsCoresSingle : colorsCoresThree;
                // Temperature hot glow overlay based on safe ampacity ratio
                const ratio = state.current / state.ampacityLimit;
                const heatFactor = Math.min(ratio * ratio, 1.5); // exponential heat
                for (let i = 0; i < coreCount; i++) {
                    const angle = (i * 2 * Math.PI) / coreCount - Math.PI / 2;
                    const ccx = crossCx + Math.cos(angle) * cDist;
                    const ccy = crossCy + Math.sin(angle) * cDist;
                    ctx.beginPath();
                    ctx.arc(ccx, ccy, coreRadius, 0, Math.PI * 2);
                    ctx.fillStyle = colors[i];
                    ctx.fill();
                    // If overloaded, draw thermal hotspot core overlay
                    if (heatFactor > 0.1) {
                        ctx.fillStyle = "rgba(239, 68, 68, " + Math.min(heatFactor * 0.45, 0.8) + ")";
                        ctx.beginPath();
                        ctx.arc(ccx, ccy, coreRadius, 0, Math.PI * 2);
                        ctx.fill();
                    }
                    // Draw inner copper core element
                    ctx.fillStyle = "#ffffff";
                    ctx.beginPath();
                    ctx.arc(ccx, ccy, coreRadius - 6 > 3 ? coreRadius - 6 : 3, 0, Math.PI * 2);
                    ctx.fill();
                    ctx.fillStyle = "#d97706"; // copper gold
                    ctx.beginPath();
                    ctx.arc(ccx, ccy, coreRadius - 7 > 2 ? coreRadius - 7 : 2, 0, Math.PI * 2);
                    ctx.fill();
                }
                ctx.restore();
                // Wire Installation Style Background (Tray/Conduit frames)
                if (state.installation === "tray") {
                    ctx.save();
                    ctx.strokeStyle = "#cbd5e1";
                    ctx.lineWidth = 4;
                    ctx.beginPath();
                    ctx.moveTo(lineX1, lineY + (wireWidth / 2) + 5);
                    ctx.lineTo(lineX2, lineY + (wireWidth / 2) + 5);
                    ctx.stroke();
                    ctx.lineWidth = 2;
                    ctx.strokeStyle = "#e2e8f0";
                    for (let lx = lineX1 + 10; lx < lineX2; lx += 25) {
                        ctx.beginPath();
                        ctx.moveTo(lx, lineY + (wireWidth / 2) + 5);
                        ctx.lineTo(lx - 4, lineY + (wireWidth / 2) + 15);
                        ctx.stroke();
                    }
                    ctx.restore();
                } else if (state.installation === "conduit") {
                    ctx.save();
                    // Conduit pipe dimensions matching the cross-section
                    const pipeOuterR = crossR + 16;
                    const pipeOffsetY = (wireWidth / 2) + 5;
                    // Tangent start positioned explicitly outer to the pipe outer radius to prevent overlaps
                    const conduitLineX1 = crossCx + pipeOuterR + 4;
                    // Conduit side background
                    ctx.fillStyle = "rgba(226, 232, 240, 0.4)";
                    ctx.fillRect(conduitLineX1, lineY - pipeOffsetY - 4, lineX2 - conduitLineX1, (pipeOffsetY + 4) * 2);
                    ctx.strokeStyle = "rgba(148, 163, 184, 0.2)";
                    ctx.lineWidth = 1;
                    for (let lx = conduitLineX1 - 20; lx < lineX2 + 20; lx += 15) {
                        if (lx >= conduitLineX1) {
                            ctx.beginPath();
                            ctx.moveTo(lx, lineY - pipeOffsetY - 4);
                            ctx.lineTo(lx + 10, lineY + pipeOffsetY + 4);
                            ctx.stroke();
                        }
                    }
                    // Conduit pipes (drawn exactly from the circular pipe wall)
                    ctx.strokeStyle = "#94a3b8";
                    ctx.lineWidth = 3;
                    ctx.beginPath();
                    ctx.moveTo(conduitLineX1, lineY - pipeOffsetY);
                    ctx.lineTo(lineX2, lineY - pipeOffsetY);
                    ctx.moveTo(conduitLineX1, lineY + pipeOffsetY);
                    ctx.lineTo(lineX2, lineY + pipeOffsetY);
                    ctx.stroke();
                    ctx.restore();
                }
                ctx.save();
                // Draw base thick cable line (Scale width with chosen sizing)
                ctx.strokeStyle = "#cbd5e1";
                ctx.lineWidth = wireWidth;
                ctx.lineCap = "round";
                ctx.beginPath();
                ctx.moveTo(lineX1, lineY);
                ctx.lineTo(lineX2, lineY);
                ctx.stroke();
                // Voltage drop gradient color overlay along wire
                const lineGlowGrad = ctx.createLinearGradient(lineX1, lineY, lineX2, lineY);
                lineGlowGrad.addColorStop(0, "#0284c7");
                lineGlowGrad.addColorStop(1, "rgba(71, 85, 105, 0.45)");
                ctx.strokeStyle = lineGlowGrad;
                ctx.lineWidth = wireWidth - 4 > 2 ? wireWidth - 4 : 2;
                ctx.beginPath();
                ctx.moveTo(lineX1, lineY);
                ctx.lineTo(lineX2, lineY);
                ctx.stroke();
                // 1. Long wire bypass CAD-style break indicator (Distance L effect)
                if (state.length > 80) {
                    ctx.save();
                    const midX = (lineX1 + lineX2) / 2;
                    const halfW = wireWidth / 2;
                    const cutOutW = 12; // width of the break gap
                    const ext = 5; // vertical extension beyond the wire
                    // A. Cut the wire cleanly by filling background color
                    ctx.fillStyle = "#ffffff";
                    ctx.fillRect(midX - cutOutW / 2, lineY - halfW - 2, cutOutW, wireWidth + 4);
                    // B. Draw sophisticated CAD-style double break lines
                    ctx.strokeStyle = "#475569";
                    ctx.lineWidth = 1.5;
                    ctx.lineCap = "round";
                    ctx.lineJoin = "round";
                    ctx.beginPath();
                    // Left wire end cap
                    ctx.moveTo(midX - cutOutW / 2, lineY - halfW);
                    ctx.lineTo(midX - cutOutW / 2, lineY + halfW);
                    // Right wire end cap
                    ctx.moveTo(midX + cutOutW / 2, lineY - halfW);
                    ctx.lineTo(midX + cutOutW / 2, lineY + halfW);
                    ctx.stroke();
                    // Sharp break lines crossing the gap
                    ctx.strokeStyle = "#475569";
                    ctx.lineWidth = 1.8;
                    // First diagonal slash
                    ctx.beginPath();
                    ctx.moveTo(midX - cutOutW / 2, lineY - halfW + 3);
                    ctx.lineTo(midX - 2, lineY - halfW - ext);
                    ctx.lineTo(midX + 2, lineY + halfW + ext);
                    ctx.lineTo(midX + cutOutW / 2, lineY + halfW - 3);
                    ctx.stroke();
                    // Second parallel diagonal slash for CAD double break look
                    ctx.beginPath();
                    ctx.moveTo(midX - cutOutW / 2 + 3, lineY - halfW + 6);
                    ctx.lineTo(midX - 2 + 3, lineY - halfW - ext + 3);
                    ctx.lineTo(midX + 2 + 3, lineY + halfW + ext - 3);
                    ctx.lineTo(midX + cutOutW / 2 + 3, lineY + halfW - 6);
                    ctx.stroke();
                    ctx.restore();
                }
                // 2. Electron flow attenuation (voltage drop representation)
                state.electronPhase += (state.current * 0.05 + 1.0) * dt * 0.45;
                if (state.electronPhase > 1.0) {
                    state.electronPhase -= 1.0;
                }
                // Calculate loss fading factor based on actual voltage drop percentage
                const voltsLimitVal = state.phase === 1 ? 220.0 : 380.0;
                const actualDropRatio = state.actualVoltageDrop / voltsLimitVal;
                const lossFactor = Math.min(actualDropRatio * 8.0, 0.85);
                ctx.save();
                for (let i = 0; i < lineParticles.length; i++) {
                    const p = lineParticles[i];
                    let currentRatio = p.xRatio + state.electronPhase;
                    if (currentRatio > 1.0) {
                        currentRatio -= 1.0;
                    }
                    // Slower electron flow on high drop
                    const speedFactor = 1.0 - (currentRatio * lossFactor * 0.6);
                    const px = lineX1 + ((p.xRatio + state.electronPhase * speedFactor) % 1.0) * (lineX2 - lineX1);
                    // Particle spread dynamically scaled with wireWidth
                    const py = lineY + p.offsetY * (wireWidth / 8.0);
                    const progressRatio = (px - lineX1) / (lineX2 - lineX1);
                    const alpha = 1.0 - (progressRatio * lossFactor * 0.75);
                    ctx.fillStyle = "rgba(255, 255, 255, " + Math.max(alpha, 0.1) + ")";
                    ctx.shadowBlur = 6 * alpha;
                    ctx.shadowColor = "#ffffff";
                    ctx.beginPath();
                    ctx.arc(px, py, 2.5 * Math.max(alpha, 0.5), 0, Math.PI * 2);
                    ctx.fill();
                }
                ctx.restore();
                // 3. Distance ruler & guide (Position dynamically adjusted with wireWidth)
                ctx.save();
                ctx.strokeStyle = "rgba(71, 85, 105, 0.3)";
                ctx.lineWidth = 1;
                ctx.setLineDash([3, 3]);
                const scaleY = lineY + (wireWidth / 2) + 20;
                ctx.beginPath();
                ctx.moveTo(lineX1, scaleY);
                ctx.lineTo(lineX2, scaleY);
                ctx.stroke();
                ctx.setLineDash([]);
                ctx.beginPath();
                ctx.moveTo(lineX1, scaleY - 4);
                ctx.lineTo(lineX1, scaleY + 4);
                ctx.moveTo(lineX2, scaleY - 4);
                ctx.lineTo(lineX2, scaleY + 4);
                ctx.stroke();
                const textStr = "L = " + state.length + " m";
                const textWidth = ctx.measureText(textStr).width + 8;
                ctx.fillStyle = "#f8fafc";
                ctx.fillRect((lineX1 + lineX2) / 2 - textWidth / 2, scaleY - 7, textWidth, 14);
                ctx.fillStyle = "#475569";
                ctx.font = "500 11px Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.textAlign = "center";
                ctx.textBaseline = "middle";
                ctx.fillText(textStr, (lineX1 + lineX2) / 2, scaleY);
                ctx.restore();
                // D. Heat Wave Particle System Update & Render
                const heatIndexVal = Math.min((state.current / state.ampacityLimit) * 100.0, 150.0);
                let spawnChance = (heatIndexVal / 100.0) * 0.45;
                if (state.installation === "conduit") {
                    spawnChance *= 1.4; // Heat trapped within conduit
                }
                if ((Math.random() < spawnChance) ? (heatParticles.length < maxHeatParticles) : false) {
                    const type = Math.random() < 0.35 ? 0 : 1;
                    if (type === 0) {
                        const angle = Math.random() * Math.PI - Math.PI;
                        const dist = crossR * Math.random();
                        heatParticles.push({
                            x: crossCx + Math.cos(angle) * dist,
                            y: crossCy + Math.sin(angle) * dist,
                            vx: (Math.random() - 0.5) * 12,
                            vy: -15 - Math.random() * 25,
                            life: 1.0,
                            decay: 0.02 + Math.random() * 0.03,
                            size: 3 + Math.random() * 6,
                            isCore: true
                        });
                    } else {
                        const rx = lineX1 + Math.random() * (lineX2 - lineX1);
                        heatParticles.push({
                            x: rx,
                            y: lineY + (Math.random() - 0.5) * (wireWidth - 4),
                            vx: (Math.random() - 0.5) * 8,
                            vy: -10 - Math.random() * 20,
                            life: 1.0,
                            decay: 0.03 + Math.random() * 0.04,
                            size: 2 + Math.random() * 5,
                            isCore: false
                        });
                    }
                }
                ctx.save();
                ctx.globalCompositeOperation = "screen";
                for (let i = heatParticles.length - 1; i >= 0; i--) {
                    const p = heatParticles[i];
                    p.x += p.vx * dt;
                    p.y += p.vy * dt;
                    p.life -= p.decay;
                    if (p.life <= 0) {
                        heatParticles.splice(i, 1);
                        continue;
                    }
                    let hue = 35;
                    if (heatIndexVal > 100) {
                        hue = 0;
                    } else if (heatIndexVal > 80) {
                        hue = 20;
                    } else if (heatIndexVal < 50) {
                        hue = 45;
                    }
                    const alpha = p.life * (heatIndexVal / 150) * 0.35;
                    if ((state.installation === "conduit") ? (!p.isCore) : false) {
                        const pipeOffsetY = (wireWidth / 2) + 5;
                        if (p.y < lineY - pipeOffsetY) {
                            p.vy *= 0.2;
                            p.vx += (Math.random() - 0.5) * 15;
                            p.size += 0.1;
                        }
                    }
                    const radGrad = ctx.createRadialGradient(p.x, p.y, 0, p.x, p.y, p.size);
                    radGrad.addColorStop(0, "hsla(" + hue + ", 100%, 60%, " + alpha + ")");
                    radGrad.addColorStop(1, "hsla(" + hue + ", 100%, 50%, 0)");
                    ctx.fillStyle = radGrad;
                    ctx.beginPath();
                    ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
                    ctx.fill();
                }
                ctx.restore();
                // E. Technical Dimension Layout (CAD/Blueprint styling)
                ctx.save();
                ctx.strokeStyle = "rgba(71, 85, 105, 0.4)";
                ctx.fillStyle = "#475569";
                ctx.lineWidth = 1;
                // 1. Cable Outer Diameter Dimension (Left Side vertical - text rotated vertically)
                const dimX = crossCx - crossR - 22;
                ctx.beginPath();
                ctx.moveTo(crossCx - crossR, crossCy - crossR);
                ctx.lineTo(dimX - 4, crossCy - crossR);
                ctx.moveTo(crossCx - crossR, crossCy + crossR);
                ctx.lineTo(dimX - 4, crossCy + crossR);
                ctx.stroke();
                const arrowLimitY = Math.max(38, crossR + 6); // Secure at least 38px radius to prevent mm text overlapping the extension lines
                drawArrow(dimX, crossCy - 10, dimX, crossCy - arrowLimitY, 4);
                drawArrow(dimX, crossCy + 10, dimX, crossCy + arrowLimitY, 4);
                ctx.beginPath();
                ctx.moveTo(dimX, crossCy - 10);
                ctx.lineTo(dimX, crossCy + 10);
                ctx.stroke();
                const physicalD = (1.8 * Math.sqrt(state.chosenSize) + 8).toFixed(1);
                const dimText = "Ø " + physicalD + " mm";
                ctx.save();
                ctx.translate(dimX - 6, crossCy); // Position text exactly 6px to the left of the vertical arrow line
                ctx.rotate(-Math.PI / 2); // Rotate vertically matching the CAD standard
                ctx.font = "bold 11px Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.textAlign = "center";
                ctx.textBaseline = "middle";
                // Add white halo outline for premium readability
                ctx.strokeStyle = "#ffffff";
                ctx.lineWidth = 2.0; // Reduced thickness to prevent letter overlap (m-m blurring)
                ctx.strokeText(dimText, 0, 0);
                ctx.fillStyle = "#475569";
                ctx.fillText(dimText, 0, 0);
                ctx.restore();
                // 2. Conductor Sizing Leader Line (Pointer to Live core - positioned to top-right to prevent overlap)
                const targetCoreAngle = -Math.PI / 2; // top-most core
                const pcx = crossCx + Math.cos(targetCoreAngle) * cDist;
                const pcy = crossCy + Math.sin(targetCoreAngle) * cDist;
                const pointerAngle = -Math.PI * 0.25; // point to top-right edge
                const edgeX = pcx + Math.cos(pointerAngle) * coreRadius;
                const edgeY = pcy + Math.sin(pointerAngle) * coreRadius;
                const leaderX1 = edgeX + 15;
                const leaderY1 = edgeY - 15;
                const leaderX2 = leaderX1 + 25;
                ctx.beginPath();
                ctx.moveTo(edgeX, edgeY);
                ctx.lineTo(leaderX1, leaderY1);
                ctx.lineTo(leaderX2, leaderY1);
                ctx.stroke();
                ctx.beginPath();
                ctx.arc(edgeX, edgeY, 2, 0, Math.PI * 2);
                ctx.fillStyle = "rgba(71, 85, 105, 0.8)";
                ctx.fill();
                ctx.font = "bold 11px Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.textAlign = "left";
                ctx.textBaseline = "bottom";
                const sizeText = state.chosenSize.toFixed(1) + " mm²";
                ctx.strokeStyle = "#ffffff";
                ctx.lineWidth = 2.0; // Reduced thickness to prevent blurring
                ctx.strokeText(sizeText, leaderX2 + 2, leaderY1 + 3);
                ctx.fillStyle = "#475569";
                ctx.fillText(sizeText, leaderX2 + 2, leaderY1 + 3);
                // 3. Technical Labels (Section name &#038; route name)
                ctx.fillStyle = "rgba(71, 85, 105, 0.4)";
                ctx.font = "bold 9px Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.textAlign = "left";
                ctx.fillText("SEC A-A: CROSS SECTION", 10, height - 10);
                ctx.textAlign = "right";
                const cableSpecText = (state.material.toUpperCase() === "CU" ? "COPPER" : "ALUMINUM") + " " + (state.phase === 1 ? "1Ø2W" : "3Ø4W");
                ctx.fillText("ROUTE PLAN: " + cableSpecText, width - 10, height - 10);
                ctx.restore();
                // C. Render Load Indicator (Right side box)
                ctx.save();
                const loadBoxX = lineX2 + 10;
                const loadBoxY = lineY - 30;
                ctx.fillStyle = "#ffffff";
                ctx.strokeStyle = "#475569";
                ctx.lineWidth = 3;
                ctx.beginPath();
                ctx.rect(loadBoxX, loadBoxY, 70, 60);
                ctx.fill();
                ctx.stroke();
                // Draw little load motor inside
                ctx.fillStyle = "#0284c7";
                ctx.font = "bold 11px Outfit, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.textAlign = "center";
                ctx.fillText("LOAD", loadBoxX + 35, loadBoxY + 24);
                ctx.fillStyle = "#475569";
                ctx.font = "10px Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
                ctx.fillText(Math.round(state.current) + " A", loadBoxX + 35, loadBoxY + 44);
                ctx.restore();
            }
            // Sync preset and run initial calculations
            loadPreset('household');
            requestAnimationFrame(animate);
            // Right-click &#038; Keyboard shortcuts block
            document.addEventListener('contextmenu', function(e) {
                e.preventDefault();
                alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                return false;
            }, { capture: true });
            document.addEventListener('selectstart', function(e) {
                e.preventDefault();
                return false;
            }, { capture: true });
            document.addEventListener('keydown', function(e) {
                if (e.key === 'F12') {
                    e.preventDefault();
                    alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                    return false;
                }
                if (e.ctrlKey) {
                    if (e.key === 'u' || e.key === 'c' || e.key === 's' || e.key === 'U' || e.key === 'C' || e.key === 'S') {
                        e.preventDefault();
                        alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                        return false;
                    }
                    if (e.shiftKey) {
                        if (['i','I','j','J','c','C'].includes(e.key)) {
                            e.preventDefault();
                            alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                            return false;
                        }
                    }
                }
            }, { capture: true });
        }
        let initAttempts = 0;
        function tryInit() {
            initAttempts++;
            initSimulator();
            if (!window.__cable_initialized) {
                if (initAttempts < 50) {
                    setTimeout(tryInit, 100);
                }
            }
        }
        if (document.readyState === 'complete' || document.readyState === 'interactive') {
            tryInit();
        } else {
            document.addEventListener('DOMContentLoaded', tryInit);
            window.addEventListener('load', tryInit);
        }
        })();
</script>


<div style="background: linear-gradient(135deg, rgba(0,242,254,0.03), rgba(138,43,226,0.03)); border: 1px solid rgba(0,242,254,0.15); border-radius: 12px; padding: 18px 24px; margin: 25px auto 35px auto; font-size: 0.95em; color: #4b5563; line-height: 1.7; font-family: sans-serif;">
    <strong style="color: #1f2937; font-size: 1.05em; display: flex; align-items: center; gap: 8px;">
        <span style="font-size: 1.2em;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span> 간편 사용 설명서
    </strong>
    <ol style="margin: 10px 0 0 0; padding-left: 20px;">
        <li style="margin-bottom: 6px;"><strong>시스템 전압 및 상수 선택: 단상 220V 또는 3상 380V 중 전력 송전 환경을 선택합니다.</strong></li>
<li style="margin-bottom: 6px;">부하 용량 및 전송 거리 정의: 슬라이더를 이용하여 소요 전류(Ampere) 및 송전 단으로부터 부하까지의 케이블 포설 거리(m)를 설정합니다.</li>
<li style="margin-bottom: 6px;">허용 기준치 및 배선재 세팅: 케이블 도체 재질(동 Cu, 알루미늄 Al)과 포설 형태(노출 트레이, 배관 매입, 지하 매설)를 입력합니다.</li>
<li style="margin-bottom: 6px;">실시간 케이블 내부 상태 분석: 계산된 최적 공칭 규격(mm²)과 함께 전하 밀도 과다에 따른 발열 가중치와 실시간 전압강하 비율을 계측 모니터에서 분석합니다.</li>
    </ol>
</div>


<details class="premium-seo-accordion" style="border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fbfbfc; padding: 0; margin: 30px auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01); font-family: sans-serif;">
    <summary style="display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 1.1em; font-weight: 700; color: #1f2937; cursor: pointer; user-select: none; outline: none; list-style: none;">
        <span><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 상세 전선 단면적 계산법 및 전압 강하 공식 (내선규정/KEC)</span>
        <span class="accordion-arrow" style="font-size: 0.9em; color: #9ca3af; transition: transform 0.2s ease;">▼</span>
    </summary>
    <div style="padding: 0 24px 24px 24px; border-top: 1px solid rgba(0,0,0,0.04); background: #ffffff; border-radius: 0 0 12px 12px; font-size: 0.98em; color: #374151; line-height: 1.8;">
        <div style="margin-top: 20px;">
            <h3>1. 케이블 규격 선정(Cable Sizing)의 3대 핵심 엔지니어링 팩터</h3>
<p>안전한 전력 공급을 위해 전선을 선정할 때는 한국전기설비규정(KEC, Korea Electro-technical Code)에 부합하는 다음 3가지 핵심 검토항목을 모두 통과해야 합니다.</p><ul><li><strong>허용 전류 (Ampacity):</strong> 도체에 지속적으로 전류가 흐를 때 도체 피복의 최고허용온도(예: XLPE의 경우 90℃)를 초과하지 않는 안전 한계 전류입니다. 포설 환경(밀폐도, 주변 온도)에 따른 보정 계수가 적용됩니다.</li><li><strong>전압 강하 (Voltage Drop):</strong> 송전 선로가 길어질수록 도체 자체 저항에 의해 부하 단의 전압이 강하하는 현상입니다. 기계 장비의 오작동 및 효율 저하를 유발하므로 통상 3%~5% 이내로 제어해야 합니다.</li><li><strong>기계적 강도 및 단락 전류:</strong> 사고 시 발생하는 순간 단락 전류에 견디는 열적 능력을 갖춰야 합니다.</li></ul>
<h3>2. 허용 전압 강하율 및 단면적(A) 산출 계산 공식</h3>
<p>내선규정에서 사용되는 저압 배선에서의 허용 전류 및 전압강하 기준 공식은 다음과 같이 요약 정리됩니다.</p><p><strong>① 직류 및 단상 2선식 선로 전압강하 공식:</strong></p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">e = (35.6 &times; L &times; I) / (1000 &times; A) &nbsp;[V]</p><p><strong>② 삼상 3선식 선로 전압강하 공식:</strong></p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">e = (30.8 &times; L &times; I) / (1000 &times; A) &nbsp;[V]</p><p>여기서 <code>L</code>은 선로의 편도 길이(m), <code>I</code>는 부하 전류(A), <code>A</code>는 전선의 단면적(mm²)입니다. 이 식을 전선 단면적 <code>A</code>에 대해 유도하면 다음과 같이 필요한 케이블의 최하 단면적을 알 수 있습니다.</p><p style="text-align: center; font-weight: bold; background: #e0f2fe; padding: 16px; border-radius: 8px; font-size: 1.05em; color: #0369a1;">A_req = (30.8 &times; L &times; I) / (1000 &times; e_allow) &nbsp;[mm²] &nbsp;&nbsp;(삼상 기준)</p>
<h3>3. 포설 환경 및 도체 고유 저항에 따른 보정</h3>
<p>케이블의 안전 전류 용량은 도체의 고유 저항계수(<code>&rho;</code>)와 도체가 외계로 방열하는 기하학적 형태에 절대적인 지배를 받습니다.</p><ul><li><strong>구리(Copper) 도체:</strong> 전기적 전도도가 뛰어나고(저항률 <code>1/58</code>) 내구성이 강해 대부분의 건축, 공업 설비에 채택됩니다.</li><li><strong>알루미늄(Aluminium) 도체:</strong> 전도도는 구리의 약 61% 수준(저항률 <code>1/35</code>)으로 떨어지지만 무게가 가볍고 저렴하여 대형 고압 한전 송배전선로에 채택됩니다. 단, 동일 전류 수준에서 구리 대비 1~2단계 큰 공칭 규격을 채용해야 안전합니다.</li></ul>
        </div>
    </div>
</details>
<style>
details.premium-seo-accordion[open] summary .accordion-arrow { transform: rotate(180deg); color: #00f2fe; }
details.premium-seo-accordion summary::-webkit-details-marker { display: none; }
details.premium-seo-accordion:hover { border-color: rgba(0,242,254,0.3); }
</style>


<h2 style="font-size: 1.4em; font-weight: 700; color: #1f2937; margin-top: 40px; margin-bottom: 15px; border-left: 4px solid #3b82f6; padding-left: 10px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 함께 보면 좋은 공학 글</h2>


<a href="https://myengnote.com/power-factor-correction-calculator-simulator/" style="text-decoration: none; background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 15px; margin: 12px 0; transition: box-shadow 0.2s; display: table; width: 100%; box-sizing: border-box;">
    <span style="display: table-cell; vertical-align: middle;">
        <span style="font-size: 30px; margin-right: 15px; float: left;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span>
        <span style="display: block; overflow: hidden;">
            <span style="display: block; font-size: 0.9em; color: #6b7280; margin-bottom: 4px;">함께 보면 좋은 글</span>
            <span style="display: block; font-size: 1.1em; font-weight: bold; color: #111827;">역률 개선 계산기 &#038; 시뮬레이터</span>
        </span>
    </span>
    <span style="display: table-cell; vertical-align: middle; width: 40px; text-align: right; color: #3b82f6; font-size: 24px; font-weight: bold;">→</span>
</a>


<a href="https://myengnote.com/industrial-boiler-efficiency-calculator-losses/" style="text-decoration: none; background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 15px; margin: 12px 0; transition: box-shadow 0.2s; display: table; width: 100%; box-sizing: border-box;">
    <span style="display: table-cell; vertical-align: middle;">
        <span style="font-size: 30px; margin-right: 15px; float: left;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span>
        <span style="display: block; overflow: hidden;">
            <span style="display: block; font-size: 0.9em; color: #6b7280; margin-bottom: 4px;">함께 보면 좋은 글</span>
            <span style="display: block; font-size: 1.1em; font-weight: bold; color: #111827;">보일러 효율 계산기 &#038; 시뮬레이터</span>
        </span>
    </span>
    <span style="display: table-cell; vertical-align: middle; width: 40px; text-align: right; color: #3b82f6; font-size: 24px; font-weight: bold;">→</span>
</a>
]]></content:encoded>
					
					<wfw:commentRss>https://myengnote.com/cable-sizing-calculator-simulator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
