/* M.C. Escher landing (/mc-escher)
   Shared controls live in apps.css */

.filter-landing-stage.mc-escher-landing-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(20, 20, 20, 0.22);
    outline: 2px solid #2a2a2a;
    outline-offset: 0;
    touch-action: manipulation;
}

.mc-escher-landing-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: manipulation;
}

.mc-escher-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0;
}

.mc-escher-actions {
    flex-wrap: wrap;
    gap: 6px;
}

.mc-escher-edit-hint {
    margin: 0 0 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.75;
}

.mc-escher-landing-canvas.is-editing {
    cursor: crosshair;
    touch-action: none;
}

body.filter-app-mode .mc-escher-landing-app {
    align-items: stretch;
    min-height: 0;
}

body.filter-app-mode .mc-escher-landing-app > .filter-landing-stage,
body.filter-app-mode .filter-landing-stage.mc-escher-landing-stage {
    align-self: stretch;
    height: 100%;
    max-height: none;
    min-height: 0;
    aspect-ratio: auto;
    place-items: center;
    overflow: hidden;
    outline: none;
    box-shadow: none;
}

body.filter-app-mode .mc-escher-landing-canvas {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    outline: 2px solid #2a2a2a;
    box-shadow: 0 16px 36px rgba(20, 20, 20, 0.22);
}

@media (max-width: 960px) {
body.filter-app-mode .mc-escher-landing-app {
        align-items: stretch;
        grid-template-rows: auto minmax(0, 1fr);
    }

body.filter-app-mode .mc-escher-landing-app > .filter-landing-controls {
        max-height: none;
        height: auto;
        min-height: 0;
        align-self: stretch;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

body.filter-app-mode .mc-escher-landing-app > .filter-landing-stage,
    body.filter-app-mode .filter-landing-stage.mc-escher-landing-stage {
        align-self: start;
        justify-self: stretch;
        width: 100%;
        height: auto;
        max-height: min(46vh, 100%);
        min-height: 0;
        aspect-ratio: 4 / 3;
        place-items: stretch;
    }

body.filter-app-mode .mc-escher-landing-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}
