/*
 * 폰 폭(768px 미만)에서는 위쪽 두 줄(사이트 머리 + 예제 막대)을 한 줄로 합친다. 그리드가 첫 화면 위쪽에서 시작하게 하려는 것이다.
 * 한 줄 = [예제 목록 단추] [로고] ... [검색] [메뉴]. 예제 첫 화면 링크는 이동 경로(breadcrumb)에 있고,
 * 언어와 테마는 사이트 메뉴 화면(햄버거)에 이미 있어서 막대에서는 뺀다.
 */
@media (max-width: 767.98px) {
  html:not(.gx-nav-single) {
    --gx-top-h: var(--sm-h);
  }

  html:not(.gx-nav-single) .gx-top {
    flex-direction: row;
    align-items: center;
    border-bottom: 0;
    box-shadow: 0 1px 0 var(--sm-border);
  }

  html:not(.gx-nav-single) .gx-nav {
    flex: 1 1 auto;
    min-width: 0;
  }

  html:not(.gx-nav-single) .gx-bar {
    order: -1;
    flex: none;
    align-self: stretch;
    padding: 0 0 0 8px;
    gap: 0;
    background: var(--sm-bg);
  }

  html:not(.gx-nav-single) .gx-bar :is(.gx-brand, .gx-search-btn, .gx-top-actions) {
    display: none;
  }

  html:not(.gx-nav-single) .gx-nav-logo {
    padding-left: 4px;
    flex: 0 1 auto;
    min-width: 0;
  }

  /* 예제 목록 단추가 한 줄에 더해져 로고·검색·구입·메뉴가 다 안 들어가는 폭(WebKit 412px)에서는 로고가 비는 만큼만 줄어든다(넘치지 않게) */
  html:not(.gx-nav-single) .gx-nav-logo img {
    min-width: 0;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }
}
