@import url('/fonts/nanum-square-round/nanum-square-round.css');

.room-03 {
    --template-image-height-desktop: 345;
    --template-image-height-mobile: 265;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 76px 0 91px 0;
    color: #191919;
    background: #fff;
    font-family: var(--font-nanum-square-round);
}

.room-03 *,
.room-03 *::before,
.room-03 *::after {
    box-sizing: border-box;
}

.room-03-heading {
    position: relative;
    width: 72%;
    margin: 0 auto 64px;
    text-align: center;
}

.room-03-heading h2 {
    margin: 0;
    font-size: clamp(26px, 2.083vw, 40px);
    font-weight: 700;
    line-height: 1;
    overflow-wrap: anywhere;
}

.room-03-heading p {
    margin: 4px 0 0;
    font-size: 16px;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.room-03-stage {
    position: relative;
    height: var(--template-image-height, 460px);
    margin-bottom: 80px;
    touch-action: pan-y;
}

.room-03-slide {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 50%;
    /* 658 × 460 at a 1920px viewport; the shared image-height setting provides 460px. */
    width: calc(100% * 658 / 1920);
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) scale(calc(428 / 658), calc(300 / 460));
    transition: transform .5s ease, opacity .5s ease, visibility .5s;
}

.room-03-slide.is-active {
    z-index: 3;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.room-03-slide.is-previous {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    /* Centered scaling lifts the bottom by 80px; move down 24px for a 56px bottom offset. */
    transform: translate(calc(-50% - 24vw), calc(100% * 24 / 460)) scale(calc(428 / 658), calc(300 / 460));
}

.room-03-slide.is-next {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transform: translate(calc(-50% + 24vw), calc(100% * 24 / 460)) scale(calc(428 / 658), calc(300 / 460));
}

.room-03-slide[data-room-mirror] {
    transition: none;
}

.room-03.is-positioning .room-03-slide {
    transition: none;
}

.room-03-stage:focus-visible {
    outline: 2px solid #d7462c;
    outline-offset: 5px;
}

.room-03[data-room-count="1"] .room-03-captions {
    margin-bottom: 0;
}

.room-03-photo {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50% 50% 6px 6px / 72% 72% 6px 6px;
    background: #eee;
}

.room-03-slide.is-active .room-03-photo {
    box-shadow: 3px 4px 8px #0000001a;
}

.room-03-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-03-photo:focus-visible {
    outline: 3px solid #e66048;
    outline-offset: 5px;
}

.room-03-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 56px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #e66048;
    cursor: pointer;
}

.room-03-arrow.prev {
    left: 12.2%;
}

.room-03-arrow.next {
    right: 12.2%;
}

.room-03-arrow svg {
    display: block;
    width: 24px;
    height: 40px;
    fill: none;
    stroke: currentColor;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.room-03-arrow.next svg {
    transform: rotate(180deg);
}

.room-03-caption-panel {
    position: relative;
    z-index: 0;
    background: transparent;
    text-align: center;
}

.room-03-captions {
    margin: 0 0 22px;
}

.room-03-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.room-03-caption[hidden] {
    display: none;
}

.room-03-caption h3 {
    margin: 0;
    font-size: 24px;
    line-height: 24px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.room-03-caption p {
    margin: 0;
    font-size: 16px;
    line-height: 16px;
    overflow-wrap: anywhere;
}

.room-03-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.room-03-pages button {
    display: grid;
    align-items: center;
    width: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.room-03-pages span {
    height: 4px;
    border-radius: 8px;
    background: var(--room-pagination-color, #e66048);
    opacity: var(--room-pagination-opacity, .4);
}

.room-03-pages [aria-current="true"] span {
    background: var(--room-pagination-active-color, #e66048);
    opacity: var(--room-pagination-active-opacity, 1);
}

.room-03 button:focus-visible {
    outline: 2px solid #d7462c;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .room-03-slide {
        width: 47%;
    }

    .room-03-arrow.prev {
        left: 5%;
    }

    .room-03-arrow.next {
        right: 5%;
    }

    .room-03-heading {
        width: 78%;
    }

    .room-03-heading p {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .room-03-slide {
        transition: none;
    }
}

@media (min-width: 601px) {
    .room-03[data-room-count="2"] .room-03-arrow,
    .room-03[data-room-count="2"] .room-03-controls,
    .room-03[data-room-count="2"] [data-room-mirror] {
        display: none;
    }

    .room-03[data-room-count="2"] .room-03-stage {
        display: flex;
        justify-content: center;
        gap: var(--room-03-pair-gap);
    }

    .room-03[data-room-count="2"] .room-03-captions {
        display: flex;
        justify-content: center;
        gap: var(--room-03-pair-gap);
        align-items: flex-start;
        margin-bottom: 0;
    }

    .room-03[data-room-count="2"] [data-room-card] {
        position: relative;
        top: auto;
        left: auto;
        flex: 0 0 auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .room-03[data-room-count="2"] .room-03-photo {
        box-shadow: 3px 4px 8px #0000001a;
    }

    .room-03[data-room-count="2"] .room-03-caption {
        display: flex;
        flex: 0 0 calc(658 * var(--room-03-unit));
        flex-wrap: wrap;
    }

    .room-03 {
        --room-03-unit: min(1px, calc(100vw / 1440));
    }

    .room-03[data-image-height-root]:not([data-image-height]) {
        --template-image-height: calc(460 * var(--room-03-unit));
    }

    .room-03-slide {
        width: calc(658 * var(--room-03-unit));
    }

    .room-03-slide.is-previous {
        transform: translate(calc(-50% - 460.8 * var(--room-03-unit)), calc(100% * 24 / 460)) scale(calc(428 / 658), calc(300 / 460));
    }

    .room-03-slide.is-next {
        transform: translate(calc(-50% + 460.8 * var(--room-03-unit)), calc(100% * 24 / 460)) scale(calc(428 / 658), calc(300 / 460));
    }

    .room-03-heading h2 {
        font-size: clamp(26px, calc(40 * var(--room-03-unit)), 40px);
    }

    .room-03-arrow.prev {
        left: max(0px, calc(50% - 725.76 * var(--room-03-unit)));
    }

    .room-03-arrow.next {
        right: max(0px, calc(50% - 725.76 * var(--room-03-unit)));
    }

    .room-03[data-room-count="2"] {
        --room-03-pair-gap: calc(48 * var(--room-03-unit));
    }
}

@media (max-width: 600px) {
    .room-03-slide.is-previous {
        transform: translateX(calc(-50% - 64vw)) scale(.76);
    }

    .room-03-slide.is-next {
        transform: translateX(calc(-50% + 64vw)) scale(.76);
    }

    .room-03 > .template-stickers:has(> .template-sticker-repeat[data-sticker-mobile-pin-bottom="true"] > img[src*="/room-preview-footer-m.svg"]) {
        clip-path: inset(0 calc(960 * var(--template-layout-unit) - 50vw) -1px);
    }

    .room-03 > .template-stickers > .template-sticker-repeat[data-sticker-mobile-pin-bottom="true"]:has(> img[src*="/room-preview-footer-m.svg"])::after {
        content: '';
        position: absolute;
        inset: auto 0 -1px;
        height: 2px;
        background: #fff;
    }

    .room-03 {
        padding: 36px 0 20px;
    }

    .room-03-heading {
        width: calc(100% - 60px);
        margin-bottom: 30px;
    }

    .room-03-heading h2 {
        margin-bottom: 3px;
        font-size: 20px;
        line-height: 40px;
    }

    .room-03-heading p {
        width: min(100%, 260px);
        margin: 0 auto;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -.67px;
    }

    .room-03-stage {
        height: calc(209.73 * var(--template-mobile-unit));
        margin-bottom: 44px;
    }

    .room-03-slide {
        width: calc(300 * var(--template-mobile-unit));
    }

    .room-03-slide:not(.is-active) {
        opacity: 0;
        visibility: hidden;
    }

    .room-03-arrow {
        width: 44px;
        height: 44px;
    }

    .room-03-arrow svg {
        width: 13px;
        height: 20px;
    }

    .room-03-arrow.prev {
        left: 0;
    }

    .room-03-arrow.next {
        right: 0;
    }

    /*.room-03-captions {*/
    /*    margin: 0;*/
    /*}*/

    .room-03-caption:not([hidden]) {
        display: flex;
        flex-wrap: wrap;
        padding: 0 24px;
    }

    .room-03-caption h3 {
        font-size: 18px;
        line-height: 24px;
    }

    .room-03-caption p {
        font-size: 14px;
        line-height: 24px;
        letter-spacing: -.67px;
    }

    .room-03-pages {
        gap: 15px;
    }

    .room-03-pages button {
        position: relative;
        width: 24px;
    }

    .room-03-pages button::after {
        position: absolute;
        inset: -6px;
        content: '';
    }

    .room-03-pages span {
        height: 4px;
    }
}
