/**
 * 설명회 HTML — 유인물(문서) / 슬라이드(PPT) 이중 인쇄
 * body.view-doc · body.print-mode-doc  → A4 세로 유인물
 * body.view-ppt  · print-mode-ppt(기본) → 16:9 가로 슬라이드
 */

/* ── 화면: 유인물(문서) 보기 ── */
body.view-doc .deck-toolbar,
body.view-doc #deck-start-btn { display: none !important; }

body.view-doc .deck-slide {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    opacity: 1 !important;
}

body.view-doc .deck-slide.slide-center {
    display: block !important;
    text-align: left;
    padding: 2.5rem 1.5rem;
    min-height: 0;
}

body.view-doc .slide-center .slide-title { font-size: clamp(1.85rem, 4vw, 2.75rem); }
body.view-doc .slide-center .slide-lead { font-size: 1.05rem; max-width: none; }
/* 유인물·홍보 임베드도 페이지 워크는 좌우 교차 2열 유지 (세로 스크롤만 문서형) */
body.view-doc .page-walk,
body.view-doc .page-walk.deck-slide {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    height: auto !important;
    min-height: 0 !important;
    padding: 2rem 1.25rem 3rem;
    border-bottom: 1px solid #e2e8f0;
}
@media (max-width: 767px) {
    body.view-doc .page-walk,
    body.view-doc .page-walk.deck-slide {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}
body.view-doc .page-walk .sample-img--fullpage {
    max-width: 100%;
    height: auto;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

body.view-doc .view-mode-banner--ppt { display: none; }
body.view-ppt .view-mode-banner--doc { display: none; }
body.is-embedded .view-mode-banner { display: none !important; }

html:has(body.is-embedded),
body.is-embedded {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.view-mode-banner {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0.45rem 1rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
}
.view-mode-banner--doc { background: #ecfdf5; color: #065f46; border-bottom: 1px solid #a7f3d0; }
.view-mode-banner--ppt { background: #eef2ff; color: #3730a3; border-bottom: 1px solid #c7d2fe; }

.print-actions { display: inline-flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; }
.print-actions__btn {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #334155;
    font-family: inherit;
}
.print-actions__btn--doc { border-color: #6ee7b7; color: #047857; background: #ecfdf5; }
.print-actions__btn--ppt { border-color: #a5b4fc; color: #4338ca; background: #eef2ff; }

.presentation-print-prompt {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
.presentation-print-prompt__card {
    width: min(100%, 26rem);
    padding: 1.5rem 1.35rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    text-align: center;
}
.presentation-print-prompt__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.presentation-print-prompt__title {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
}
.presentation-print-prompt__lead {
    margin: 0 0 1.1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
}
.presentation-print-prompt__actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.presentation-print-prompt__btn {
    border: 0;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}
.presentation-print-prompt__btn--primary {
    background: linear-gradient(135deg, #0f766e, #0369a1);
    color: #fff;
}
.presentation-print-prompt__btn--ghost {
    background: #f1f5f9;
    color: #475569;
}

@media print {
    .view-mode-banner,
    .print-actions,
    .presentation-print-prompt { display: none !important; }

    /* ═══ 유인물 · A4 세로 ═══ */
    body.print-mode-doc {
        width: 100%;
        background: #fff !important;
    }
    body.print-mode-doc {
        --doc-title: 1.65rem;
        --doc-h2: 1.35rem;
        --doc-h3: 1.12rem;
        --doc-body: 0.92rem;
        --doc-small: 0.82rem;
    }
    body.print-mode-doc .deck-slide {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 0 1.25rem !important;
        padding: 0 0 1rem !important;
        overflow: visible !important;
        page-break-after: auto !important;
        break-after: auto !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
        box-sizing: border-box;
    }
    body.print-mode-doc .deck-slide.slide-center {
        display: block !important;
        text-align: left !important;
        padding: 0 0 1.25rem !important;
    }
    body.print-mode-doc .hero-gradient {
        padding: 1.25rem 1rem !important;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body.print-mode-doc .slide-center .slide-title,
    body.print-mode-doc .deck-slide h1 { font-size: var(--doc-title) !important; line-height: 1.2 !important; }
    body.print-mode-doc .deck-slide h2 { font-size: var(--doc-h2) !important; }
    body.print-mode-doc .deck-slide h3 { font-size: var(--doc-h3) !important; }
    body.print-mode-doc .deck-slide h4 { font-size: calc(var(--doc-body) * 1.05) !important; }
    body.print-mode-doc .deck-slide p,
    body.print-mode-doc .deck-slide li,
    body.print-mode-doc .deck-slide td,
    body.print-mode-doc .deck-slide th { font-size: var(--doc-body) !important; line-height: 1.55 !important; }
    body.print-mode-doc .deck-slide .text-sm { font-size: var(--doc-small) !important; }
    body.print-mode-doc .blob { display: none !important; }
    body.print-mode-doc .week-table { font-size: var(--doc-small) !important; width: 100%; }
    body.print-mode-doc .week-table th,
    body.print-mode-doc .week-table td { padding: 0.35rem 0.5rem !important; }
    body.print-mode-doc .series-card,
    body.print-mode-doc .flow-step,
    body.print-mode-doc .benefit-card,
    body.print-mode-doc .policy-box { page-break-inside: avoid; }
    body.print-mode-doc .page-walk.deck-slide {
        page-break-inside: avoid;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        padding: 0.85rem !important;
        margin-bottom: 0.85rem !important;
    }
    body.print-mode-doc .page-walk {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
    }
    body.print-mode-doc .page-walk .sample-img--fullpage {
        max-height: none !important;
        width: 100% !important;
        margin: 0 0 0.65rem !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    body.print-mode-doc .slide-shelf .nocots-book__cover { height: 22mm !important; }
    body.print-mode-doc .slide-shelf .nocots-bookshelf-wrap { page-break-inside: avoid; }
    body.print-mode-doc .stat-box { page-break-inside: avoid; }
    body.print-mode-doc .compare-table { font-size: var(--doc-small) !important; }

    /* ═══ PPT · 가로 슬라이드 (기본) — overflow 완화 ═══ */
    body:not(.print-mode-doc) .deck-slide.slide-hero {
        height: 210mm !important;
        min-height: 210mm !important;
        max-height: 210mm !important;
        overflow: hidden !important;
        padding: 5mm 10mm !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .slide-title {
        font-size: 3.15rem !important;
        line-height: 1.08 !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .slide-lead {
        font-size: 1.02rem !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .slide-center-inner {
        width: 100% !important;
        max-width: 100% !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .grid {
        margin-top: 5mm !important;
        gap: 3mm !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .stat-box {
        padding: 2.5mm 3mm !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .stat-box .text-3xl {
        font-size: 1.65rem !important;
        margin-bottom: 0.15rem !important;
    }
    body:not(.print-mode-doc) .deck-slide.slide-hero .stat-box p {
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
        margin: 0 !important;
    }
    body:not(.print-mode-doc) #mygod-main.deck-slide { display: none !important; }
    body:not(.print-mode-doc) #curriculum.deck-slide,
    body:not(.print-mode-doc) .deck-slide:has(.week-table),
    body:not(.print-mode-doc) .deck-slide:has(.compare-table) {
        height: auto !important;
        min-height: 210mm;
        max-height: none !important;
        overflow: visible !important;
    }
    body:not(.print-mode-doc) .deck-slide .slide-center-inner,
    body:not(.print-mode-doc) .deck-slide .max-w-6xl,
    body:not(.print-mode-doc) .deck-slide .max-w-5xl,
    body:not(.print-mode-doc) .deck-slide .max-w-4xl {
        max-width: 100% !important;
    }
    body:not(.print-mode-doc) .page-walk {
        align-items: start !important;
    }
    /* exam-help 박스 하단 잘림 방지 — 52mm 고정 높이 제거 */
    body:not(.print-mode-doc) .page-walk .exam-help {
        max-height: none !important;
        overflow: visible !important;
        padding: 2.5mm 3mm !important;
        page-break-inside: avoid;
    }
    body:not(.print-mode-doc) .page-walk .exam-help__text {
        line-height: 1.42 !important;
    }
    body:not(.print-mode-doc) .page-walk .exam-help__tags {
        margin-top: 2mm !important;
    }
}
