.main-content {
    display: flex;
    /* Canvas ↔ resizer ↔ panel: 4 + 8 (.panel-resizer) + 4 = 16px, as the desktop's. */
    gap: 4px;
    align-items: flex-start;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}
.canvas-section {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.canvas-viewport {
    overflow: auto;
    scrollbar-width: none;   /* its bars are the overlay ones (js/ui/canvas/scrollbars.js) */
    margin-top: 10px;
    border: 2px solid var(--border-canvas);
    max-width: 100%;
    /* The frame always takes every remaining pixel; ZoomPan.syncViewportHeight pins it in px, so a tall
       canvas scrolls inside it — these fill the box before that has run. */
    flex: 1 1 auto;
    min-height: 0;
    background: var(--bg-page);
    /* Column, not row: the sticky .incognito-frame must stay ABOVE the picture in flow. */
    display: flex;
    flex-direction: column;
    cursor: default;
    position: relative;
    /* Pan/pinch are ours (#wireTouch); no native gestures, and no iOS long-press menu. */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.canvas-container {
    position: relative;
    /* `margin: auto` collapses to 0 when there is no free space, so a zoomed canvas still scrolls to its
       top-left edge. */
    margin: auto;
    /* No shrinking: the viewport scrolls instead. A flex item sits on no baseline, so no descender gap. */
    flex: none;
}
#canvas-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
/* Golden frame on a server-stored project, on the viewport so the scroll overflow can't clip it. */
.canvas-viewport.remote-editing {
    border-color: var(--remote-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--remote-gold) 25%, transparent);
}
.coord-status {
    margin-top: 8px;
    font-family: monospace;
    font-size: 13px;
    color: var(--text-tooltip);
    padding: 6px 10px;
    background: var(--bg-tooltip);
    border: 1px solid var(--border-tooltip);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* One filled line's height reserved, so the bar never jumps when the readout empties. */
    min-height: calc(1.2em + 14px);
}
.drop-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 10px;
    background: var(--bg-drop-hint);
    border-radius: 4px;
    border: 1px dashed var(--border-hint);
}
