/* ==========================================================================
   늑대닷컴 최신 주소 안내 — 다크 문라이트 스킨
   모든 규칙은 #bm-root 로 스코프. 빌더 테마와 특이도 싸움에서 이기므로
   !important 를 쓰지 않습니다. (v1은 !important 170개 이상이었음)
   ========================================================================== */

/* ---------- 0. 문서 여백 초기화 ---------- */
/* 브라우저 기본 body margin(8px) 탓에 상하좌우에 흰 여백이 비치는 문제 해결 */
html, body {
    margin: 0;
    padding: 0;
    background: #0b0f14;
}

/* ---------- 1. 토큰 ---------- */
#bm-root {
    /* 색상 — 사이트마다 이 6줄만 바꾸면 톤이 완전히 달라집니다 */
    --c-bg:        #0b0f14;   /* 베이스 배경 */
    --c-bg-alt:    #111722;   /* 교차 섹션 배경 */
    --c-panel:     #16202e91; /* 카드/패널 */
    --c-line:      #26334a;   /* 경계선 */
    --c-primary:   #5aa9ff;   /* 아이스 블루 */
    --c-accent:    #8f7bff;   /* 바이올렛 */
    --c-cyan:      #6fe3d0;   /* 민트 (3번째 액센트) */

    --c-text:      #e8eef6;   /* 본문 */
    --c-muted:     #a3b1c4;   /* 보조 텍스트 */
    --c-head:      #ffffff;   /* 제목 */

    --w-max:       1080px;
    --w-prose:     72ch;
    --r-sm:        10px;
    --r-md:        16px;
    --r-lg:        22px;

    --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
            "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "맑은 고딕",
            system-ui, sans-serif;
}

/* ---------- 2. 베이스 ---------- */
#bm-root {
    all: revert;                /* 빌더 테마가 주입한 상속값 차단 */
    box-sizing: border-box;
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.85;
    letter-spacing: -0.02em;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-align: left;
    overflow-x: clip;

    /* 배경: 상단 네온 글로우 2겹 */
    background-image:
        radial-gradient(760px 420px at 18% -6%,  rgba(90, 169, 255, 0.16), transparent 62%),
        radial-gradient(680px 400px at 84% 4%,   rgba(143, 123, 255, 0.16), transparent 62%);
    background-repeat: no-repeat;
}

#bm-root *,
#bm-root *::before,
#bm-root *::after { box-sizing: border-box; }

#bm-root img {
    max-width: 100%;
    height: auto;
    display: block;
}

#bm-root a { color: var(--c-cyan); text-decoration: none; }
#bm-root a:hover { text-decoration: underline; }

#bm-root strong { color: var(--c-primary); font-weight: 700; }

#bm-root :focus-visible {
    outline: 2px solid var(--c-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

#bm-root .bm-wrap {
    width: 100%;
    max-width: var(--w-max);
    margin-inline: auto;
    padding-inline: 22px;
}

/* 스티키 헤더 높이만큼 앵커 오프셋 */
#bm-root [id] { scroll-margin-top: 76px; }


/* ---------- 3. 상단 스티키 바 ---------- */
#bm-root .bm-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 15, 20, 0.82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--c-line);
}

#bm-root .bm-bar-inner {
    max-width: var(--w-max);
    margin-inline: auto;
    padding: 0 22px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

#bm-root .bm-brand {
    flex: none;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--c-head);
    letter-spacing: -0.03em;
}
#bm-root .bm-brand:hover { text-decoration: none; }
#bm-root .bm-brand span {
    display: inline-block;
    margin-left: 7px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    border-radius: 999px;
    vertical-align: 2px;
}

#bm-root .bm-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}
#bm-root .bm-nav::-webkit-scrollbar { display: none; }

#bm-root .bm-nav a {
    flex: none;
    padding: 7px 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--c-muted);
    border-radius: 999px;
    transition: color .15s, background .15s;
}
#bm-root .bm-nav a:hover {
    color: var(--c-head);
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}


/* ---------- 4. 히어로 ---------- */
#bm-root .bm-hero {
    padding: 74px 0 60px;
    text-align: center;
}

#bm-root .bm-eyebrow {
    display: inline-block;
    margin: 0 0 20px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #dbe9ff;
    background: rgba(90, 169, 255, 0.12);
    border: 1px solid rgba(90, 169, 255, 0.34);
    border-radius: 999px;
}

#bm-root h1 {
    margin: 0 0 24px;
    font-size: clamp(2.1rem, 5.4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: -0.045em;
    color: var(--c-head);
    background: linear-gradient(102deg, #ffffff 12%, #cfe2ff 46%, #c3b6ff 82%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#bm-root .bm-h1-sub {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.42em;
    font-weight: 700;
    vertical-align: 0.5em;
    color: var(--c-cyan);
    -webkit-text-fill-color: var(--c-cyan);
    letter-spacing: 0;
}

/* 히어로 리드 문구 */
#bm-root .bm-lede {
    max-width: 62ch;
    margin: 0 auto 34px;
    font-size: clamp(1.02rem, 1.6vw, 1.16rem);
    line-height: 1.95;
    color: var(--c-muted);
    text-align: center;
}
#bm-root .bm-lede strong { color: #b8d5ff; }

#bm-root .bm-updated {
    margin: 0 0 26px;
    font-size: 0.84rem;
    color: #7c8ba0;
    text-align: center;
}
#bm-root .bm-updated time { color: var(--c-muted); }

/* CTA */
#bm-root .bm-cta {
    display: inline-block;
    margin: 0 auto 44px;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 14px 38px rgba(90, 169, 255, 0.28);
    transition: transform .18s ease, box-shadow .18s ease;
}
#bm-root .bm-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 48px rgba(90, 169, 255, 0.4);
    text-decoration: none;
}
#bm-root .bm-cta img { width: 500px; max-width: 100%; height: auto; }


/* ---------- 5. 이미지 ---------- */
#bm-root .bm-figure {
    margin: 0 0 44px;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--c-line);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}
#bm-root .bm-figure img { width: 100%; }
#bm-root .bm-figure-hero { margin-bottom: 52px; }


/* ---------- 6. 목차 카드 그리드 ---------- */
#bm-root .bm-toc {
    padding: 30px 26px 26px;
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
}
#bm-root .bm-toc-title {
    margin: 0 0 20px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--c-head);
    text-align: center;
    letter-spacing: -0.03em;
}
#bm-root .bm-toc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#bm-root .bm-toc-grid a {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    height: 100%;
    padding: 15px 15px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    color: var(--c-text);
    font-size: 0.94rem;
    line-height: 1.6;
    text-align: left;
    transition: border-color .15s, background .15s, transform .15s;
}
#bm-root .bm-toc-grid a:hover {
    background: rgba(90, 169, 255, 0.08);
    border-color: rgba(90, 169, 255, 0.45);
    transform: translateY(-2px);
    text-decoration: none;
}
#bm-root .bm-toc-grid b {
    flex: none;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--c-primary);
    padding-top: 2px;
}


/* ---------- 7. 섹션 ---------- */
#bm-root .bm-section { padding: 82px 0; }
#bm-root .bm-alt {
    background: var(--c-bg-alt);
    border-block: 1px solid var(--c-line);
}

#bm-root .bm-sec-head {
    margin: 0 0 34px;
    text-align: center;
}
#bm-root .bm-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(143, 123, 255, 0.35);
}
#bm-root .bm-kicker {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--c-cyan);
    text-transform: uppercase;
}
#bm-root h2 {
    max-width: 26ch;
    margin: 0 auto;
    font-size: clamp(1.5rem, 3.1vw, 2.05rem);
    font-weight: 800;
    line-height: 1.42;
    letter-spacing: -0.04em;
    color: var(--c-head);
}

#bm-root h3 {
    margin: 46px 0 14px;
    font-size: clamp(1.13rem, 2vw, 1.32rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.03em;
    color: var(--c-cyan);
}

/* 본문 — 좌측 정렬, 가독 폭 제한 */
#bm-root .bm-body {
    max-width: var(--w-prose);
    margin-inline: auto;
}
#bm-root .bm-body p {
    margin: 0 0 24px;
    font-size: 1.03rem;
    line-height: 1.95;
    color: #d6e0ec;
    text-align: left;
}
#bm-root .bm-body p:last-child { margin-bottom: 0; }


/* ---------- 8. 핵심 요약 박스 ---------- */
#bm-root .bm-key {
    max-width: var(--w-prose);
    margin: 0 auto 38px;
    padding: 22px 24px;
    background: linear-gradient(180deg, rgba(143, 123, 255, 0.11), rgba(143, 123, 255, 0.03));
    border: 1px solid rgba(143, 123, 255, 0.34);
    border-left: 3px solid var(--c-accent);
    border-radius: 0 var(--r-md) var(--r-md) 0;
}
#bm-root .bm-key-title {
    margin: 0 0 12px;
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #c3b6ff;
}
#bm-root .bm-key ul { margin: 0; padding: 0; list-style: none; }
#bm-root .bm-key li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 20px;
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--c-text);
}
#bm-root .bm-key li:last-child { margin-bottom: 0; }
#bm-root .bm-key li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 7px;
    height: 7px;
    background: var(--c-primary);
    border-radius: 50%;
}


/* ---------- 9. 5단계 스텝 ---------- */
#bm-root .bm-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 38px;
    padding: 0;
    list-style: none;
}
#bm-root .bm-steps li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text);
}
#bm-root .bm-steps b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    border-radius: 50%;
}


/* ---------- 10. 판별 기준 카드 ---------- */
#bm-root .bm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}
#bm-root .bm-cards li {
    padding: 20px 18px;
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
}
#bm-root .bm-cards b {
    display: block;
    margin-bottom: 9px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--c-primary);
}
#bm-root .bm-cards strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--c-head);
}
#bm-root .bm-cards span {
    display: block;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--c-muted);
}


/* ---------- 11. 표 ---------- */
#bm-root .bm-table-wrap {
    max-width: 940px;
    margin: 0 auto 42px;
    overflow-x: auto;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    background: var(--c-panel);
}
#bm-root .bm-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.95rem;
}
#bm-root .bm-table caption {
    padding: 16px 18px 12px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--c-muted);
    text-align: left;
}
#bm-root .bm-table thead th {
    padding: 13px 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.85), rgba(143, 123, 255, 0.85));
    border-bottom: 1px solid var(--c-line);
    text-align: left;
    white-space: nowrap;
}
#bm-root .bm-table tbody th,
#bm-root .bm-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(38, 51, 74, 0.75);
    line-height: 1.7;
    text-align: left;
    vertical-align: top;
}
#bm-root .bm-table tbody th {
    font-weight: 700;
    color: var(--c-head);
    white-space: nowrap;
}
#bm-root .bm-table td { color: #c6d2e0; }
#bm-root .bm-table tbody tr:last-child th,
#bm-root .bm-table tbody tr:last-child td { border-bottom: none; }
#bm-root .bm-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.028); }


/* ---------- 12. FAQ 아코디언 ---------- */
#bm-root .bm-faq-group {
    max-width: var(--w-prose);
    margin: 42px auto 16px;
}
#bm-root .bm-faq {
    max-width: var(--w-prose);
    margin: 0 auto 14px;
}
#bm-root .bm-faq details {
    margin-bottom: 9px;
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    overflow: hidden;
}
#bm-root .bm-faq details[open] { border-color: rgba(90, 169, 255, 0.42); }

#bm-root .bm-faq summary {
    position: relative;
    padding: 16px 46px 16px 18px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-head);
    cursor: pointer;
    list-style: none;
    line-height: 1.65;
}
#bm-root .bm-faq summary::-webkit-details-marker { display: none; }
#bm-root .bm-faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    color: var(--c-primary);
    transition: transform .2s;
}
#bm-root .bm-faq details[open] summary::after {
    content: "\2212";
    transform: translateY(-50%) rotate(180deg);
}
#bm-root .bm-faq summary:hover { background: rgba(255, 255, 255, 0.04); }

#bm-root .bm-faq details p {
    margin: 0;
    padding: 0 18px 18px;
    font-size: 0.97rem;
    line-height: 1.9;
    color: #c6d2e0;
}


/* ---------- 13. 엔드노트 (푸터 대체) ---------- */
#bm-root .bm-endnote {
    padding: 40px 0 46px;
    border-top: 1px solid var(--c-line);
    background: #070b0f;
}
#bm-root .bm-endnote p {
    max-width: 80ch;
    margin: 0 auto 10px;
    font-size: 0.85rem;
    line-height: 1.85;
    color: #7c8ba0;
    text-align: center;
}
#bm-root .bm-endnote-lead {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--c-muted);
}
#bm-root .bm-copy {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--c-line);
    font-size: 0.8rem;
    color: #64748b;
}


/* ---------- 14. 반응형 ---------- */
@media (max-width: 900px) {
    #bm-root .bm-toc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    #bm-root .bm-wrap { padding-inline: 16px; }
    #bm-root .bm-bar-inner { padding: 0 16px; height: 56px; gap: 12px; }
    #bm-root [id] { scroll-margin-top: 68px; }

    #bm-root .bm-hero { padding: 46px 0 40px; }
    #bm-root .bm-section { padding: 58px 0; }

    #bm-root .bm-toc-grid { grid-template-columns: 1fr; }
    #bm-root .bm-toc { padding: 24px 18px 20px; }


    #bm-root .bm-steps li { padding: 10px 14px; font-size: 0.9rem; }
    #bm-root .bm-key { padding: 18px; }
    #bm-root .bm-body p { font-size: 1rem; }
    #bm-root .bm-figure { border-radius: 14px; }
    #bm-root .bm-table { font-size: 0.88rem; min-width: 480px; }
    #bm-root .bm-table thead th,
    #bm-root .bm-table tbody th,
    #bm-root .bm-table td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    #bm-root * {
        animation-duration: 0.01ms;
        transition-duration: 0.01ms;
    }
}

/* 인쇄 */
@media print {
    #bm-root { background: #fff; color: #000; }
    #bm-root .bm-topbar, #bm-root .bm-cta { display: none; }
}
