* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Malgun Gothic', sans-serif;
    padding: 24px;
}
.Whale_Bolock {
    padding: 20px 40px 40px 40px;
}
.Chart_Title {
    overflow: hidden;
    margin-bottom: 10px;
}
.Chart_Title_Left {
    float: left;
}
.Chart_Title_Txt {
    font-size: 80px;
    font-weight: 800;
}
.Chart_Title_Right {
    float: right;
    margin: 10px 10px 0px 0px;
}
.chart-wrap {
    background: #1a1f3a;
    border: 1px solid #2a3458;
    border-radius: 4px;
    padding: 24px 20px 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.btn-reset {
    font-size: 11px;
    color: #475569;
    background: #0f172a;
    border: 1px solid #2a3458;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
}
.btn-reset:hover { color: #94a3b8; border-color: #475569; }
.btn-period {
    font-size: 11px;
    color: #475569;
    background: #0f172a;
    border: 1px solid #2a3458;
    border-radius: 4px;
    padding: 3px 15px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn-period:hover { color: #94a3b8; border-color: #475569; }
.btn-period.active { color: #38bdf8; border-color: #38bdf8; background: #0a1929; }
.btn_plus {
    background: #0158cd;
    border: 1px solid #006eff;
    color: #fff;
    padding: 3px 20px;
}
.btn_plus:hover {
    background: #006eff;
    border: 1px solid #006eff;
    color: #fff;
}
.chart-sub {
    font-size: 12px;
    color: #475569;
    margin-bottom: 20px;
}
.chart-sub span { color: #ff6b9d; }
.chart-hint {
    font-size: 11px;
    color: #334155;
    margin-bottom: 12px;
}

/* ── 토글 스위치 ── */
.toggle-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 12px;
    background: #0b1120;
    border: 1px solid #1e293b;
    border-radius: 6px;
    margin-bottom: 10px;
}
.toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.toggle-input { display: none; }
.toggle-switch {
    display: inline-block;
    width: 36px; height: 18px;
    border-radius: 9px;
    background: #1e293b;
    border: 1px solid #334155;
    position: relative;
    transition: background .2s, border-color .2s;
    flex-shrink: 0;
}
.toggle-knob {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #475569;
    position: absolute;
    top: 2px; left: 2px;
    transition: left .2s, background .2s;
}
.toggle-input:checked + .toggle-switch {
    background: var(--tc);
    border-color: var(--tc);
}
.toggle-input:checked + .toggle-switch .toggle-knob {
    left: 20px;
    background: #fff;
}
.toggle-label {
    font-size: 11px;
    color: var(--tc);
    white-space: nowrap;
}

/* ── 컨트롤 바 공통 ── */
.ctrl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.ctrl-label {
    font-size: 10px;
    color: #334155;
    letter-spacing: 1px;
    width: 38px;
    flex-shrink: 0;
}
.ctrl-btn {
    font-size: 10px;
    color: #475569;
    background: #0b1120;
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 2px 9px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.ctrl-btn:hover { color: #94a3b8; border-color: #334155; }

/* ── 드래그 바 1 (Pan 스크롤바) ── */
.scroll-track {
    flex: 1;
    height: 12px;
    background: #0b1120;
    border: 1px solid #1e293b;
    border-radius: 6px;
    position: relative;
    cursor: default;
}
.scroll-thumb {
    position: absolute;
    top: 2px;
    height: 6px;
    background: #38bdf8;
    border-radius: 3px;
    cursor: grab;
    min-width: 16px;
    transition: background .1s;
}
.scroll-thumb.dragging { cursor: grabbing; background: #7dd3fc; }

/* ── 드래그 바 2 (Zoom 슬라이더) ── */
#zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid #0b1120;
}
#zoom-slider::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid #0b1120;
}
.zoom-val {
    font-size: 10px;
    color: #475569;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

#whaleChart {
    cursor: grab;
    border: 1px solid #2a3458;
    border-radius: 4px;
    background: #0c1221;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* ── 어종별 수량 요약 ── */
.grade-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #1e293b;
}
.grade-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 64px;
    background: #0c1323;
    border: 1px solid #2a3458;
    border-radius: 6px;
    padding: 6px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.gs-label {
    font-size: 10px;
    color: var(--tc);
    white-space: nowrap;
}
.gs-cnt {
    font-size: 13px;
    font-weight: bold;
    color: var(--tc);
}
.gs-amt {
    font-size: 10px;
    color: #475569;
}
.gs-pct {
    font-size: 11px;
    color: #94a3b8;
    font-weight: bold;
}

/* ── 활용법 ── */
.how-to {
    margin-top: 20px;
    background: #1a1f3a;
    border: 1px solid #2a3458;
    border-radius: 4px;
    padding: 20px 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.how-to-title {
    font-size: 13px;
    color: #94a3b8;
    font-weight: bold;
    margin-bottom: 14px;
    letter-spacing: 0.04em;
}
.how-to-section {
    margin-bottom: 14px;
}
.how-to-sub {
    font-size: 11px;
    color: #64748b;
    font-weight: bold;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}
.how-to-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.how-to-list li {
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
    padding-left: 10px;
    border-left: 2px solid #2a3458;
}
.how-to-list li strong {
    color: #64748b;
}