:root {
    --rz-cz-ink: #11192e;
    --rz-cz-muted: #748096;
    --rz-cz-line: #e6ebf2;
    --rz-cz-purple: #666bea;
    --rz-cz-gap: 12px;
    --rz-cz-font: "Pretendard Variable", Pretendard, NanumSquare, "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --rz-cz-ease: cubic-bezier(.2,.72,.2,1);
}

.rz-cz-preview,
.rz-cz-preview *,
.rz-cz-backdrop,
.rz-cz-backdrop * {
    box-sizing: border-box;
}

.rz-cz-preview {
    min-height: 56vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 24px;
    text-align: center;
    font-family: var(--rz-cz-font);
}

.rz-cz-preview-label {
    margin-bottom: 10px;
    color: var(--rz-cz-purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
}

.rz-cz-preview h2 {
    margin: 0;
    color: var(--rz-cz-ink);
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.04;
    letter-spacing: -.045em;
    font-weight: 900;
}

.rz-cz-preview p {
    margin: 14px 0 26px;
    color: var(--rz-cz-muted);
    font-size: 15px;
}

.rz-cz-preview-button {
    all: unset !important;
    box-sizing: border-box !important;
    min-height: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 0 24px !important;
    border-radius: 999px !important;
    background: #20263a !important;
    color: #fff !important;
    font: 900 15px/1 var(--rz-cz-font) !important;
    cursor: pointer !important;
    box-shadow: 0 12px 28px rgba(20, 27, 49, .18) !important;
    transition: transform .18s var(--rz-cz-ease), box-shadow .18s var(--rz-cz-ease) !important;
}

.rz-cz-preview-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 34px rgba(20, 27, 49, .24) !important;
}

.rz-cz-preview-button:active {
    transform: translateY(0) scale(.98) !important;
}

.rz-cz-preview-button svg,
.rz-cz-card-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rz-cz-backdrop {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: none;
    place-items: center;
    padding: 15px;
    background: rgba(21, 29, 47, .62);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    font-family: var(--rz-cz-font);
}

.rz-cz-backdrop.is-open {
    display: grid;
}

.rz-cz-dialog {
    width: min(1320px, calc(100vw - 40px));
    height: min(730px, calc(100vh - 30px));
    display: grid;
    grid-template-rows: 78px minmax(0, 1fr) 46px;
    overflow: hidden;
    outline: 0;
    border: 0;
    border-radius: 28px;
    background: radial-gradient(circle at 92% 0%, rgba(109, 117, 230, .05), transparent 25%), #fff;
    box-shadow: 0 0 0 1px rgba(226, 231, 240, .96), 0 38px 96px rgba(12, 20, 38, .28);
}

.rz-cz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--rz-cz-line);
}

.rz-cz-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.rz-cz-brand-icon {
    display: block;
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px;
    border: 0 !important;
    box-shadow: none !important;
}

.rz-cz-brand-copy strong {
    display: block;
    margin: 0;
    color: #10182d;
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.035em;
    font-weight: 900;
}

.rz-cz-brand-copy p {
    margin: 6px 0 0;
    color: #7a8599;
    font-size: 12px;
    white-space: nowrap;
}

.rz-cz-icon-button {
    all: unset !important;
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #20283e !important;
    cursor: pointer !important;
    box-shadow: 0 0 0 1px #dde3ec, 0 8px 20px rgba(31, 42, 66, .075) !important;
    transition: transform .18s var(--rz-cz-ease), color .18s var(--rz-cz-ease), background .18s var(--rz-cz-ease), box-shadow .18s var(--rz-cz-ease) !important;
}

.rz-cz-icon-button svg {
    display: block;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.rz-cz-close {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    border-radius: 50% !important;
}

.rz-cz-close:hover {
    color: var(--rz-cz-purple) !important;
    background: #f7f8ff !important;
    transform: scale(1.06) !important;
    box-shadow: 0 0 0 1px #ccd3f5, 0 12px 25px rgba(68, 77, 176, .14) !important;
}

.rz-cz-close:active {
    transform: scale(.94) !important;
}

.rz-cz-main {
    min-height: 0;
    display: grid;
    grid-template-rows: 92px minmax(0, 1fr);
    padding: 0 24px 12px;
}

.rz-cz-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 16px 8px;
}

.rz-cz-intro h2 {
    margin: 0;
    color: #11192e;
    font-size: 37px;
    line-height: 1.12;
    letter-spacing: -.045em;
    font-weight: 900;
}

.rz-cz-intro h2 em {
    color: var(--rz-cz-purple);
    font-style: normal;
}

.rz-cz-intro p {
    margin: 10px 0 0;
    color: #748096;
    font-size: 14px;
    line-height: 1.4;
}

.rz-cz-service-frame {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: stretch;
    padding: 18px 18px 20px;
    border-radius: 26px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafd 100%);
    box-shadow: inset 0 0 0 1px #e7ebf2, inset 0 1px 0 rgba(255, 255, 255, .96);
}

.rz-cz-track {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--rz-cz-gap) * 4)) / 5);
    gap: var(--rz-cz-gap);
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0 6px;
}

.rz-cz-track::-webkit-scrollbar {
    display: none;
}

.rz-cz-card {
    --rz-cz-body: #fff;
    --rz-cz-visual: #fff;
    position: relative;
    min-width: 0;
    height: 100%;
    min-height: 444px;
    display: grid;
    grid-template-rows: 246px minmax(0, 1fr);
    overflow: hidden;
    isolation: isolate;
    scroll-snap-align: start;
    border: 1px solid #dbe3ee !important;
    border-radius: 24px;
    background: var(--rz-cz-body);
    box-shadow: 0 9px 22px rgba(24, 37, 64, .065);
    transition: transform .22s var(--rz-cz-ease), box-shadow .22s var(--rz-cz-ease), border-color .22s var(--rz-cz-ease);
}

.rz-cz-card:hover,
.rz-cz-card.is-hovered {
    transform: translateY(-6px);
    border-color: #cfd7e4 !important;
    box-shadow: 0 18px 34px rgba(24, 37, 64, .13);
}

.rz-cz-card-visual {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--rz-cz-visual);
}

.rz-cz-card-visual::after {
    content: "";
    position: absolute;
    z-index: 3;
    left: -10%;
    right: -10%;
    bottom: -39px;
    height: 76px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: var(--rz-cz-body);
    box-shadow: 0 -1px 0 rgba(219, 227, 238, .55);
}

.rz-cz-art-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    transition: transform .28s var(--rz-cz-ease), filter .28s var(--rz-cz-ease);
}

.rz-cz-card:hover .rz-cz-art-wrap,
.rz-cz-card.is-hovered .rz-cz-art-wrap {
    transform: scale(1.025);
    filter: saturate(1.04);
}

.rz-cz-art {
    display: block !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rz-cz-deco {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.rz-cz-card-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    background: var(--rz-cz-body);
}

.rz-cz-card-body h3 {
    margin: 0 0 8px;
    color: #11192e;
    text-align: center;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -.025em;
    font-weight: 900;
}

.rz-cz-card-body p {
    min-height: 58px;
    margin: 0 0 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #637086;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.48;
}

.rz-cz-card-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 48px !important;
    margin-top: auto !important;
    padding: 0 15px !important;
    border: 1px solid #d9e0ea !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #11192e !important;
    text-decoration: none !important;
    font: 900 13.5px/1 var(--rz-cz-font) !important;
    box-shadow: 0 5px 13px rgba(33, 45, 71, .07) !important;
    transition: transform .18s var(--rz-cz-ease), color .18s var(--rz-cz-ease), background .18s var(--rz-cz-ease), border-color .18s var(--rz-cz-ease), box-shadow .18s var(--rz-cz-ease) !important;
}

.rz-cz-card-link svg {
    transition: transform .18s var(--rz-cz-ease);
}

.rz-cz-card-link:hover,
.rz-cz-card-link.is-hovered {
    transform: translateY(-2px) !important;
    border-color: #11192e !important;
    background: #11192e !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(17, 25, 46, .18) !important;
}

.rz-cz-card-link:hover svg,
.rz-cz-card-link.is-hovered svg {
    transform: translateX(4px);
}

.rz-cz-card-link:active,
.rz-cz-card-link.is-pressed {
    transform: translateY(0) scale(.985) !important;
    box-shadow: 0 3px 8px rgba(17, 25, 46, .16) !important;
}

.rz-cz-card-link:focus-visible,
.rz-cz-icon-button:focus-visible {
    outline: 3px solid rgba(102, 107, 234, .42) !important;
    outline-offset: 3px !important;
}

/* PingPong App */
.rz-cz-card-app {
    --rz-cz-visual: linear-gradient(145deg, #ffdc34, #f6ca17);
    --rz-cz-body: #fff8e4;
}

.rz-cz-card-app .rz-cz-art-wrap::before {
    content: "";
    position: absolute;
    width: 142px;
    height: 142px;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(255, 235, 52, .85), rgba(245, 153, 17, .72));
    box-shadow: 0 17px 30px rgba(139, 94, 0, .16);
}

.rz-cz-card-app .rz-cz-art {
    position: relative;
    z-index: 2;
    width: 126px !important;
    height: 126px !important;
    object-fit: contain;
}

.rz-cz-card-app .rz-cz-deco-a {
    top: 27px;
    left: 24px;
    width: 52px;
    height: 52px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .78) 1.5px, transparent 1.8px);
    background-size: 9px 9px;
}

.rz-cz-card-app .rz-cz-deco-b {
    top: 17px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
}

.rz-cz-card-app .rz-cz-deco-c {
    left: 16px;
    bottom: 25px;
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
}

/* Python */
.rz-cz-card-python {
    --rz-cz-visual: #07111f;
    --rz-cz-body: #f4f6fb;
    border-color: #d7dfea !important;
}

.rz-cz-card-python .rz-cz-card-visual {
    background:
        radial-gradient(circle at 74% 12%, rgba(32, 101, 240, .28), transparent 23%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 25px),
        linear-gradient(180deg, #06101e 0%, #081321 100%);
}

.rz-cz-card-python .rz-cz-card-visual::before {
    content: "";
    position: absolute;
    left: -12%;
    right: -12%;
    bottom: 2px;
    height: 32px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
}

.rz-cz-card-python .rz-cz-art {
    width: 164px !important;
    height: 164px !important;
    object-fit: contain;
}

/* G-Quiz */
.rz-cz-card-quiz {
    --rz-cz-visual: #fff;
    --rz-cz-body: #fbfcff;
}

.rz-cz-card-quiz .rz-cz-art {
    width: 178px !important;
    height: auto !important;
}

.rz-cz-card-quiz .rz-cz-deco-a,
.rz-cz-card-quiz .rz-cz-deco-b,
.rz-cz-card-quiz .rz-cz-deco-c {
    color: #edf1f6;
    font-weight: 900;
    line-height: 1;
}

.rz-cz-card-quiz .rz-cz-deco-a::before {
    content: "?";
    font-size: 58px;
}

.rz-cz-card-quiz .rz-cz-deco-a {
    top: 22px;
    left: 22px;
}

.rz-cz-card-quiz .rz-cz-deco-b::before {
    content: "?";
    font-size: 40px;
}

.rz-cz-card-quiz .rz-cz-deco-b {
    right: 20px;
    bottom: 34px;
}

.rz-cz-card-quiz .rz-cz-deco-c {
    left: 26px;
    bottom: 29px;
    width: 28px;
    height: 15px;
    border-left: 7px solid #edf1f6;
    border-bottom: 7px solid #edf1f6;
    transform: rotate(-45deg);
}

/* Group Wizard */
.rz-cz-card-wizard {
    --rz-cz-visual: linear-gradient(145deg, #ffdb32, #f7ca17);
    --rz-cz-body: #fff3c8;
}

.rz-cz-card-wizard .rz-cz-art {
    width: 178px !important;
    height: auto !important;
}

/* Land */
.rz-cz-card-land {
    --rz-cz-visual: #c7f1df;
    --rz-cz-body: #e8f9f1;
}

.rz-cz-card-land .rz-cz-art-wrap {
    overflow: hidden;
}

.rz-cz-card-land .rz-cz-art {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 46% 50% !important;
}

.rz-cz-nav {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    position: absolute !important;
    z-index: 6 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-radius: 50% !important;
    color: #5964da !important;
}

.rz-cz-nav:hover {
    color: #fff !important;
    background: var(--rz-cz-purple) !important;
    transform: translateY(-50%) scale(1.07) !important;
    box-shadow: 0 0 0 1px var(--rz-cz-purple), 0 13px 26px rgba(69, 77, 184, .24) !important;
}

.rz-cz-nav:active {
    transform: translateY(-50%) scale(.94) !important;
}

.rz-cz-prev {
    left: -24px !important;
}

.rz-cz-next {
    right: -24px !important;
}

.rz-cz-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 24px;
    border-top: 1px solid var(--rz-cz-line);
    color: #7f899d;
    font-size: 12px;
}

.rz-cz-footer-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--rz-cz-purple);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

a[href="#cube-zone"],
a[href$="/#cube-zone"],
.cube-zone-menu-trigger {
    cursor: pointer;
}

@media (max-width: 1180px) {
    .rz-cz-dialog {
        width: min(1120px, calc(100vw - 30px));
        height: min(760px, calc(100vh - 24px));
    }

    .rz-cz-track {
        grid-auto-columns: calc((100% - (var(--rz-cz-gap) * 3)) / 4);
    }
}

@media (max-width: 940px) {
    .rz-cz-dialog {
        height: min(760px, calc(100vh - 18px));
        grid-template-rows: 74px minmax(0, 1fr) 44px;
        border-radius: 24px;
    }

    .rz-cz-header {
        padding: 11px 18px;
    }

    .rz-cz-main {
        grid-template-rows: 84px minmax(0, 1fr);
        padding: 0 22px 14px;
    }

    .rz-cz-intro h2 {
        font-size: 31px;
    }

    .rz-cz-intro p {
        font-size: 13px;
    }

    .rz-cz-track {
        grid-auto-columns: calc((100% - var(--rz-cz-gap)) / 2);
    }
}

@media (max-width: 620px) {
    .rz-cz-backdrop {
        padding: 6px;
    }

    .rz-cz-dialog {
        width: 100%;
        height: auto;
        max-height: calc(100vh - 12px);
        grid-template-rows: 72px auto 44px;
        border-radius: 20px;
    }

    .rz-cz-header {
        padding: 11px 13px;
    }

    .rz-cz-brand {
        gap: 9px;
    }

    .rz-cz-brand-icon {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px;
    }

    .rz-cz-brand-copy strong {
        font-size: 21px;
    }

    .rz-cz-brand-copy p {
        max-width: 210px;
        font-size: 10px;
        white-space: normal;
    }

    .rz-cz-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .rz-cz-main {
        grid-template-rows: 100px auto;
        padding: 0 14px 12px;
        overflow-y: auto;
    }

    .rz-cz-intro {
        padding: 10px 5px;
    }

    .rz-cz-intro h2 {
        font-size: 25px;
    }

    .rz-cz-intro p {
        font-size: 11.5px;
    }

    .rz-cz-service-frame {
        width: 100%;
        height: auto;
        min-height: 0;
        align-self: start;
        overflow: hidden;
        padding: 14px;
        border-radius: 20px;
    }

    .rz-cz-track {
        grid-auto-columns: 100%;
        gap: 16px;
        align-items: start;
    }

    .rz-cz-card {
        height: auto;
        min-height: 0;
        align-self: start;
        grid-template-rows: 236px minmax(190px, auto);
    }

    .rz-cz-nav {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .rz-cz-prev {
        left: 3px !important;
    }

    .rz-cz-next {
        right: 3px !important;
    }

    .rz-cz-footer {
        padding: 0 14px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rz-cz-card,
    .rz-cz-art-wrap,
    .rz-cz-card-link,
    .rz-cz-card-link svg,
    .rz-cz-icon-button,
    .rz-cz-preview-button {
        transition: none !important;
    }
}
