#controls {
    padding: 8px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}


#tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1rem;
    z-index: 10;
}


/* 예: static/css/style.css 맨 아래에 추가 */
.chart-toolbar {
    display: grid;
    gap: 6px;
    padding: 6px 8px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 6px;
}

.chart-toolbar .toolbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.chart-toolbar .group-label {
    color: #bbb;
    font-size: 12px;
    width: 44px;
}

.chart-toolbar .tb-btn {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #444;
    background: #1f1f1f;
    color: #aaa;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.chart-toolbar .tb-btn.active {
    color: #fff;
    border-color: #666;
    background: #2c2c2c;
}

.chart-toolbar .tb-btn:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .chart-toolbar {
        padding: 6px;
    }

    .chart-toolbar .group-label {
        width: 38px;
    }
}

.chart-expandable { position: relative; }

.chart-expandable.expanded {
  position: fixed !important;
  inset: 0 !important;     /* top/right/bottom/left: 0 */
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
}

/* 배경 딤이 싫으면 이 블록 삭제하면 됨 */
.chart-expandable.expanded::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}


/* ===== 차트가 확대되었을 때만 스크롤 제거 ===== */

/* JavaScript로 body에 추가될 chart-expanded 클래스 기반 */
body.chart-expanded {
    overflow: hidden !important;
}

body.chart-expanded .scroll-area {
    overflow: hidden !important;
}

body.chart-expanded .calendar-wrapper {
    overflow: hidden !important;
}

/* HTML 요소도 직접 제어 */
html:has(body.chart-expanded) {
    overflow: hidden !important;
}

/* 스크롤바 완전 숨김 */
body.chart-expanded::-webkit-scrollbar,
body.chart-expanded .scroll-area::-webkit-scrollbar,
body.chart-expanded .calendar-wrapper::-webkit-scrollbar,
html:has(body.chart-expanded)::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.chart-expanded,
body.chart-expanded .scroll-area,
body.chart-expanded .calendar-wrapper {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
    max-height: 100vh !important; /* 뷰포트 높이 제한 */
}

html:has(body.chart-expanded) {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}