/**
 * ============================================================================
 * ERUMENB /book/md/Summa-Junior-Korean/css/reading-training-suneung-layer.css
 * ----------------------------------------------------------------------------
 * Version : v01-r10
 * Updated : 2026-04-02 16:42 KST
 * Purpose : 비문학 독해연습 → 수능 연결 체험형 3STEP 레이어 팝업
 * ----------------------------------------------------------------------------
 * History
 * - v01-r10
 *   · rdx-layer__close / js-rdx-close 원형 단추형 버튼으로 조정
 *   · .rdx-step-nav__topic.js-rdx-selected-topic 에 book title급 타이포 적용
 *   · STEP3 좌우 compare head 높이 정렬 보강
 *   · inside insight 1열 박스형 유지
 *
 * - v01-r09
 *   · rdx-note-box / rdx-note-box__title 명칭 기준 반영
 *   · rdx-insight-box--inside 1열 flex 구조 반영
 *   · exam link box / placeholder / zoom popup 정리
 *
 * - v01-r08
 *   · progress 단계 텍스트 스타일 보강
 *   · merged insight 개행 유지 처리
 *
 * - v01-r07
 *   · PHP 구조 기준 정합 재작성
 *   · progress / step-nav / step body 정렬
 *   · STEP3 좌우 비교 레이아웃
 *   · 연결수능 박스형 UI
 *   · placeholder / zoom popup 스타일
 *   · 기본 반응형 포함
 * ============================================================================
 */

.rdx-layer {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

.rdx-layer.is-open {
    display: block;
}

.rdx-layer__dim {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.64);
}

.rdx-layer__panel {
    position: relative;
    width: min(1240px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
}

.rdx-layer__header {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 28px 32px 20px;
    background: linear-gradient(180deg, #faf7ef 0%, #ffffff 100%);
    border-bottom: 1px solid #ece7dc;
}

.rdx-layer__header-copy {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100px;
}

.rdx-layer__eyebrow {
    margin: 0 0 8px;
    color: #8a6538;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.rdx-layer__title {
    margin: 0;
    color: #1f2937;
    font-size: 31px;
    line-height: 1.28;
    font-weight: 800;
}

.rdx-layer__desc {
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.75;
}

.rdx-layer__header-side {
    width: 390px;
    flex: 0 0 390px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rdx-layer__header-close {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.rdx-layer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.10);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rdx-layer__close:hover {
    background: #f9fafb;
    border-color: rgba(17, 24, 39, 0.22);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.14);
}

.rdx-layer__close:active {
    transform: scale(0.96);
}

.rdx-layer__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.rdx-layer__progress {
    background: #fff;
    border: 1px solid #e7dece;
    border-radius: 16px;
    padding: 14px 16px;
}

.rdx-step-indicator {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.rdx-step-indicator__item {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7f4ed;
    border: 1px solid transparent;
}

.rdx-step-indicator__item.is-active {
    background: #fff7ed;
    border-color: #e8c38f;
}

.rdx-step-indicator__item.is-done {
    background: #f3f8f3;
    border-color: #bfd8bf;
}

.rdx-step-indicator__num {
    display: block;
    margin-bottom: 4px;
    color: #8a6538;
    font-size: 11px;
    font-weight: 800;
}

.rdx-step-indicator__label {
    display: block;
    color: #374151;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.rdx-step-nav {
    padding: 14px 32px;
    border-bottom: 1px solid #f0ece4;
    background: #fff;
}

.rdx-step-nav__group {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.rdx-step-nav__group.is-active {
    display: flex;
}

.rdx-step-nav__topic {
    min-width: 0;
    color: #111827;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 800;
    word-break: keep-all;
}

.rdx-step-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rdx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

.rdx-btn--primary {
    border: 1px solid #8a6538;
    background: #8a6538;
    color: #fff;
}

.rdx-btn--primary:hover {
    background: #75552f;
    border-color: #75552f;
}

.rdx-btn--line {
    border: 1px solid #d8cfc1;
    background: #fff;
    color: #4b5563;
}

.rdx-btn--line:hover {
    border-color: #bfae92;
    color: #1f2937;
}

.rdx-layer__body {
    padding: 26px 32px 34px;
    overflow-y: auto;
}

.rdx-step {
    display: none;
}

.rdx-step.is-active {
    display: block;
}

.rdx-step__head {
    margin-bottom: 22px;
}

.rdx-bridge-copy {
    margin: 0 0 10px;
    color: #7a5a33;
    font-size: 15px;
    line-height: 1.75;
    font-weight: 700;
}

.rdx-step__title {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.32;
    font-weight: 800;
}

.rdx-step__desc {
    margin: 10px 0 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.75;
}

.rdx-step__footnote {
    margin: 18px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.rdx-book-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.rdx-book-card {
    display: flex;
    gap: 18px;
    width: 100%;
    padding: 20px;
    border: 1px solid #e9e3d8;
    border-radius: 20px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: .2s ease;
}

.rdx-book-card:hover,
.rdx-book-card.is-selected {
    border-color: #cfa56e;
    box-shadow: 0 12px 28px rgba(138, 101, 56, 0.12);
    transform: translateY(-1px);
}

.rdx-book-card__thumb {
    width: 118px;
    flex: 0 0 118px;
}

.rdx-book-card__thumb img {
    display: block;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.rdx-book-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.rdx-book-card__title {
    color: #111827;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 800;
}

.rdx-book-card__text {
    margin-top: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
}

.rdx-book-card__action {
    margin-top: auto;
    padding-top: 16px;
    color: #8a6538;
    font-size: 13px;
    font-weight: 800;
}

.rdx-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.rdx-topic-card {
    width: 100%;
    min-height: 150px;
    padding: 18px 18px 16px;
    border: 1px solid #e8e1d5;
    border-radius: 18px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: .2s ease;
}

.rdx-topic-card:hover,
.rdx-topic-card.is-selected {
    border-color: #cfa56e;
    background: #fffaf3;
    box-shadow: 0 10px 24px rgba(138, 101, 56, 0.1);
}

.rdx-topic-card__title {
    display: block;
    color: #111827;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
}

.rdx-topic-card__text {
    display: block;
    margin-top: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.rdx-topic-card__action {
    display: inline-block;
    margin-top: 14px;
    color: #8a6538;
    font-size: 13px;
    font-weight: 800;
}

.rdx-insight-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.rdx-insight-box__item {
    padding: 16px 18px;
    border: 1px solid #e8e1d5;
    border-radius: 16px;
    background: #fffdf8;
}

.rdx-insight-box__title {
    margin: 0 0 8px;
    color: #7a5a33;
    font-size: 13px;
    font-weight: 800;
}

.rdx-insight-box__text {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.75;
}

.rdx-insight-box.rdx-insight-box--inside {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
}

.rdx-insight-box.rdx-insight-box--inside .rdx-insight-box__item {
    padding: 16px 18px;
}

.rdx-insight-box__sub {
    margin: 0 0 8px;
    color: #7a5a33;
    font-size: 13px;
    font-weight: 800;
}

.rdx-insight-box__text.js-rdx-suneung-insight-merged {
    white-space: pre-line;
}

.rdx-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 20px;
    align-items: stretch;
}

.rdx-compare__col {
    min-width: 0;
    display: flex;
}

.rdx-compare-card {
    width: 100%;
    height: 100%;
    border: 1px solid #e9e1d5;
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
}

.rdx-compare-card__head {
    min-height: 128px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #f0ebe2;
    background: #fcfaf6;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.rdx-compare-card__eyebrow {
    margin: 0 0 6px;
    color: #8a6538;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
}

.rdx-compare-card__title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 800;
}

.rdx-compare-card__sub {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.rdx-compare-card__thumb {
    padding: 20px 22px 0;
}

.rdx-zoom-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
    text-align: left;
}

.rdx-zoom-trigger img {
    display: block;
    width: 100%;
    border-radius: 14px;
    border: 1px solid #e6dfd3;
    background: #f8f8f8;
}

.rdx-zoom-trigger__label {
    display: inline-block;
    margin-top: 10px;
    color: #8a6538;
    font-size: 13px;
    font-weight: 800;
}

.rdx-compare-card__body {
    padding: 20px 22px 24px;
    flex: 1 1 auto;
}

.rdx-compare-card__text {
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
}

.rdx-bullet-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.rdx-bullet-list li {
    position: relative;
    padding-left: 12px;
    margin-top: 7px;
    color: #374151;
    font-size: 14px;
    line-height: 1.7;
}

.rdx-bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #8a6538;
}

.rdx-note-box {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #ebe2d6;
    border-radius: 16px;
    background: #fffaf4;
}

.rdx-note-box__title {
    margin: 0 0 8px;
    color: #7a5a33;
    font-size: 13px;
    font-weight: 800;
}

.rdx-note-box__text {
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
}

.rdx-exam-link-boxes {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
}

.rdx-exam-link-box {
    border: 1px solid #e6ddd1;
    border-radius: 18px;
    background: #fffaf7;
    overflow: hidden;
}

.rdx-exam-link-box__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #f7f1e9;
    border-bottom: 1px solid #ebe2d6;
}

.rdx-exam-link-box__title {
    color: #111827;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 800;
}

.rdx-exam-link-box__body {
    padding: 18px;
}

.rdx-exam-link-box__label {
    margin: 0 0 10px;
    color: #7a5a33;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
}

.rdx-exam-link-box__text {
    color: #374151;
    font-size: 14px;
    line-height: 1.9;
}

.rdx-placeholder-box {
    margin: 20px 22px 24px;
    padding: 18px;
    border: 1px dashed #d6cbbd;
    border-radius: 16px;
    background: #faf7f2;
}

.rdx-placeholder-box__title {
    display: block;
    color: #7a5a33;
    font-size: 15px;
    font-weight: 800;
}

.rdx-placeholder-box__text {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
}

.rdx-zoom {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.rdx-zoom.is-open {
    display: block;
}

.rdx-zoom__dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.rdx-zoom__dialog {
    position: relative;
    width: min(1080px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rdx-zoom__header,
.rdx-zoom__footer {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #ece7dd;
}

.rdx-zoom__footer {
    border-bottom: 0;
    border-top: 1px solid #ece7dd;
}

.rdx-zoom__title {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
}

.rdx-zoom__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.rdx-zoom__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 20px;
    background: #f8fafc;
    text-align: center;
}

.rdx-zoom__image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    background: #fff;
}

.rdx-zoom__caption {
    margin: 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.7;
}

html.is-rdx-layer-open,
body.is-rdx-layer-open,
html.is-rdx-zoom-open,
body.is-rdx-zoom-open {
    overflow: hidden;
}

@media (max-width: 1279px) {
    .rdx-layer__header {
        flex-direction: column;
    }

    .rdx-layer__header-side {
        width: 100%;
        flex: 0 0 auto;
    }

    .rdx-compare {
        grid-template-columns: 1fr;
    }

    .rdx-compare-card__head {
        min-height: 0;
    }
}

@media (max-width: 991px) {
    .rdx-layer__panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        border-radius: 16px;
    }

    .rdx-layer__header,
    .rdx-layer__body,
    .rdx-step-nav {
        padding-left: 20px;
        padding-right: 20px;
    }

    .rdx-book-grid,
    .rdx-topic-grid,
    .rdx-insight-box {
        grid-template-columns: 1fr;
    }

    .rdx-book-card {
        align-items: flex-start;
    }

    .rdx-step-nav__topic {
        font-size: 18px;
    }

    .rdx-compare-card__title {
        font-size: 21px;
    }

    .rdx-exam-link-box__head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .rdx-layer__title {
        font-size: 25px;
    }

    .rdx-step__title {
        font-size: 24px;
    }

    .rdx-step-indicator {
        flex-direction: column;
    }

    .rdx-step-nav__group {
        flex-direction: column;
        align-items: stretch;
    }

    .rdx-step-nav__topic {
        font-size: 20px;
    }

    .rdx-step-nav__actions {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .rdx-btn {
        width: 100%;
    }

    .rdx-book-card {
        flex-direction: column;
    }

    .rdx-book-card__thumb {
        width: 108px;
        flex: 0 0 auto;
    }

    .rdx-compare-card__head,
    .rdx-compare-card__body,
    .rdx-exam-link-boxes,
    .rdx-compare-card__thumb,
    .rdx-insight-box.rdx-insight-box--inside {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rdx-exam-link-box__title {
        font-size: 16px;
    }
}

@media (max-width: 412px) {
    .rdx-layer__header,
    .rdx-layer__body,
    .rdx-step-nav {
        padding-left: 14px;
        padding-right: 14px;
    }

    .rdx-layer__title {
        font-size: 22px;
    }

    .rdx-step__title {
        font-size: 22px;
    }

    .rdx-step-nav__topic {
        font-size: 18px;
    }

    .rdx-layer__close {
        width: 40px;
        min-width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .rdx-insight-box.rdx-insight-box--inside {
        padding-left: 14px;
        padding-right: 14px;
    }
}


.rdx-step-nav__group[data-step-actions="3"] .rdx-step-nav__topic {
    color: #eb7272;
}