/* 모바일 메뉴 바·좌측 패널 접기 */

/* --- 모바일 메뉴 바 · 좌측 패널 접기 (test 공통, 원본: exhibition.css) --- */
.mobile-menu-bar {
  display: none;
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  border: 1px solid #6a6a6a;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:active {
  background: #ececec;
}

.hamburger__glyph {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 32px;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger__img {
  display: block;
  width: auto;
  height: 10px;
  flex-shrink: 0;
}

.hamburger__img--short {
  height: 8px;
}

.hamburger__img--mid {
  height: 9px;
}

.hamburger__img--long {
  height: 10px;
}

.shell.menu-collapsed-mobile .hamburger__glyph {
  transform: rotate(180deg);
}

.mobile-menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #444;
}

.left-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

@media (max-width: 820px) {
  .mobile-menu-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 100%;
    padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px
      max(14px, env(safe-area-inset-left, 0px));
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid #e2e2e2;
    background: #f7f7f7;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
  }

  /* 펼침: 고정 바 아래 뷰포트 오버레이 (스크롤 위치와 무관하게 노출) */
  .left-panel {
    position: fixed;
    top: var(--ti-mobile-menu-bar-offset);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 29;
    flex: none;
    background: #f7f7f7;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100dvh - var(--ti-mobile-menu-bar-offset));
    opacity: 1;
    pointer-events: auto;
    border-bottom: 1px solid #e2e2e2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition:
      max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.32s ease,
      box-shadow 0.32s ease;
  }

  body.ti:has(#tiShell:not(.menu-collapsed-mobile)) {
    overflow: hidden;
  }

  .shell:not(.menu-collapsed-mobile) > .left {
    border-bottom: none;
  }

  /* 접힘: 패널이 flex-grow로 잔여 높이를 먹지 않도록 basis·grow 제거 (ti-left 빈 여백 방지) */
  .shell.menu-collapsed-mobile > .left {
    min-height: 0 !important;
    padding-top: 0;
    border-bottom: none;
    grid-row: 1;
    pointer-events: none;
  }

  .shell.menu-collapsed-mobile > .left .mobile-menu-bar {
    pointer-events: auto;
  }

  /* 접힘: 좌열 빈 69px 대신 본문이 고정 메뉴 바 바로 아래부터 시작 */
  .shell.menu-collapsed-mobile > .right {
    grid-row: 1;
    padding-top: var(--ti-mobile-menu-bar-offset);
  }

  .shell.menu-collapsed-mobile > .footer.footer--slot-mobile {
    grid-row: 2;
  }

  .shell.menu-collapsed-mobile .left-panel {
    flex: 0 1 0px;
    min-height: 0;
    max-height: 0;
    opacity: 0;
    border-bottom: none;
    box-shadow: none;
    pointer-events: none;
    overflow: hidden;
  }

  .shell.menu-collapsed-mobile .left-gnb-mount {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 821px) {
  .shell.menu-collapsed-mobile .left-panel {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    flex: 1 1 auto;
  }

  .shell.menu-collapsed-mobile .hamburger__glyph {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hamburger__glyph {
    transition: none !important;
  }

  .left-panel {
    transition: none !important;
  }
}
