/* =====================================================================
   공통 헤더 — 메인(스탠드얼론 v2)과 서브(buly 스킨) 가 함께 쓴다.
   ---------------------------------------------------------------------
   이 파일이 헤더의 유일한 정의다. main-v2.css / sub-v2.css / buly 스킨에
   헤더 규칙을 다시 넣지 말 것 — 두 벌로 갈라져 있던 것을 합친 결과다.

   클래스는 전부 `lu-` 접두사다. buly 스킨의 .nav/.top_menu/.lnb/.api_key 를
   물려받지 않으려고 새 이름을 썼다 — 스킨 css 를 건드리지 않아도 충돌이 없다.

   토큰을 자체 정의하므로 main-v2.css 없이도(=서브 페이지) 그대로 동작한다.
   ===================================================================== */

.lu-header {
    --lu-ink: #1a1717;
    --lu-ink2: #222;
    --lu-muted: #9999a3;
    --lu-body: #3d3d3d;
    --lu-red: #ec3c3c;
    --lu-red-hover: #d83434;
    --lu-red-deep: #d32222;
    --lu-pink: #feecec;
    --lu-pink-line: #f7a1a1;
    --lu-line: #f3e7e7;
    --lu-h: 78px;
}

/* ------------------------------------------------------------ 헤더 밴드 */
/* buly 스킨의 `header{position:absolute}` 를 덮어써야 하므로 값을 모두 명시한다. */
.lu-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: var(--lu-h);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
.lu-header-in {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--lu-h);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.lu-header a { text-decoration: none; }

.lu-logo { display: block; line-height: 0; }
.lu-logo img { width: 98px; height: auto; display: block; }

/* 메뉴 5종 — 가운데 고정 */
.lu-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 48px;
}
.lu-nav a {
    padding: 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lu-ink2);
    letter-spacing: -0.3px;
    line-height: 1.48;
    white-space: nowrap;
}
.lu-nav a:hover { color: var(--lu-red); }
.lu-nav a.on { color: var(--lu-red); }

/* 우측 계정 영역 */
.lu-auth {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 28px;
}
.lu-auth > a {
    font-size: 15px;
    font-weight: 600;
    color: var(--lu-ink2);
    letter-spacing: -0.3px;
    white-space: nowrap;
}
.lu-auth > a:hover { color: var(--lu-red); }

/* API KEY 발급 — 패널을 여는 기능 버튼. 메인의 칩 어휘를 쓴다. */
.lu-apikey {
    padding: 7px 14px;
    border: 1px solid var(--lu-pink-line);
    border-radius: 999px;
    background: #fff;
    color: var(--lu-red);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.13px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lu-apikey:hover,
.lu-apikey[aria-expanded="true"] {
    background: var(--lu-red);
    border-color: var(--lu-red);
    color: #fff;
}

/* ═══════════════════════ Access Key 팝업 ═══════════════════════ */
.lu-keypanel {
    position: absolute;
    right: 24px;
    top: calc(100% - 8px);
    z-index: 60;
    width: min(600px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--lu-line);
    border-radius: 20px;
    box-shadow: 0 20px 44px -18px rgba(212, 33, 33, 0.3), 0 2px 6px rgba(30, 20, 20, 0.05);
    padding: 22px 24px 24px;
    color: var(--lu-body);
}
.lu-keypanel[hidden] { display: none; }

.lu-keypanel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.lu-keypanel-top b {
    font-size: 20px;
    font-weight: 700;
    color: var(--lu-ink);
    letter-spacing: -0.4px;
}
.lu-keypanel-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--lu-muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.lu-keypanel-close:hover { background: var(--lu-pink); color: var(--lu-red-deep); }
.lu-keypanel-close svg { width: 16px; height: 16px; }

/* 키 입력 + 복사 — 검은 버튼(#444)을 메인 레드로 */
.lu-keyrow { display: flex; gap: 10px; }
.lu-keyrow input {
    flex: 1 1 auto;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--lu-line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--lu-ink);
    letter-spacing: -0.15px;
}
.lu-keyrow input::placeholder { color: var(--lu-muted); }
.lu-keyrow input:focus { outline: none; border-color: var(--lu-pink-line); }
.lu-keyrow button {
    flex: 0 0 96px;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--lu-red);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.15px;
    cursor: pointer;
    transition: background .15s ease;
}
.lu-keyrow button:hover { background: var(--lu-red-hover); }

/* 엔드포인트 줄 */
.lu-keyep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--lu-ink);
    word-break: break-all;
}
.lu-keyep .m {
    flex: none;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--lu-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* 규격 표 */
.lu-keydoc { margin-top: 18px; }
.lu-keydoc h4 {
    margin: 18px 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--lu-ink);
    letter-spacing: -0.32px;
}
.lu-keydoc h4:first-child { margin-top: 0; }
.lu-keydoc-scroll { overflow-x: auto; }
.lu-keydoc table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    border-top: 1px solid var(--lu-ink);
}
.lu-keydoc th {
    padding: 9px 10px;
    text-align: left;
    border-bottom: 1px solid var(--lu-line);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--lu-body);
    white-space: nowrap;
}
.lu-keydoc td {
    padding: 9px 10px;
    border-bottom: 1px solid #f4f0f0;
    font-size: 13px;
    color: var(--lu-body);
    vertical-align: middle;
}
.lu-keydoc tr:last-child td { border-bottom: 0; }

/* 타입·필수 배지 — 파랑(#6076e7)·회색(#999) 솔리드를 레드 계열로 통일 */
.lu-keydoc .b {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.12px;
    white-space: nowrap;
}
.lu-keydoc .b-need { background: var(--lu-red); color: #fff; }
.lu-keydoc .b-str  { background: #f2efef; color: #6e6363; }
.lu-keydoc .b-bool { background: var(--lu-pink); color: var(--lu-red-deep); }

/* ------------------------------------------------------------- 신고하기 */
.lu-report {
    position: absolute;
    right: 24px;
    top: calc(100% + 22px);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--lu-muted);
    font-size: 14px;
    letter-spacing: -0.14px;
    transition: color .15s ease, border-color .15s ease;
}
.lu-report:hover { color: var(--lu-red); border-color: var(--lu-pink-line); }
.lu-report svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 햄버거 */
.lu-burger {
    display: none;
    width: 24px;
    height: 18px;
    margin-right: 14px;
    padding: 0;
    position: relative;
    border: 0;
    background: none;
    cursor: pointer;
}
.lu-burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: var(--lu-ink2);
}
.lu-burger span:nth-child(1) { top: 0; }
.lu-burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.lu-burger span:nth-child(3) { bottom: 0; }

/* -------------------------------------------------- 모바일 사이드 메뉴 */
.lu-side { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.lu-side.on { visibility: visible; }
.lu-side-bg {
    position: absolute;
    inset: 0;
    background: rgba(26, 23, 23, 0.5);
    opacity: 0;
    transition: opacity .3s ease;
}
.lu-side.on .lu-side-bg { opacity: 1; }
.lu-side-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 264px;
    max-width: 82vw;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
.lu-side.on .lu-side-panel { transform: none; }
.lu-side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lu-line, #f3e7e7);
}
.lu-side-top img { width: 84px; height: auto; display: block; }
.lu-side-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; background: none;
    color: #9999a3; cursor: pointer;
}
.lu-side-close:hover { background: #feecec; color: #d32222; }
.lu-side-close svg { width: 16px; height: 16px; }
.lu-side-menu { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1 1 auto; }
.lu-side-menu a {
    display: block;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    letter-spacing: -0.3px;
    text-decoration: none;
}
.lu-side-menu a:hover { background: #fdf6f6; color: #ec3c3c; }
.lu-side-menu li.on a { color: #ec3c3c; font-weight: 700; }
.lu-side-menu li.sep { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f3e7e7; }
.lu-side-foot { padding: 16px 20px; border-top: 1px solid #f3e7e7; }
.lu-side-foot a {
    display: block;
    padding: 11px 0;
    border: 1px solid #f7a1a1;
    border-radius: 999px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #ec3c3c;
    text-decoration: none;
}
.lu-side-foot a:hover { background: #ec3c3c; color: #fff; }

/* -------------------------------------------------------------- 반응형 */
@media (max-width: 1240px) {
    .lu-nav { gap: 26px; }
    .lu-auth { gap: 18px; }
}
@media (max-width: 1040px) {
    .lu-nav { display: none; }
    .lu-burger { display: block; }
    .lu-header-in { padding: 0 16px; }
    .lu-keypanel { right: 16px; }
    .lu-report { right: 16px; }
}
@media (max-width: 560px) {
    .lu-header { --lu-h: 62px; }
    .lu-logo img { width: 84px; }
    .lu-auth { gap: 12px; }
    .lu-auth > a { font-size: 14px; }
    .lu-keypanel { padding: 18px 16px 20px; border-radius: 16px; }
    .lu-keyrow { flex-wrap: wrap; }
    .lu-keyrow button { flex: 1 1 100%; }
}
