/* Extracted from page-diy.php; selectors intentionally preserve the existing DIY state classes. */
@media (width < 769px) {
    html.diy-mobile-preflight,
html.diy-mobile-preflight body {
        width: 100%;
        min-height: var(--diy-real-vh, var(--diy-viewport-height, 100svh));
        margin: 0;
        overflow: hidden;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    html.diy-mobile-preflight .diy-container {
        --diy-safe-top: max(env(safe-area-inset-top, 0px), var(--diy-mobile-top-guard, 0px));
        --diy-bracelet-target-size: var(--diy-initial-bracelet-target-size, 250px);
        display: grid !important;
        grid-template-areas: none !important;
        grid-template-rows: max-content minmax(0,1fr) auto !important;
        height: var(--diy-real-vh,100dvh) !important;
        min-height: 0 !important;
        position: fixed !important;
        top: var(--diy-shell-top,0px) !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    html.diy-mobile-preflight .diy-workspace {
        display: grid;
        grid-row: 2;
        grid-template-columns: minmax(0,1fr);
        grid-template-rows: var(--diy-stage-row-h,326px) max-content max-content var(--diy-selector-target-height,212px);
        min-height: 0;
        min-width: 0;
        overflow: auto;
    }
    /* The render-blocking DIY stylesheet owns header geometry during preflight too. */

    html.diy-mobile-preflight .diy-stage-shell {
        height: var(--diy-stage-row-h, 226px) !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: flex !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    html.diy-mobile-preflight .diy-canvas-area {
        display: grid !important;
        place-items: center !important;
        height: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    html.diy-mobile-preflight #zoom-wrapper {
        display: inline-block !important;
        width: fit-content !important;
        height: fit-content !important;
        margin: 0 auto !important;
        transition: none !important;
        transform: translate3d(0, 0, 0) scale(0.92) !important;
        transform-origin: center center !important;
    }

    html.diy-mobile-preflight .diy-container.is-product-entry-mode #zoom-wrapper {
        transform: translate3d(0, 0, 0) scale(0.92) !important;
    }

    html.diy-mobile-preflight .bracelet {
        width: var(--diy-bracelet-target-size, 250px) !important;
        height: var(--diy-bracelet-target-size, 250px) !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 auto !important;
        transition: none !important;
        transform-origin: center center !important;
    }

    html.diy-mobile-preflight .bracelet-ring,
html.diy-mobile-preflight .bracelet-ring-image {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }

    html.diy-mobile-preflight .brand-watermark {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    html.diy-mobile-preflight .diy-reference-quickbar{
        height: var(--diy-quickbar-row-h, 44px) !important;
        min-height: var(--diy-quickbar-row-h, 44px) !important;
        box-sizing: border-box !important;
    }

    html.diy-mobile-preflight .theme-shortcut-chip--anchor {
        display: none !important;
    }

    html.diy-mobile-preflight .diy-selector-area {
        height: var(--diy-selector-target-height, 232px) !important;
        min-height: var(--diy-selector-target-height, 232px) !important;
        max-height: var(--diy-selector-target-height, 232px) !important;
        overflow: hidden !important;
    }

    html.diy-mobile-preflight .diy-footer-bar {
        position: relative !important;
        grid-row: 3 !important;
        min-height: calc(var(--diy-footer-base-height,2.5rem) + 1px + env(safe-area-inset-bottom,0px)) !important;

        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        z-index: 10030 !important;
        box-sizing: border-box !important;

    }
}
