:root {
    --finix-viewport-width: 100vw;
    --finix-viewport-height: 100dvh;
    --finix-viewport-aspect: 1;
    --finix-raster-density: 1;
}

html[data-finix-layout-mode="adaptive-resize"] #game-container,
html[data-finix-layout-mode="adaptive-resize"] #html-ui-layer,
html[data-finix-scene-layout="adaptive"] #game-container,
html[data-finix-scene-layout="adaptive"] #html-ui-layer {
    width: 100%;
    height: 100%;
    inset: 0;
    transform: none;
}

#rotate-device-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    box-sizing: border-box;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    place-items: center;
    color: #17263a;
    background: #f4eadf;
}

html[data-finix-surface="game"][data-finix-orientation="portrait"] #rotate-device-overlay {
    display: grid;
}

.rotate-device-content {
    width: min(100%, 420px);
    text-align: center;
}

.rotate-device-icon {
    font-size: clamp(48px, 12vw, 72px);
    line-height: 1;
    color: #df6f2c;
}

.rotate-device-content h1 {
    margin: 20px 0 8px;
    font-size: clamp(24px, 7vw, 36px);
}

.rotate-device-content p {
    margin: 0;
    font-size: clamp(16px, 4vw, 19px);
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
    #rotate-device-overlay *,
    #rotate-device-overlay *::before,
    #rotate-device-overlay *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
