/* JusonKR Guide - Ink & Paper concept
   팔레트(--juson-ink / --juson-paper 등)는 app.css :root에 정의되어 전역으로 공유됩니다. */
.guide-page {
    --guide-text-main: var(--juson-ink);
    --guide-text-sub: var(--juson-ink-soft);
}

.guide-page-hero {
    background: #fff;
    color: var(--juson-ink);
    border: 1px solid var(--juson-line);
    border-radius: 18px;
    padding: 1.6rem 1.8rem;
    box-shadow: 0 10px 28px rgba(26, 34, 56, 0.06);
    position: relative;
    overflow: hidden;
}

.guide-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, var(--juson-paper) 100%);
    pointer-events: none;
}

.guide-page-hero > * { position: relative; }

.guide-page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--juson-line);
    background: var(--juson-paper);
    color: var(--juson-ink);
    margin-bottom: 0.65rem;
}

.guide-page-hero-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--juson-accent);
}

.guide-page-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--juson-ink);
}

.guide-page-hero-title .juson-dot {
    color: var(--juson-accent);
    margin-left: 2px;
}

.guide-page-hero-desc {
    font-size: 0.95rem;
    color: var(--juson-ink-soft);
}

.menu-column {
    padding-right: 26px;
}

.guide-menu {
    background: #fff;
    border: 1px solid var(--juson-line);
    border-radius: 14px;
    padding: 1rem 0.9rem;
    box-shadow: 0 6px 20px rgba(26, 34, 56, 0.04);
    position: sticky;
    top: 80px;
}

.guide-menu-head {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--juson-ink);
    letter-spacing: 0.18em;
    margin-bottom: 0.9rem;
    padding: 0 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.guide-menu-head::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--juson-accent);
}

.guide-menu .guide-group {
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px dashed var(--juson-line);
}

.guide-menu .guide-group:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.guide-menu .guide-main {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--juson-ink);
    padding: 0.55rem 2rem 0.55rem 0.65rem;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-menu .guide-main-text {
    display: inline-flex;
    align-items: center;
}

.guide-menu .guide-main-text i {
    color: var(--juson-ink-soft);
}

.guide-menu .guide-main-chevron {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--juson-ink-soft);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.guide-menu .guide-main:hover,
.guide-menu .guide-main.active {
    background: var(--juson-paper);
    color: var(--juson-ink);
}

.guide-menu .guide-main:hover .guide-main-text i,
.guide-menu .guide-main.active .guide-main-text i {
    color: var(--juson-accent);
}

.guide-menu .guide-main.active .guide-main-chevron {
    color: var(--juson-accent);
    transform: translateY(-50%) rotate(180deg);
}

.guide-menu .guide-sub-group {
    padding: 0.25rem 0 0.25rem 0.5rem;
}

.guide-menu .guide-sub {
    font-size: 0.9rem;
    color: var(--juson-ink-soft);
    padding: 0.42rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.guide-menu .guide-sub:hover {
    color: var(--juson-ink);
    background: var(--juson-paper);
}

.guide-menu .guide-sub.active {
    color: var(--juson-ink);
    background: var(--juson-accent-soft);
    font-weight: 600;
}

.guide-menu .guide-sub.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: var(--juson-accent);
}

.guide-menu a {
    color: inherit;
    text-decoration: none;
}

.guide-menu a:hover {
    color: inherit;
}

.guide-article-card {
    background: #fff;
    border: 1px solid var(--juson-line);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(26, 34, 56, 0.04);
    padding: 1.4rem 1.6rem 0.9rem;
}

.guide-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--juson-ink);
    letter-spacing: -0.02em;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--juson-line);
    margin-bottom: 1.6rem;
    position: relative;
}

.guide-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--juson-accent);
    border-radius: 2px;
}

.guide-content {
    padding-bottom: 2rem;
}

.guide-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--juson-ink);
    padding-bottom: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-subtitle::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--juson-accent);
    flex-shrink: 0;
}

.guide-content .guide-text {
    font-size: 0.96rem;
    font-weight: 400;
    color: var(--juson-ink-soft);
    padding-top: 0.25rem;
    line-height: 1.85;
}

#guidePrint {
    line-height: 1.7;
}

/* 단계 목록 (서체 포함 가이드 등) */
.guide-content .guide-steps {
    margin: 0.4rem 0 0;
    padding-left: 1.35rem;
    color: var(--juson-ink-soft);
    font-size: 0.96rem;
    line-height: 1.85;
}

.guide-content .guide-steps li {
    padding-left: 0.15rem;
}

.guide-content .guide-steps li::marker {
    color: var(--juson-accent);
    font-weight: 700;
}

/* 메뉴 경로 표기: 파일 → 옵션 → 저장 */
.guide-path {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    background: var(--juson-paper);
    border: 1px solid var(--juson-line);
    color: var(--juson-ink);
    font-size: 0.92em;
    font-weight: 600;
}

/* 주의 박스 */
.guide-note {
    margin-top: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-left: 3px solid var(--juson-accent);
    border-radius: 8px;
    background: var(--juson-accent-soft);
    color: var(--juson-ink-soft);
    font-size: 0.93rem;
    line-height: 1.75;
}

/* 마무리 체크리스트 박스 */
.guide-checklist {
    padding: 1.2rem 1.3rem;
    border-radius: 14px;
    background: var(--juson-ink);
    color: #fff;
}

.guide-checklist-head {
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 0.6rem;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.guide-checklist-desc {
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.72);
}

.guide-checklist .guide-steps {
    color: rgba(255, 255, 255, 0.92);
}

.guide-checklist .guide-steps li::marker {
    color: var(--juson-accent);
}

/* ===== 도해(그림 + 그림 위 라벨) =====
   라벨 좌표는 PC 기준 카드 본문 폭 780px(container 1140px, col-lg-9, 카드 padding 1.6rem)에서
   쓰던 px 값을 % 로 환산한 것입니다. .guide-figure 가 컨테이너 쿼리 기준이 되므로
   그림과 라벨이 항상 같은 비율로 함께 커지고 줄어듭니다.
   px → %  :  left/right = px / 780,  top/bottom = px / 그림표시높이 */
.guide-figure {
    position: relative;
    container-type: inline-size;
    /* 그림 아래 캡션용 padding 을 em 으로 줄 수 있도록 라벨과 같은 크기를 기준으로 잡음 */
    font-size: 15px;
    font-size: clamp(11px, 1.97cqw, 15.36px);
}

.guide-figure > img {
    display: block;
    width: 100%;
    height: auto;
}

.guide-figure .fig-label {
    position: absolute;
    white-space: nowrap;
    line-height: 1.85;
    font-size: 15px; /* 컨테이너 쿼리 미지원 브라우저 fallback */
    font-size: clamp(11px, 1.97cqw, 15.36px);
}

/* left 를 그림의 중심으로 지정하고 라벨을 그 중심에 맞춤 */
.guide-figure .fig-label.fig-center {
    transform: translateX(-50%);
}

.guide-figure .fig-label.fig-xs {
    font-size: 12px;
    font-size: clamp(10px, 1.54cqw, 12px);
}

.guide-figure .fig-label.fig-sm {
    font-size: 13px;
    font-size: clamp(10px, 1.67cqw, 13px);
}

.guide-figure .fig-label.fig-lg {
    font-size: 17px;
    font-size: clamp(11px, 2.18cqw, 17px);
}

.guide-figure .fig-label.fig-xl {
    font-size: 18px;
    font-size: clamp(11px, 2.31cqw, 18px);
}

/* 그림 바로 아래에 붙는 캡션 줄. 높이를 em 으로 잡아 폭에 비례하게 함 */
.guide-figure .fig-caption-row {
    position: relative;
    height: 3.7em;
    font-size: 13px;
    font-size: clamp(10px, 1.67cqw, 13px);
}

.guide-figure .fig-caption-row .fig-label {
    top: 0;
    font-size: 1em;
}

/* 좁은 화면에서 라벨이 서로 겹칠 만큼 줄어드는 도해는
   최소 폭을 주고 가로 스크롤로 원래 도해를 그대로 보여줍니다. */
.guide-figure-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* PC 에서는 절반 폭, 모바일에서는 거의 꽉 차게 (책 구조도 등) */
.guide-img-half {
    width: 50%;
}

/* 스택되면 지나치게 커지는 참고용 작은 그림 */
@media (max-width: 991.98px) {
    .guide-figure-small {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

.guide-figure-hint {
    display: none;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--juson-ink-soft);
    text-align: center;
}

@media (max-width: 767.98px) {
    .guide-figure-scroll > .guide-figure {
        min-width: 600px;
    }

    .guide-figure-hint {
        display: block;
    }

    .guide-img-half {
        width: 92%;
    }
}

@media (max-width: 991.98px) {
    .menu-column {
        padding-right: 0;
    }

    .guide-menu {
        position: static;
    }

    .guide-page-hero {
        padding: 1.2rem 1.15rem;
    }

    .guide-page-hero-title {
        font-size: 1.5rem;
    }

    .guide-article-card {
        padding: 1.1rem 1rem 0.5rem;
    }

    .guide-title {
        font-size: 1.55rem;
    }
}
