:root{font-family:system-ui,-apple-system,"Malgun Gothic","Apple SD Gothic Neo",sans-serif;color:#1b2a42;background:#f6f8fc;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.container{max-width:1100px;margin:auto;padding-left:24px;padding-right:24px}.skip-link{position:absolute;top:-50px;background:white;padding:12px;z-index:5}.skip-link:focus{top:10px}.topbar{background:#fff;border-bottom:1px solid #e9eef5}.topbar-inner{height:70px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:9px;align-items:center;font-size:21px;letter-spacing:-.6px}.brand strong span{color:#306be9}.brand-icon{display:grid;place-items:center;background:#e7efff;color:#376ae8;width:34px;height:34px;border-radius:10px}.header-tag{font-size:13px;color:#62728b}.intro{padding:35px 0 26px;display:flex;justify-content:space-between;align-items:end;gap:24px}.eyebrow{color:#356ad9;font-size:13px;font-weight:750;margin-bottom:9px}.intro h1{font-size:clamp(25px,3vw,36px);letter-spacing:-1.4px;line-height:1.25;margin:0 0 12px;font-weight:850}.intro h1 span{color:#2f69e3}.intro p{margin:0;font-size:15px;color:#66758c;line-height:1.6}.status{border:1px solid #f1dfba;background:#fff8e8;border-radius:999px;padding:9px 13px;display:flex;gap:8px;align-items:center;white-space:nowrap;font-size:12px;color:#926118;font-weight:750}.status-dot{width:7px;height:7px;border-radius:50%;background:#e3ab41}.status.connected{background:#effaf4;border-color:#cbebd7;color:#2f8055}.status.connected .status-dot{background:#38a66b}.status.stale{background:#fff1f0;border-color:#f5ceca;color:#b34d44}.status.stale .status-dot{background:#d8645b}.card{background:#fff;border:1px solid #e8edf6;border-radius:18px;box-shadow:0 9px 32px rgba(40,65,102,.045)}.main-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:stretch}.entry-card,.result-card{padding:25px 26px}.card h2{font-size:20px;letter-spacing:-.5px;margin:0;font-weight:800}.card-sub{color:#718096;font-size:13px;margin:7px 0 22px}.tabs{display:grid;grid-template-columns:1fr 1fr;background:#f0f4fb;padding:5px;border-radius:11px;gap:4px;margin:0 0 20px}.tab{border:0;background:none;padding:11px 7px;color:#718096;border-radius:8px;font-size:14px;font-weight:700}.tab.active{background:#fff;color:#2e67de;box-shadow:0 2px 8px rgba(36,73,132,.08)}label{display:block;font-size:13px;color:#42546f;font-weight:750;margin:0 0 8px}.entry-card select{width:100%;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23718296' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 13px center/20px no-repeat;border:1px solid #dbe4f0;height:48px;border-radius:10px;padding:0 40px 0 14px;color:#273d60;font-size:14px;font-weight:700}.input-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:22px}.field-unit{display:flex;align-items:center;height:48px;border:1px solid #dbe4f0;border-radius:10px;padding:0 12px 0 0;overflow:hidden}.field-unit:focus-within,.entry-card select:focus{border-color:#477de7;outline:2px solid rgba(71,125,231,.13)}.field-unit input{border:0;outline:none;padding:0 8px 0 13px;width:100%;min-width:0;font-size:15px;color:#1e365b;font-weight:650}.field-unit input::placeholder{color:#a7b3c5;font-weight:450}.field-unit>span{font-size:13px;color:#8897ab}.saved-hint{color:#8c9bb0;font-size:12px;margin:13px 0 22px}.data-notice{border-radius:10px;background:#f5f7fb;color:#667791;border:1px solid #e9eef7;padding:13px 14px;font-size:13px;line-height:1.55}.data-notice.connected{background:#f0faf4;border-color:#d5eddf;color:#328253}.try-panel{margin-top:14px;border:1px solid #e6ecf5;border-radius:11px}.try-panel summary{cursor:pointer;padding:13px 15px;font-size:13px;font-weight:750;color:#4267ad;display:flex;align-items:center;justify-content:space-between;list-style:none}.try-panel summary::-webkit-details-marker{display:none}.try-panel[open] summary span{transform:rotate(180deg)}.try-body{padding:0 15px 13px}.try-body>p{margin:6px 0;color:#6b7b93;font-size:12px;line-height:1.6}.try-body .input-grid{margin-top:12px}.try-body label{font-size:12px}.try-note{margin-top:12px!important}.validation{color:#c23a4a;font-size:12px;margin:10px 0 0}.validation:empty{display:none}.result-header{display:flex;justify-content:space-between;align-items:center;gap:8px}.result-mode{font-size:12px;font-weight:750;background:#f1f4fa;color:#8290a7;padding:6px 10px;border-radius:8px;white-space:nowrap}.result-mode.manual{background:#fff3e3;color:#956421}.result-mode.live{background:#ebf8f1;color:#318458}.top-value-label{font-size:13px;color:#77869b;margin:32px 0 7px}.top-value{font-size:43px;line-height:1.13;font-weight:850;letter-spacing:-1.5px;color:#1e3353;font-variant-numeric:tabular-nums}.top-value small{font-size:19px;font-weight:600;color:#546984}.change-note{font-size:13px;color:#8290a4;margin:10px 0 29px;min-height:18px}.change-note.up,.positive{color:#d9445d!important}.change-note.down,.negative{color:#276de1!important}.divider{border-top:1px solid #edf1f6}.pnl-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0}.pnl-block{background:#f6f8fc;border:1px solid #edf1f7;padding:17px 15px;border-radius:12px;min-width:0}.pnl-block>span{font-size:12px;color:#75849b;display:block;margin-bottom:8px}.pnl-block strong{font-size:24px;letter-spacing:-.6px;white-space:nowrap;font-variant-numeric:tabular-nums}.amount-line{display:flex;justify-content:space-between;gap:10px;margin-top:15px;font-size:13px}.amount-line span{color:#78869a}.amount-line b{font-variant-numeric:tabular-nums}.updated-time{margin:24px 0 0;font-size:12px;color:#8493a8}.chart-card{padding:23px 26px 19px;margin-top:18px}.chart-head{display:flex;justify-content:space-between;align-items:start;gap:12px}.chart-head h2{font-size:19px}.chart-head p{font-size:13px;color:#7b899c;margin:6px 0 0}.chart-badge{background:#f1f4fa;color:#778aa4;padding:6px 10px;font-weight:700;font-size:12px;border-radius:7px;white-space:nowrap}.chart-badge.manual{background:#fff4e3;color:#a06a1f}.chart-badge.live{background:#edfaf2;color:#358459}.chart-area{height:246px;position:relative;margin:18px 0 8px;overflow:hidden;border-radius:11px;background:linear-gradient(to bottom,#fafcff,#fff)}.chart-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#b7c5d7;text-align:center;padding:20px}.chart-empty b{font-size:15px;color:#7488a1}.chart-empty span{font-size:13px;color:#9aabc0}.chart-area svg{width:100%;height:100%;display:block}.chart-footer{border-top:1px solid #eef2f8;display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:12px;color:#94a1b2;font-size:11px}.disclaimer{font-size:12px;line-height:1.7;color:#8d9aab;margin:18px 0 40px}.footer{border-top:1px solid #e8edf5;background:white}.footer-inner{min-height:65px;display:flex;align-items:center;justify-content:space-between;color:#8b98ab;font-size:12px}.footer-inner strong{font-size:14px;color:#38516f}.svg-grid-line{stroke:#e6edf7;stroke-width:1}.svg-label{fill:#899bb3;font-size:12px;font-family:inherit}.svg-chart-line{stroke:#3574ee;stroke-width:3.5;fill:none;stroke-linecap:round;stroke-linejoin:round}.svg-chart-point{fill:#3574ee;stroke:white;stroke-width:2}.svg-baseline{stroke:#aec4e8;stroke-width:1.5;stroke-dasharray:4 4}@media(max-width:760px){.container{padding-left:17px;padding-right:17px}.topbar-inner{height:58px}.brand{font-size:19px}.header-tag{font-size:11px}.intro{padding:25px 0 19px;display:block}.intro h1{font-size:27px;line-height:1.3;letter-spacing:-1px}.intro p{font-size:13px}.status{display:inline-flex;margin-top:17px;font-size:11px;padding:7px 11px}.main-grid{grid-template-columns:1fr;gap:12px}.entry-card,.result-card{padding:19px 18px}.card h2{font-size:18px}.card-sub{margin-bottom:17px}.input-grid{gap:9px}.field-unit{height:46px}.field-unit input{font-size:14px;padding-left:10px}.result-header{margin-bottom:0}.top-value-label{margin-top:22px}.top-value{font-size:38px}.change-note{margin-bottom:19px}.pnl-grid{margin:17px 0}.pnl-block{padding:15px 12px}.pnl-block strong{font-size:21px}.chart-card{margin-top:12px;padding:18px 16px}.chart-head h2{font-size:18px}.chart-head p{font-size:12px}.chart-area{height:200px;margin:12px 0 8px}.chart-footer{display:block;line-height:1.8}.chart-footer span{display:block}.footer-inner{gap:8px}}@media(max-width:370px){.intro h1{font-size:24px}.pnl-block strong{font-size:18px}.field-unit input{font-size:13px}.header-tag{max-width:125px;text-align:right}}

/* v0.3 — Official TradingView futures chart, not a fabricated ETF series */
.tradingview-card{margin:0 0 18px;padding:24px 26px 19px}
.tradingview-label{display:inline-block;margin-left:5px;font-size:11px;vertical-align:middle;color:#4269b5;background:#eef3ff;border-radius:6px;padding:4px 7px;letter-spacing:0}
.futures-tabs{display:flex;gap:8px;margin:18px 0 12px}
.futures-tab{border:1px solid #dfe7f3;background:#f7f9fd;border-radius:9px;color:#637691;padding:10px 17px;font-size:13px;font-weight:750}
.futures-tab.active{border-color:#80a5f5;color:#225cc9;background:#eaf1ff}
.tv-widget-wrap{height:440px;min-width:0;width:100%;background:#f7f9fe;border:1px solid #e9eef6;border-radius:10px;overflow:hidden}
tv-advanced-chart{width:100%;height:100%;display:block}
.tv-loading{display:flex;height:100%;align-items:center;justify-content:center;padding:20px;text-align:center;color:#637691;font-size:13px}
.external-chart-link{color:#2869da;text-decoration:underline;font-size:12px;font-weight:750;white-space:nowrap}
.tradingview-card .chart-footer{margin-top:12px}
@media(max-width:760px){.tradingview-card{padding:18px 16px;margin-bottom:12px}.tv-widget-wrap{height:360px}.futures-tabs{margin-top:13px}.futures-tab{flex:1;font-size:12px;padding:10px 7px}.external-chart-link{display:inline-block;margin-top:4px}}

/* v0.4: unrestricted chart fallback, market-specific leverage selectors */
.chart-card{margin:0 0 18px;padding:24px 26px 19px}
.futures-tabs{display:flex;gap:8px;margin:18px 0 14px}
.futures-tab{border:1px solid #dfe7f3;background:#f7f9fd;border-radius:9px;color:#637691;padding:10px 17px;font-size:13px;font-weight:750;cursor:pointer}
.futures-tab.active{border-color:#80a5f5;color:#225cc9;background:#eaf1ff}
.tv-external-panel{border:1px solid #dce8f8;background:#f5f9ff;padding:18px 20px;border-radius:12px;display:flex;gap:14px;align-items:start}
.tv-external-icon{background:#e2edff;color:#2a64cd;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-weight:850;font-size:24px;flex-shrink:0}
.tv-external-body{min-width:0;flex:1}
.tv-external-body strong{font-size:16px;color:#193758}
.tv-external-body p{font-size:12px;color:#647b9b;line-height:1.6;margin:7px 0 12px}
.tv-open-button{display:inline-flex;background:#2567e8;color:white;text-decoration:none;padding:11px 16px;border-radius:10px;font-size:13px;font-weight:750}
.tv-open-button:hover{background:#154fca}
.own-chart{margin-top:19px}
.own-chart-head{display:flex;gap:10px;align-items:center;justify-content:space-between}
.own-chart-head h3{font-size:15px;color:#1a3456}
.own-chart-head span{font-size:12px;color:#7b8a9e}
.own-chart .chart-area{border:1px solid #e8edf7;background:#fbfcff;height:220px}
.leverage-head{font-size:13px;color:#596a82;margin:0 0 9px;font-weight:700}
.leverage-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:17px}
.leverage-tab{border:1px solid #e2e8f2;border-radius:10px;padding:10px 5px;background:#f8faff;color:#627792;font-size:11px;line-height:1.5;cursor:pointer;min-width:0}
.leverage-tab b{display:block;font-size:14px;color:#223f68}
.leverage-tab.active{border-color:#6797ff;background:#eaf1ff;color:#245bca}
.leverage-tab.active b{color:#245bca}
.product-caution{padding:10px 12px;background:#fff8e7;border:1px solid #f2ddaa;border-radius:8px;font-size:12px;line-height:1.6;color:#8a5e1e;margin:10px 0 14px}
.product-caution[hidden]{display:none!important}
@media(max-width:760px){.chart-card{padding:18px 16px;margin-bottom:12px}.futures-tab{flex:1;font-size:12px;padding:10px 7px}.tv-external-panel{padding:15px 13px;gap:10px}.tv-external-body p{font-size:12px}.own-chart-head{display:block}.own-chart-head span{display:block;margin-top:3px}.own-chart .chart-area{height:175px}.leverage-tabs{gap:5px}.leverage-tab{font-size:10px;padding:9px 3px}.leverage-tab b{font-size:13px}}

/* v0.5: real on-page candle chart; absolutely no TradingView restricted widgets. */
.candle-chart-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e9eef6;border-bottom:0;padding:10px 13px;border-radius:10px 10px 0 0;background:#fbfcff}
.time-tabs{display:flex;gap:5px}.time-tab{font-size:12px;font-weight:750;cursor:pointer;border:1px solid transparent;background:transparent;color:#748398;border-radius:7px;padding:8px 12px}.time-tab.active{border-color:#c9daf8;background:#eaf2ff;color:#245fc4}
.candle-updated{font-size:11px;color:#8b9bb1}
.real-chart{height:390px;border:1px solid #e9eef6;border-radius:0 0 10px 10px;position:relative;overflow:hidden;background:#fff}
.real-chart canvas{width:100%;height:100%;display:block}
.chart-overlay{position:absolute;inset:0;background:rgba(255,255,255,.68);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:35px;gap:11px;pointer-events:none}
.chart-overlay[hidden]{display:none}
.chart-overlay strong{font-size:16px;color:#344b6e}.chart-overlay span{max-width:480px;font-size:13px;line-height:1.7;color:#788ca6}
.chart-bottom-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:13px;font-size:11px;color:#8597ad;flex-wrap:wrap}
.chart-bottom-row a{color:#2769d7;font-size:12px;font-weight:700;text-decoration:underline}
@media(max-width:760px){.real-chart{height:315px}.time-tab{padding:8px 10px}.candle-updated{font-size:10px}.chart-bottom-row{display:block}.chart-bottom-row a{display:inline-block;margin-top:8px}}

/* v0.6: live KST day/night selection */
.session-switch{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border:1px solid #e6edf7;border-radius:10px;margin:0 0 12px;background:#f9fbff}
.session-context{font-size:12px;color:#405b80;font-weight:700;line-height:1.4}
.session-buttons{display:flex;gap:5px;flex-shrink:0}
.session-btn{border:1px solid #d8e3f5;border-radius:8px;background:white;color:#637892;padding:7px 12px;font-size:12px;font-weight:800}
.session-btn.active{color:#215dc4;border-color:#88adf4;background:#e9f1ff}
@media(max-width:540px){.session-switch{display:block}.session-context{display:block;margin-bottom:10px}.session-buttons{display:grid;grid-template-columns:repeat(3,1fr)}.session-btn{padding:9px 7px}}
