:root { --ivory: #f5edd6; --ivory-2: #e6dfcf; }
/* ═════════════════════════════════════════════════════════
   공통 헤더 (site-ui.js)  — 고정·불투명, 핵심 메뉴 5 + 더보기, 언어 드롭다운, CTA
═════════════════════════════════════════════════════════ */
:root { --hdr-h: 72px; }
body.mh-ready { padding-top: var(--hdr-h) !important; }
/* JS 교체 전 깜빡임 방지(+ JS 실패 시 1.5초 뒤 기존 헤더 복구) */
html[lang="ko"] body:not(.mh-ready) .site-header,
html[lang="ko"] body:not(.mh-ready) #lang-bar,
html[lang="ko"] body:not(.mh-ready) > nav:not(.site-breadcrumb) { animation: mhFallback 0s 1.5s forwards; visibility: hidden; }
@keyframes mhFallback { to { visibility: visible; } }

.mh {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100000;
  background: rgba(11,9,20,0.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
  font-family: 'Noto Sans KR', sans-serif;
}
.mh, .mh * { box-sizing: border-box; }
.mh { --gold: #c9a84c; --gold-light: #e8c97a; --ivory: #f5edd6; }
.mh-inner {
  max-width: 1360px; margin: 0 auto; height: 72px; padding: 0 28px;
  display: flex; align-items: center; gap: 28px;
}
.mh-logo {
  display: flex; align-items: baseline; gap: 10px; text-decoration: none; flex: none;
  font-family: 'Cinzel', 'Noto Serif KR', serif; font-size: 22px; letter-spacing: 0.14em; color: #fff; font-weight: 600;
}
.mh-logo span { font-family: 'Noto Serif KR', serif; font-size: 16px; letter-spacing: 0.05em; color: var(--gold-light); font-weight: 400; }
.mh-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.mh-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  color: var(--ivory); font: 500 16px/1 'Noto Sans KR', sans-serif; text-decoration: none; letter-spacing: 0.01em;
  transition: background .15s, color .15s;
}
.mh-link:hover { background: rgba(201,168,76,0.14); color: #fff; }
.mh-link:active { background: rgba(201,168,76,0.24); }
.mh-link.is-active { color: #fff; font-weight: 700; }
.mh-link.is-active::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--gold); }
.mh-lang { position: relative; }
.mh-inner { position: relative; }
.mh-more-btn i, .mh-lang-btn i {
  width: 7px; height: 7px; border-right: 2px solid var(--gold-light); border-bottom: 2px solid var(--gold-light);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.mh-more-btn[aria-expanded="true"] i, .mh-lang-btn[aria-expanded="true"] i { transform: rotate(-135deg) translateY(-1px); }
.mh-more-btn[aria-expanded="true"] { background: rgba(201,168,76,0.18); color: #fff; }

.mh-panel {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(920px, calc(100% - 56px)); padding: 24px 26px;
  display: grid; grid-template-columns: 1fr 1.05fr 1.35fr 1.1fr 0.9fr; gap: 8px 22px;
  background: #171330; border: 1px solid rgba(201,168,76,0.5); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.mh-panel[hidden], .mh-lang-list[hidden], .mh-drawer[hidden] { display: none; }
.mh-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mh-col-t { font-size: 14px; font-weight: 700; color: var(--gold-light); margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(201,168,76,0.3); }
.mh-col a { padding: 7px 10px; margin: 0 -10px; border-radius: 8px; font-size: 15px; line-height: 1.35; color: var(--ivory); text-decoration: none; }
.mh-col a:hover { background: rgba(201,168,76,0.16); color: #fff; }
.mh-col a.is-active { color: var(--gold-light); font-weight: 700; }

.mh-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mh-lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; cursor: pointer;
  border: 1px solid rgba(201,168,76,0.45); border-radius: 10px; background: rgba(255,255,255,0.05);
  color: #fff; font: 500 15px/1 'Noto Sans KR', sans-serif;
}
.mh-lang-btn:hover { background: rgba(201,168,76,0.16); border-color: var(--gold); }
.mh-lang-list {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 160px; padding: 8px;
  background: #171330; border: 1px solid rgba(201,168,76,0.5); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,0.6);
}
.mh-lang-list a { display: block; padding: 11px 14px; border-radius: 8px; color: var(--ivory); text-decoration: none; font-size: 15px; }
.mh-lang-list a:hover { background: rgba(201,168,76,0.16); color: #fff; }
.mh-lang-list a[aria-current] { color: var(--gold-light); font-weight: 700; }

.mh-cta {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px;
  border-radius: 12px; background: var(--gold); color: #14101f; text-decoration: none;
  font: 700 16px/1 'Noto Sans KR', sans-serif; letter-spacing: 0.01em; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3); transition: background .15s, transform .15s, box-shadow .15s;
}
.mh-cta:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(201,168,76,0.42); }
.mh-cta:active { background: #b8973f; transform: translateY(1px); box-shadow: none; }
.mh-cta-short { display: none; }
.mh-actions .auth-widget { position: static; }
.mh-actions .auth-widget-login, .mh-actions .auth-widget-logout { height: 42px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.mh-actions .auth-widget-profile { font-size: 15px; }

.mh-burger { display: none; width: 46px; height: 46px; border: 1px solid rgba(201,168,76,0.5); border-radius: 12px; background: rgba(255,255,255,0.05); cursor: pointer; padding: 0; position: relative; }
.mh-burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s, top .2s; }
.mh-burger span:nth-child(1) { top: 15px; } .mh-burger span:nth-child(2) { top: 22px; } .mh-burger span:nth-child(3) { top: 29px; }
.mh.is-open .mh-burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.mh.is-open .mh-burger span:nth-child(2) { opacity: 0; }
.mh.is-open .mh-burger span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

.mh-drawer { position: fixed; left: 0; right: 0; top: var(--hdr-h); height: calc(100vh - var(--hdr-h)); height: calc(100dvh - var(--hdr-h)); overflow-y: auto; padding: 14px 20px 40px; background: #0f0c1c; }
.mh-d-core { display: flex; flex-direction: column; }
.mh-d-link { display: flex; align-items: center; min-height: 56px; padding: 0 6px; font-size: 19px; font-weight: 600; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(201,168,76,0.18); }
.mh-d-link.is-active { color: var(--gold-light); }
.mh-d-link:active { background: rgba(201,168,76,0.14); }
.mh-d-group { border-bottom: 1px solid rgba(201,168,76,0.18); }
.mh-d-group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 6px; font-size: 17px; color: var(--ivory); cursor: pointer; }
.mh-d-group summary::-webkit-details-marker { display: none; }
.mh-d-group summary::after { content: '+'; font-size: 24px; color: var(--gold-light); }
.mh-d-group[open] summary::after { content: '–'; }
.mh-d-group div { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 0 14px; }
.mh-d-group div a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,0.05); font-size: 16px; color: var(--ivory); text-decoration: none; }
.mh-d-lang { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.mh-d-lang a { min-height: 46px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid rgba(201,168,76,0.45); border-radius: 10px; color: #fff; text-decoration: none; font-size: 15px; }
.mh-d-lang a[aria-current] { background: var(--gold); color: #14101f; font-weight: 700; }
body.mh-lock { overflow: hidden; }

@media (max-width: 1180px) { .mh-inner { gap: 16px; padding: 0 20px; } .mh-link { padding: 10px 11px; } .mh-logo span { display: none; } }
@media (max-width: 960px) {
  :root { --hdr-h: 64px; }
  .mh-inner { height: 64px; }
  .mh-nav, .mh-lang { display: none; }
  .mh-burger { display: block; }
  .mh-logo { font-size: 20px; }
  .mh-logo span { display: inline; font-size: 15px; }
  .mh-cta { height: 44px; padding: 0 16px; font-size: 15px; }
  .mh-cta-long { display: none; } .mh-cta-short { display: inline; }
  .mh-actions .auth-widget { display: none; }
}
@media (max-width: 400px) { .mh-logo span { display: none; } }
.mh-d-login { width: 100%; min-height: 54px; margin-top: 22px; border: 0; border-radius: 12px; background: #fee500; color: #191919; font: 700 16px/1 'Noto Sans KR', sans-serif; cursor: pointer; }
.mh-d-login:active { filter: brightness(0.92); }

.auth-widget {
  position: fixed; top: 14px; right: 14px; z-index: 999;
  display: flex; align-items: center; gap: 8px;
}
.auth-widget-login,
.auth-widget-logout,
.auth-widget-profile {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,0.35);
  background: rgba(20,16,26,0.85);
  backdrop-filter: blur(6px);
  color: var(--gold-light, #e8c97a);
  white-space: nowrap;
}
.auth-widget-login,
.auth-widget-logout {
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.auth-widget-login:hover,
.auth-widget-logout:hover {
  border-color: var(--gold, #c9a84c);
  background: rgba(26,20,34,0.95);
}
.auth-widget-profile {
  display: flex; align-items: center; gap: 6px;
}
.auth-widget-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
}

/* 큰 모니터: 화면이 커도 콘텐츠가 작아 보이지 않도록 전체 배율 상향 */
@media (min-width: 1800px) { html { zoom: 1.15; } }
@media (min-width: 2300px) { html { zoom: 1.35; } }
/* 헤더 안 로그인: 주요 CTA(금색 채움)와 구분되는 보조 버튼 */
.mh-actions .auth-widget-login { background: transparent; border: 1px solid rgba(201,168,76,0.6); color: #fff; font-weight: 600; }
.mh-actions .auth-widget-login:hover { background: rgba(201,168,76,0.16); border-color: var(--gold-light); }
.mh-panel { max-height: calc(100vh - 110px); overflow-y: auto; }
.mh-col a { padding: 5px 10px; font-size: 14.5px; }

/* 커스텀 마우스 커서 제거: 큰 화면 배율(zoom)·고해상도에서 위치가 어긋나 실제 커서가 사라진 것처럼 보이던 문제 → 기본 커서 복원 */
#cursor, #cursor-ring { display: none !important; }
html body, html body * { cursor: auto !important; }
html body a[href], html body button, html body summary, html body select, html body label[for],
html body [role="button"], html body input[type="submit"], html body input[type="checkbox"], html body input[type="radio"],
html body .cat-chip, html body .gender-btn, html body .submit-btn, html body .seo-acc-btn,
html body .feat-card, html body .more-card, html body .hero-btn, html body .mh-link, html body .mh-cta,
html body .mh-lang-btn, html body .mh-burger, html body .lang-btn { cursor: pointer !important; }
html body input[type="text"], html body input[type="number"], html body textarea { cursor: text !important; }
html body :disabled { cursor: not-allowed !important; }

/* 로그인 상태 표시: 헤더 아바타 / 로그인 버튼 / 메뉴 상단 계정 영역 */
.mh-me { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); overflow: hidden; text-decoration: none; background: #2a2350; flex: none; }
.mh-me[hidden], .mh-login[hidden], .mh-d-account[hidden], .mh-d-login[hidden] { display: none; }
.mh-av { width: 100%; height: 100%; object-fit: cover; display: block; }
.mh-av-text { display: grid; place-items: center; color: #fff; font: 700 18px/1 'Noto Sans KR', sans-serif; }
.mh-login { height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(201,168,76,0.6); background: transparent; color: #fff; font: 600 15px/1 'Noto Sans KR', sans-serif; cursor: pointer; }
.mh-login:hover { background: rgba(201,168,76,0.16); border-color: var(--gold-light); }
/* 데스크톱: 로그인 위젯(auth-widget)이 헤더에 있으면 중복 표시 안 함 */
@media (min-width: 961px) { .mh-actions:has(.auth-widget) .mh-me, .mh-actions:has(.auth-widget) .mh-login { display: none; } }
@media (max-width: 960px) { .mh-login { display: none; } }
.mh-d-account { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 6px; border: 1.5px solid rgba(201,168,76,0.5); border-radius: 14px; background: rgba(201,168,76,0.08); }
.mh-d-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-height: 52px; }
.mh-d-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); }
.mh-d-av.mh-av-text { background: #2a2350; font-size: 20px; }
.mh-d-me-info { display: flex; flex-direction: column; min-width: 0; }
.mh-d-me-info b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-d-me-info small { font-size: 14px; color: var(--gold-light); }
.mh-d-logout { flex: none; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.35); background: transparent; color: #fff; font: 500 14.5px 'Noto Sans KR', sans-serif; cursor: pointer; }
@media (max-width: 400px) { .mh-logo { font-size: 18px; } .mh-inner { gap: 10px; padding: 0 14px; } .mh-actions { gap: 8px; } .mh-cta { padding: 0 12px; } }

/* 로그인 완료 안내 토스트 */
.mh-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300000; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 14px; background: #1f6b3a; color: #fff; font: 600 15.5px/1.4 'Noto Sans KR', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: opacity .5s, transform .5s; text-align: center; }
.mh-toast.out { opacity: 0; transform: translateX(-50%) translateY(12px); }
