@import url("https://atovia.kr/atovia-frontend/assets/lang.css?v=5e4125c39d");
.site-header {
  --atovia-header-ink: #17212b;
  --atovia-header-muted: #6b7882;
  --atovia-header-line: #dbeef7;
  --atovia-header-mint: #5cc7e8;
  --atovia-header-mint-dark: #2a9fc4;
  --atovia-header-rose: #d97ba9;
  --atovia-header-white: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(220, 232, 228, .86);
  color: var(--atovia-header-ink);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: -.015em;
}

/* background + backdrop-filter를 ::before로 분리.
   backdrop-filter를 헤더 자체에 두면 position:fixed인 .primary-nav의
   containing block이 헤더로 바뀌어 모바일 nav가 헤더 높이에
   갇히는 버그가 발생하므로 pseudo-element에서 처리. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.site-header *,
.site-header *::before,
.site-header *::after { box-sizing: border-box; }

.site-header a { color: inherit; text-decoration: none; }
.site-header button { font: inherit; }

.site-header .shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header .header-inner {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  min-height: 78px;
  gap: 32px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.site-header .brand-mark {
  display: block;
  width: 38px;
  height: 38px;
}
.site-header .brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

.site-header .brand-mark i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--atovia-header-mint-dark);
}

.site-header .brand-mark i:nth-child(1) { transform: translate(-7px, 4px); }
.site-header .brand-mark i:nth-child(2) { transform: translate(7px, 4px); background: var(--atovia-header-rose); }
.site-header .brand-mark i:nth-child(3) { transform: translateY(-8px); background: #d7a34c; }

.site-header .brand strong {
  display: block;
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: .08em;
}

.site-header .brand small {
  display: block;
  margin-top: 5px;
  color: var(--atovia-header-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.site-header .primary-nav {
  display: block;
}

.site-header .primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header .primary-menu li { position: relative; list-style: none; }
.site-header .menu-item-row { display: flex; align-items: center; }

.site-header .primary-menu > .menu-item > .menu-item-row > a {
  position: relative;
  padding: 27px 0 24px;
  color: #46545e;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.site-header .primary-menu > .menu-item > .menu-item-row > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  border-radius: 14px;
  background: var(--atovia-header-mint);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.site-header .primary-menu > .menu-item > .menu-item-row > a:hover::after,
.site-header .primary-menu > .menu-item > .menu-item-row > a:focus-visible::after { transform: scaleX(1); }

.site-header .submenu-toggle {
  display: inline-grid;
  width: 24px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  color: #65727b;
  background: transparent;
  cursor: pointer;
}

.site-header .submenu-toggle span { display: block; transition: transform .18s ease; }
.site-header .menu-item-has-children:hover > .menu-item-row > .submenu-toggle span,
.site-header .menu-item-has-children:focus-within > .menu-item-row > .submenu-toggle span,
.site-header .menu-item-has-children[data-submenu-open="true"] > .menu-item-row > .submenu-toggle span { transform: rotate(180deg); }

.site-header .sub-menu {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  z-index: 120;
  display: none;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(220, 232, 228, .95);
  border-radius: 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 55px rgba(20, 74, 66, .16);
}

.site-header .sub-menu-align-end { right: 0; left: auto; }
.site-header .menu-item-has-children:hover > .sub-menu,
.site-header .menu-item-has-children:focus-within > .sub-menu,
.site-header .menu-item-has-children[data-submenu-open="true"] > .sub-menu { display: block; }
.site-header .sub-menu .menu-item-row { justify-content: space-between; }
.site-header .sub-menu a {
  display: block;
  flex: 1;
  padding: 11px 13px;
  border-radius: 14px;
  color: #46545e;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.site-header .sub-menu a:hover,
.site-header .sub-menu a:focus-visible { color: #0f4e4a; background: #edf6f2; }
.site-header .sub-menu .submenu-toggle { width: 30px; height: 38px; }
.site-header .sub-menu .menu-item-has-children > .sub-menu { top: -10px; left: calc(100% + 6px); }
.site-header .sub-menu .menu-item-has-children > .sub-menu::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  width: 10px;
  height: 100%;
}

.site-header .header-account {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  justify-self: end !important;
}


.site-header .header-account-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 17px !important;
  border-radius: 20px !important;
  color: var(--atovia-header-white) !important;
  background: linear-gradient(135deg, var(--atovia-header-mint-dark) 0%, #17758f 100%) !important;
  border: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: opacity .15s;
}
.site-header .header-account-link:hover { opacity: .88; }
.site-header .header-account-link-2 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 20px !important;
  color: var(--atovia-header-ink) !important;
  background: transparent !important;
  border: 1.5px solid var(--atovia-header-line, rgba(0,0,0,.15)) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: background .15s;
}
.site-header .header-account-link-2:hover { background: rgba(0,0,0,.05) !important; }

.site-header .menu-button { display: none; }

.site-header .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.nav-open { overflow: hidden; }

@media (max-width: 1080px) {
  .site-header .header-inner { gap: 20px; }
}

@media (max-width: 860px) {
  .site-header .shell { width: min(100% - 32px, 1180px); }
  .site-header .header-inner { grid-template-columns: 1fr auto auto; min-height: 70px; }
  .site-header .menu-button {
    order: 3;
    display: inline-flex;
    width: 43px;
    height: 43px;
    /* ★ padding·box-sizing 을 반드시 우리가 정한다.
       워드프레스 테마(Astra)가 `button` 에 padding-left/right: 24px 를 건다.
       우리는 width 만 정하고 padding 을 안 정해서 그 값이 그대로 새어 들어왔고,
       마이월드에서만 햄버거가 50px 이 되어 헤더 전체가 12px 밀렸다.
       (2026-08-24: 다른 9개 사이트는 햄버거 x=344, 마이월드만 332) */
    padding: 0;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--atovia-header-line);
    border-radius: 14px;
    background: var(--atovia-header-white);
  }
  .site-header .menu-button i { width: 18px; height: 2px; border-radius: 14px; background: var(--atovia-header-ink); transition: transform .2s ease, opacity .2s ease; }
  .site-header .menu-button[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
  .site-header .menu-button[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
  .site-header .menu-button[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .primary-nav {
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;
    z-index: 999;
    display: none;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    padding: 26px 24px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(247, 251, 249, .98);
    backdrop-filter: blur(18px);
  }
  .site-header .primary-nav[data-open="true"] { display: block; }
  .site-header .primary-menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-header .primary-menu > .menu-item { border-bottom: 1px solid var(--atovia-header-line); }
  .site-header .primary-menu > .menu-item > .menu-item-row > a { flex: 1; padding: 18px 4px; font-size: 19px; }
  .site-header .primary-menu > .menu-item > .menu-item-row > a::after { display: none; }
  .site-header .primary-menu > .menu-item > .menu-item-row > .submenu-toggle { width: 46px; height: 52px; font-size: 19px; }
  .site-header .sub-menu,
  .site-header .sub-menu .menu-item-has-children > .sub-menu {
    position: static;
    min-width: 0;
    margin: 0 0 10px 12px;
    padding: 6px;
    border: 0;
    border-left: 2px solid var(--atovia-header-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .site-header .sub-menu a { padding: 12px 10px; font-size: 16px; white-space: normal; }
  .site-header .sub-menu .submenu-toggle { width: 42px; height: 42px; font-size: 19px; }
  .site-header .menu-item-has-children:hover > .sub-menu,
  .site-header .menu-item-has-children:focus-within > .sub-menu { display: none; }
  .site-header .menu-item-has-children[data-submenu-open="true"] > .sub-menu { display: block; }
  .site-header .header-account { justify-self: end; }
  .site-header .header-account-link { min-height: 40px; }
}

@media (max-width: 620px) {
  .site-header { font-size: 16px; }
  .site-header .shell { width: min(100% - 24px, 1180px); }
  .site-header .brand small { display: none; }
  .site-header .brand strong { font-size: 16px; }
  .site-header .brand-mark { width: 34px; height: 34px; }
  .site-header .header-account-link { min-height: 38px; padding-inline: 13px; font-size: 13px; }
}

/* ── 좁은 화면에서 헤더가 넘치던 문제 ─────────────────────────────
   우측에 언어 버튼이 하나 더 붙으면서 로고+언어+테마+회원가입+로그인이
   390px 안에 들어가지 못했다. 실측하면 68~91px 이 화면 밖으로 나갔고,
   그 바람에 햄버거 버튼이 left=415(화면 390) 로 밀려나 눌리지 않았다.
   "커뮤니티에서 모바일 메뉴가 안 눌린다"는 것이 이 증상이다.

   가로로 넘치지 않게 만드는 것이 메뉴 버튼을 되살리는 일과 같다.
   좁은 화면에서는 회원가입을 접는다. 로그인 안에서 가입으로 갈 수 있다. */
@media (max-width: 860px) {
  .site-header .header-inner { min-width: 0; }
  .site-header .header-account { gap: 8px; min-width: 0; flex-wrap: nowrap; }
  /* 회원가입을 숨기지 않는다. 좁은 화면이라고 가입 버튼이 사라지면
     처음 온 사람이 가입할 자리를 잃는다. 대신 글자와 여백을 줄인다. */
  .site-header .header-account-link-2 {
    padding-inline: 9px; font-size: 13px; min-height: 34px; white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .site-header .shell { width: min(100% - 16px, 1180px); }
  .site-header .header-account { gap: 6px; }
  .site-header .header-account-link { min-height: 34px; padding-inline: 10px; font-size: 13px; }
  .site-header .header-lang-btn,
  .site-header .header-theme-toggle { width: 34px; height: 34px; }
  .site-header .menu-button { width: 38px; height: 38px; }
}

/* 헤더가 어떤 이유로든 넘쳐도 페이지 전체가 좌우로 밀리지는 않게 한다.
   페이지가 통째로 흔들리는 것보다 헤더 안에서 줄어드는 편이 낫다.

   ★ hidden 이 아니라 clip 이다 (2026-09-02 대표님 실측)
     "모바일에서는 스크롤하니까 메뉴까지 같이 없어지더라고"

     overflow-x:hidden 은 한 축만 감추는 것처럼 보이지만, 실제로는
     그 칸을 **스크롤 상자로 만든다.** 스크롤 상자가 되는 순간 그 안의
     position:sticky 는 화면이 아니라 그 상자에 붙으므로, 화면 기준으로는
     그냥 같이 흘러가 버린다. 좁은 화면에서만 이 규칙이 걸려 있었으니
     넓은 화면에서는 멀쩡하고 모바일에서만 최상단 메뉴와 서브메뉴가
     함께 사라졌던 것이다.

     clip 은 넘치는 것을 자르되 스크롤 상자를 만들지 않는다. 좌우로
     밀리지 않게 막는 본래 목적은 그대로 지키면서 sticky 를 살린다.
     hidden 줄을 앞에 남겨 두는 것은 clip 을 모르는 옛 브라우저 몫이다. */
@media (max-width: 860px) {
  html, body {
    overflow-x: hidden;
    overflow-x: clip;
  }
}


/* ══════════════════════════════════════════════════════════════
   다크 모드 — OS 설정을 따른다.
   이 파일은 색이 일부 하드코딩(#46545e·#65727b·#edf6f2)이라
   토큰만 뒤집어서는 어두운 배경에서 글자가 묻힌다. 명시적으로 잡는다.
   backdrop-filter 는 규칙대로 ::before 에만 둔다 (직접 적용 금지).
   2026-08-22 추가.
   ══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  html:not(.atv-light) .site-header { --atovia-header-ink: #e9eff2;
    --atovia-header-muted: #9fb0bb;
    --atovia-header-line: #22333d;
    /* --atovia-header-white 는 뒤집지 않는다. 로그인 링크의 흰 글자로 쓰인다.
       배경으로 쓰는 .menu-button 만 아래에서 따로 지정한다. */
    --atovia-header-white: #fff;
    border-bottom-color: rgba(34, 51, 61, .9); }
  html:not(.atv-light) .site-header::before { background: rgba(13, 25, 31, .92); }
  html:not(.atv-light) .site-header .primary-menu > .menu-item > .menu-item-row > a { color: #cdd9e0; }
  html:not(.atv-light) .site-header .submenu-toggle { color: #9fb0bb; }
  html:not(.atv-light) .site-header .sub-menu { background: #152229;
    border-color: #22333d;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .55); }
  html:not(.atv-light) .site-header .sub-menu a { color: #cdd9e0; }
  html:not(.atv-light) .site-header .sub-menu a:hover, html:not(.atv-light) .site-header .sub-menu a:focus-visible { color: #7fe0cf; background: #1b2f38; }
  html:not(.atv-light) .site-header .primary-nav { background: #0f1a20; }
  html:not(.atv-light) .site-header .menu-button { background: #152229; }
}


/* ── 테마 토글 버튼 (크기 고정) ─────────────────────────────────
   Astra 등 테마가 button 에 padding/min-width 를 주면 원형이 찌그러진다.
   flex 축소까지 막아 어디서나 같은 크기로 보이게 한다. */
.site-header .header-theme-toggle,
.header-theme-toggle{
  box-sizing:border-box;
  display:inline-grid;place-items:center;
  width:38px;min-width:38px;max-width:38px;
  height:38px;min-height:38px;
  flex:0 0 38px;
  padding:0;margin-right:8px;
  border:1px solid var(--atovia-header-line,var(--line,#dbeef7));
  border-radius:50%;
  background:transparent;
  color:var(--atovia-header-muted,var(--muted,#6b7882));
  font-size:16px;line-height:1;cursor:pointer;
  transition:background .18s,color .18s,border-color .18s;
}
.site-header .header-theme-toggle:hover,
.header-theme-toggle:hover{
  color:var(--atovia-header-mint,var(--mint,#5cc7e8));
  border-color:var(--atovia-header-mint,var(--mint,#5cc7e8));
  background:rgba(59,170,152,.10);
}
.header-theme-toggle:focus-visible{
  outline:2px solid var(--atovia-header-mint,var(--mint,#5cc7e8));outline-offset:2px;
}
.header-theme-icon{font-weight:700;letter-spacing:0;}
@media (max-width:600px){
  .site-header .header-theme-toggle,
  .header-theme-toggle{width:34px;min-width:34px;max-width:34px;height:34px;flex:0 0 34px;margin-right:4px;}
}

/* ATV-THEME-TOGGLE */
/* 수동 토글(html.atv-dark) — 위 미디어 블록과 같은 내용이며
   make_theme_toggle.py 가 자동 생성한다. 직접 고치지 말 것. */
html.atv-dark .site-header { --atovia-header-ink: #e9eff2;
    --atovia-header-muted: #9fb0bb;
    --atovia-header-line: #22333d;
    /* --atovia-header-white 는 뒤집지 않는다. 로그인 링크의 흰 글자로 쓰인다.
       배경으로 쓰는 .menu-button 만 아래에서 따로 지정한다. */
    --atovia-header-white: #fff;
    border-bottom-color: rgba(34, 51, 61, .9); }
html.atv-dark .site-header::before { background: rgba(13, 25, 31, .92); }
html.atv-dark .site-header .primary-menu > .menu-item > .menu-item-row > a { color: #cdd9e0; }
html.atv-dark .site-header .submenu-toggle { color: #9fb0bb; }
html.atv-dark .site-header .sub-menu { background: #152229;
    border-color: #22333d;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .55); }
html.atv-dark .site-header .sub-menu a { color: #cdd9e0; }
html.atv-dark .site-header .sub-menu a:hover, html.atv-dark .site-header .sub-menu a:focus-visible { color: #7fe0cf; background: #1b2f38; }
html.atv-dark .site-header .primary-nav { background: #0f1a20; }
html.atv-dark .site-header .menu-button { background: #152229; }

/* ── 태블릿 가로 구간(861~959px) ────────────────────────────────
   이 구간만 데스크톱 배치인데 폭이 모자라 헤더가 화면 밖으로 나갔다.
   실측: 900px 에서 scrollWidth 951 (넘침 51px). 간격과 버튼을 줄여 넣는다.
   모바일 접힘 기준(860px)은 사이트 전체가 공유하므로 건드리지 않는다.   */
@media (min-width: 861px) and (max-width: 959px) {
  .site-header .shell { width: min(100% - 24px, 1180px); }
  .site-header .header-inner { gap: 14px; }
  .site-header .primary-menu { gap: 14px; }
  .site-header .primary-menu > .menu-item > .menu-item-row > a { font-size: 13px; }
  .site-header .header-account { gap: 6px !important; }
  .site-header .header-account-link {
    min-height: 38px !important; padding: 0 12px !important; font-size: 13px !important;
  }
  .site-header .header-account-link-2 {
    min-height: 38px !important; padding: 0 10px !important; font-size: 13px !important;
  }
}

/* 메뉴 안으로 옮겨진 언어·테마 토글 (좁은 화면) */
.site-header .nav-tray {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 0 0 16px;
  border-bottom: 1px solid var(--atovia-header-line);
}
.site-header .nav-tray .header-lang { position: relative; }
.site-header .nav-tray .header-lang-menu {
  top: calc(100% + 8px); right: auto; left: 0;
  max-height: 52vh; overflow-y: auto;
}

/* ── 계정 버튼 규격 (2026-08-24 통일) ─────────────────────────
   본진은 app.css, 서브도메인은 이 파일에서 서식을 읽는다. 두 벌이라
   같은 버튼인데 높이와 글자 위치가 조금씩 달라 보였다. 한 벌로 맞춘다.
   줄높이를 1 로 고정하는 이유 — 한글은 기본 줄높이에서 시각적으로 아래로 처진다. */
.site-header .header-account {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.site-header .header-account-link,
.site-header .header-account-link-2 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  letter-spacing: -.01em !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.site-header .header-lang-btn,
.site-header .header-theme-toggle {
  height: 38px !important;
  min-height: 38px !important;
  align-self: center !important;
}

/* 좁은 화면에서는 계정 버튼을 줄인다. 위 통일 규칙이 !important 라
   같은 무게로 덮어야 한다 — 안 그러면 로고와 겹친다. */
@media (max-width: 620px) {
  .site-header .header-account { gap: 6px !important; }
  .site-header .header-account-link,
  .site-header .header-account-link-2 {
    height: 36px !important; min-height: 36px !important;
    padding: 0 12px !important; font-size: 13px !important;
  }
}
@media (max-width: 400px) {
  .site-header .header-account-link,
  .site-header .header-account-link-2 {
    height: 34px !important; min-height: 34px !important;
    padding: 0 10px !important; font-size: 13px !important;
  }
}

/* 헤더 오른쪽 정렬 — 격자 칸 폭이 사이트마다 달라도 끝에 붙는다.
   실측: 3번째 칸이 atovia.kr 38px / 서브도메인 95px 이라
   버튼이 칸 왼쪽에 붙어 오른쪽에 57px 이 비었다. */
.site-header .menu-button { justify-self: end !important; }
.site-header .header-account { justify-self: end !important; }

/* ── 좁은 화면 헤더는 한 줄로 놓는다 (2026-08-24) ──────────────
   격자로는 로고 폭 차이(사이트마다 브랜드 부제가 다르다) 때문에
   칸 배치가 달라져 계정과 햄버거 사이가 벌어졌다(실측 77px).
   한 줄로 놓고 가운데를 밀면 로고가 얼마든 오른쪽은 늘 붙는다. */
@media (max-width: 860px) {
  .site-header .header-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .site-header .brand { margin-right: auto; }        /* 가운데를 밀어낸다 */
  .site-header .header-account { margin-left: 0; }
  /* 순서: 로고 · (밀어냄) · 계정 · 햄버거. 햄버거가 맨 오른쪽이다. */
  .site-header .header-account { order: 8; }
  .site-header .menu-button { order: 9 !important; }
  .site-header .primary-nav { order: 10; }
}
