/* Optical Illusion (/optical-illusion): what is its own - the canvas stage, the illusion tiles and the fields. The
   accent comes from the app kit (css/app-kit, docs/app-kit.md); the sliders and the photo samples are the shared app
   controls. Loaded only on this app's page (StylePaths). The stage is the canvas's own box, not the kit's padded
   .ak-stage column; the phone layout is the shared one for canvas apps in landing/seo-pages.css. */

.optical-illusion-landing-app {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.filter-landing-stage.optical-illusion-landing-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
    overflow: hidden;
    box-shadow: none;
}

.optical-illusion-landing-canvas {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
}

body.filter-app-mode .optical-illusion-landing-app > .filter-landing-stage,
body.filter-app-mode .filter-landing-stage.optical-illusion-landing-stage {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    aspect-ratio: auto;
}

.optical-illusion-landing-controls [hidden] {
    display: none !important;
}

.optical-illusion-landing-canvas {
    touch-action: none;
}

.optical-illusion-landing-canvas.is-dragging {
    cursor: grabbing !important;
}

.optical-illusion-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.optical-illusion-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 6px;
}

.optical-illusion-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    padding: 4px;
    border: 1px solid rgba(20, 24, 32, 0.14);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.optical-illusion-tile canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: #e9e7e2;
}

.optical-illusion-tile span {
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.optical-illusion-tile:hover,
.optical-illusion-tile:focus-visible {
    border-color: #2a78ef;
}

.optical-illusion-tile.is-active {
    border-color: #2a78ef;
    box-shadow: 0 0 0 2px rgba(42, 120, 239, 0.35);
}

.dark .optical-illusion-tile {
    border-color: rgba(255, 255, 255, 0.16);
    background: #1d2230;
}

body.filter-app-mode .optical-illusion-landing-canvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
