body.pcv2-open {
    overflow: hidden;
}

.pcv2 {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: none;
}

.pcv2[aria-hidden="false"] {
    display: block;
}

.pcv2__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 14, 18, 0.68);
}

.pcv2__dialog {
    position: absolute;
    inset: 3vh 3vw;
    width: 94vw;
    height: 94vh;
    margin: auto;
    background: #fbfbf8;
    color: #161616;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.pcv2__topbar,
.pcv2__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e7e3dc;
}

.pcv2__footer {
    border-top: 1px solid #e7e3dc;
    border-bottom: 0;
}

.pcv2__eyebrow {
    margin: 0 0 2px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c5b2d;
}

.pcv2 h2,
.pcv2 h3 {
    margin: 0;
    letter-spacing: 0;
}

.pcv2 h2 {
    font-size: 1.25rem;
}

.pcv2 h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
}

.pcv2__top-actions {
    display: flex;
    gap: 8px;
}

.pcv2__icon-btn,
.pcv2__toolstrip button,
.pcv2__stepper button {
    width: 38px;
    height: 38px;
    border: 1px solid #dad5cc;
    background: #fff;
    color: #1f1f1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pcv2__workspace {
    min-height: 0;
    display: grid;
    grid-template-columns: 65% 35%;
}

.pcv2__preview {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: #ece8df;
}

.pcv2__stage-shell {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.pcv2__stage {
    width: min(74vh, 78%);
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    outline: none;
}

.pcv2__frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 18px solid #171717;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.pcv2__frame--none {
    border-width: 0;
}

.pcv2__frame--black {
    border-color: #171717;
}

.pcv2__frame--gold {
    border-color: #c59b31;
    border-style: double;
}

.pcv2__frame--walnut {
    border-color: #6f4a2f;
}

.pcv2__frame--white {
    border-color: #f8f8f4;
}

.pcv2__frame--border-none {
    padding: 0;
}

.pcv2__frame--border-white {
    padding: 20px;
}

.pcv2__frame--border-cream {
    padding: 20px;
    background: #f3ead9;
}

.pcv2__frame--border-black {
    padding: 20px;
    background: #161616;
}

.pcv2__image {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    display: none;
    user-select: none;
    pointer-events: none;
}

.pcv2__empty {
    position: absolute;
    inset: 0;
    border: 0;
    background: #f7f5ef;
    color: #3a3a36;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    cursor: pointer;
}

.pcv2__empty i {
    font-size: 2rem;
}

.pcv2__toolstrip {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
}

.pcv2__toolstrip button {
    width: auto;
    min-width: 74px;
    gap: 6px;
    padding: 0 12px;
    font-weight: 700;
}

.pcv2__panel {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 14px;
    border-left: 1px solid #e1ddd5;
    background: #fff;
}

.pcv2__card {
    border-bottom: 1px solid #ece8df;
    padding: 12px 0;
}

.pcv2__card:first-child {
    padding-top: 0;
}

.pcv2__card--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pcv2__wide-btn,
.pcv2__footer button {
    min-height: 40px;
    border: 1px solid #171717;
    background: #fff;
    color: #171717;
    font-weight: 800;
    cursor: pointer;
    padding: 0 14px;
}

.pcv2__wide-btn {
    width: 100%;
    margin-top: 10px;
}

.pcv2__wide-btn--primary,
.pcv2__footer button:last-child {
    background: #171717;
    color: #fff;
}

.pcv2__muted {
    margin: 8px 0 0;
    color: #6e6e68;
    font-size: 0.78rem;
}

.pcv2__segmented,
.pcv2__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.pcv2__choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pcv2__choice {
    min-height: 42px;
    border: 1px solid #ddd7ce;
    background: #fff;
    color: #1d1d1b;
    cursor: pointer;
    padding: 8px;
    font-size: 0.76rem;
    font-weight: 800;
}

.pcv2__choice.is-active {
    border-color: #171717;
    background: #f4f0e8;
}

.pcv2__stepper {
    display: grid;
    grid-template-columns: 38px 54px 38px;
    gap: 6px;
}

.pcv2__stepper input {
    border: 1px solid #dad5cc;
    text-align: center;
    font-weight: 800;
}

.pcv2__summary {
    margin: 10px 0 0;
}

.pcv2__summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.pcv2__summary dt {
    color: #6d6d66;
}

.pcv2__summary dd {
    margin: 0;
    font-weight: 800;
}

.pcv2__footer span {
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
}

.pcv2__footer small {
    color: #64645f;
}

@media (max-width: 900px) {
    .pcv2__dialog {
        inset: 0;
        width: 100vw;
        height: 100dvh;
    }

    .pcv2__workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 42vh minmax(0, 1fr);
    }

    .pcv2__panel {
        border-left: 0;
        border-top: 1px solid #e1ddd5;
        padding-bottom: 96px;
    }

    .pcv2__stage {
        width: min(52vh, 74vw);
    }

    .pcv2__toolstrip {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .pcv2__footer {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

@media (max-width: 520px) {
    .pcv2__topbar {
        padding: 10px 12px;
    }

    .pcv2__topbar h2 {
        font-size: 1rem;
    }

    .pcv2__workspace {
        grid-template-rows: 38vh minmax(0, 1fr);
    }

    .pcv2__choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcv2__toolstrip button span {
        display: none;
    }

    .pcv2__toolstrip button {
        min-width: 42px;
    }
}
