/* Compass-and-straightedge constructions (/compass-straightedge-constructions): the construction fills a focus stage, with the
   tools in a row above it and the five tiles in the floating panel beside it (docs/app-kit.md). Tiles, panels and buttons
   come from the app kit (css/app-kit, docs/app-kit.md). Loaded only on this app's page (StylePaths). */

/* The tools: one row of icon buttons above the picture, centred; the words show where there is room. */
.cse-landing-app .cse-tools {
    align-self: center;
    justify-content: center;
    margin-top: var(--ak-space-2, 0.5rem);
}

.cse-landing-app .cse-tool {
    padding: 0.25rem 0.55rem;
    min-width: 2.5rem;
    min-height: 2.25rem;
}

.cse-landing-app .cse-tool svg {
    flex: 0 0 auto;
}

.cse-landing-app .cse-tool-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@container (min-width: 1000px) {
    .cse-landing-app .cse-tool-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
}

/* Tap, drag and draw on the picture; the script sets the cursor. No scrolling or zooming while a finger draws. */
.cse-landing-app .cse-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.cse-landing-app .cse-canvas:focus-visible {
    outline: 2px solid var(--ak-accent, #2563eb);
    outline-offset: -2px;
}

/* The construction's name can be long: it wraps in its tile instead of shrinking to nothing. */
.cse-landing-app .cse-name {
    font-size: var(--ak-fs-sm, 0.875rem);
    line-height: 1.25;
    white-space: normal;
}

.cse-landing-app .ak-row[hidden] {
    display: none;
}

/* Phones: a square picture. */
@media (max-width: 640px) {
    .cse-landing-app .cse-canvas {
        aspect-ratio: 1 / 1;
    }

    .cse-landing-app .cse-tool {
        padding: 0.2rem 0.35rem;
        min-width: 2.3rem;
    }

    /* Under the picture on phones: the folded stats button and the zoom buttons sit in its top corners. */
    .cse-landing-app .cse-tools {
        order: 2;
        margin: 0 auto var(--ak-space-2, 0.5rem);
    }
}
