/* V78_CLEAN_WORKSPACE_LAYOUT_V1 */

/* ── 데스크톱 사이드바 ── */
:root {
  --hb-sidebar-width: 280px;
}

.hb-side,
.hb-v61-navigation,
#hb-ui-prototype-root > aside,
#hb-ui-prototype-root .hb-sidebar {
  width: var(--hb-sidebar-width) !important;
  min-width: var(--hb-sidebar-width) !important;
  max-width: var(--hb-sidebar-width) !important;
  flex: 0 0 var(--hb-sidebar-width) !important;
}

/* 한글 메뉴는 글자별로 줄바꿈하지 않는다 */
.hb-side a,
.hb-side button,
.hb-v61-navigation a,
.hb-v61-navigation button,
.hb-v61-navigation .hb-nav-label {
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  white-space: nowrap !important;
}

/* 가로 스크롤 제거 및 세련된 세로 스크롤 */
.hb-side,
.hb-side nav,
.hb-v61-navigation {
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 190, 220, .45) transparent;
}

.hb-side::-webkit-scrollbar,
.hb-side nav::-webkit-scrollbar,
.hb-v61-navigation::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.hb-side::-webkit-scrollbar-track,
.hb-side nav::-webkit-scrollbar-track,
.hb-v61-navigation::-webkit-scrollbar-track {
  background: transparent;
}

.hb-side::-webkit-scrollbar-thumb,
.hb-side nav::-webkit-scrollbar-thumb,
.hb-v61-navigation::-webkit-scrollbar-thumb {
  background: rgba(160, 190, 220, .42);
  border-radius: 999px;
}

.hb-side::-webkit-scrollbar-button,
.hb-side nav::-webkit-scrollbar-button,
.hb-v61-navigation::-webkit-scrollbar-button {
  display: none;
}

/* 본문은 화면 밖으로 밀리지 않게 한다 */
#hb-ui-prototype-root,
#hb-ui-prototype-root main,
#hb-ui-prototype-root .hb-main,
#hb-ui-prototype-root .hb-content {
  min-width: 0 !important;
}

/* 표·버튼 묶음은 필요한 경우에만 내부 스크롤 */
#hb-ui-prototype-root table,
#hb-ui-prototype-root .hb-table-wrap,
#hb-ui-prototype-root .hb-list-wrap {
  max-width: 100%;
}

/* ── UI 편집 가이드: 평소에는 숨김 ── */
html:not(.hb-ui-edit-mode) .hb-ui-edit-guide,
html:not(.hb-ui-edit-mode) .hb-ui-edit-badge,
html:not(.hb-ui-edit-mode) .hb-ui-guide-badge,
html:not(.hb-ui-edit-mode) .hb-ui-number-badge,
html:not(.hb-ui-edit-mode) .hb-ui-number-label,
html:not(.hb-ui-edit-mode) [data-hb-ui-guide="true"] {
  display: none !important;
}

/* 수정 모드에서만 가이드 표시 */
html.hb-ui-edit-mode .hb-ui-edit-guide,
html.hb-ui-edit-mode .hb-ui-edit-badge,
html.hb-ui-edit-mode .hb-ui-guide-badge,
html.hb-ui-edit-mode .hb-ui-number-badge,
html.hb-ui-edit-mode .hb-ui-number-label,
html.hb-ui-edit-mode [data-hb-ui-guide="true"] {
  display: block;
}

/* 태블릿 */
@media (max-width: 1100px) {
  :root { --hb-sidebar-width: 240px; }
}

/* 모바일은 기존 접힘 동작 유지 */
@media (max-width: 760px) {
  :root { --hb-sidebar-width: 220px; }
}
