/* 617 J · 디자인 확정판(요한 18:17 · 18:18 · 18:25 · 18:29) — 사이트 모든 쪽 공용 덧붙임(공용 style.css 는 그대로) */
/* J7 · 머리 줄: 글자를 키운 좁은 화면에서 로고가 먼저 줄어 ☰ 가 화면 안에 남음 */
.navin {
  min-width: 0;
}

.brand {
  flex: 0 1 auto;
  min-width: 0;
}

.brand .brandimg {
  max-width: 100%;
  height: auto;
}

/* J3 · ☰ 메뉴 글 줄 넷 앞 40px 아이콘 칸(모서리 12px · 선 아이콘 22px 굵기 2) · 서비스 소개 ic1 · 업종별 현황 ic2 · 만든 이야기 ic3 · 도움말 ic4 */
@media (max-width: 900px) {
  .nav.open .navlinks a {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav.open .navlinks a::before {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 618-5 2 가: 둥근 배지 */
    background: var(--nd-ic-bg, transparent) var(--nd-ic, none) center / 22px 22px no-repeat;
    content: '';
  }

  .nav.open .navlinks a[href$='product/']::before {
    --nd-ic-bg: #e7eef6;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5c8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
  }

  .nav.open .navlinks a[href$='industry/']::before {
    --nd-ic-bg: #f3e9e1;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d5236' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18v-6M12 18V7M17 18v-9'/%3E%3C/svg%3E");
  }

  .nav.open .navlinks a[href$='open-calc/']::before {
    --nd-ic-bg: #efeaf5;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e4f84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h.01M12 11h.01M16 11h.01M8 15h.01M12 15h.01M16 15h.01'/%3E%3C/svg%3E");
  }

  .nav.open .navlinks a[href$='story/']::before {
    --nd-ic-bg: #e0f0ee;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e6b66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h12v16H6zM6 15h12'/%3E%3C/svg%3E");
  }

  .nav.open .navlinks a[href$='help/']::before {
    --nd-ic-bg: #f5efe0;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e5828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.3M12 17h.01'/%3E%3C/svg%3E");
  }
}

/* 618-4 H · 메뉴확정_261120: 「새로」는 오픈 전 계산기에만 · 지금 있는 곳은 회색 판(style.css aria-current) · 채운 색은 끝 단추 하나 */
.navlinks .navnew {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border: 1px solid #446f58;
  border-radius: 999px;
  color: #446f58;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  vertical-align: 2px;
  white-space: nowrap;
  flex: none;
}

/* 360 · ☰ 안 목록은 오른쪽 시트(머리 바로 아래 · ☰ 는 그대로 보여 닫기) */
@media (max-width: 900px) {
  .nav.open .navlinks {
    top: 100%;
    right: 0;
    left: auto;
    width: min(320px, calc(100% - 40px));
    max-height: 80vh;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    border-radius: 0 0 0 16px;
    box-shadow: -8px 12px 24px rgb(31 61 44 / 12%);
  }
}

/* 618-5 (요한 14:44 2 가): ☰ 를 열면 메뉴 밖을 어둡게 덮음(앱 메뉴와 같은 45%) · 머리 줄과 메뉴는 그대로 밝게 */
@media (max-width: 900px) {
  .nav.open::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgb(17 24 39 / 45%);
    content: '';
  }
}
/* 618-5 (요한 14:44 1 가 · 「숲 배지」): 넓은 화면 머리 메뉴 글 앞에도 같은 둥근 배지(작게 · 26px) */
@media (min-width: 901px) {
  .navlinks a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .navlinks a::before {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--nd-ic-bg, transparent) var(--nd-ic, none) center / 16px 16px no-repeat;
    content: '';
  }
  .navlinks a[href$='product/']::before {
    /* 병원 파랑 */
    --nd-ic-bg: #e7eef6;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5c8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
  }
  .navlinks a[href$='industry/']::before {
    /* 카페 갈색 */
    --nd-ic-bg: #f3e9e1;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d5236' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18v-6M12 18V7M17 18v-9'/%3E%3C/svg%3E");
  }
  .navlinks a[href$='open-calc/']::before {
    /* 미용실 보라 */
    --nd-ic-bg: #efeaf5;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e4f84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h.01M12 11h.01M16 11h.01M8 15h.01M12 15h.01M16 15h.01'/%3E%3C/svg%3E");
  }
  .navlinks a[href$='story/']::before {
    /* 치과 청록 */
    --nd-ic-bg: #e0f0ee;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e6b66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h12v16H6zM6 15h12'/%3E%3C/svg%3E");
  }
  .navlinks a[href$='help/']::before {
    /* 그 외 황토 */
    --nd-ic-bg: #f5efe0;
    --nd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e5828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.3M12 17h.01'/%3E%3C/svg%3E");
  }
}
