/* ── Incognito mode ─────────────────────────────────────────────── */
/* A neutral ghost when off; fills with the theme accent when on. */
#incognito-toggle:disabled { opacity: 0.45; cursor: default; }
/* A dashed outline + corner badge in the accent: nothing here is being saved. */
.canvas-section { position: relative; }
/* Four edges, each growing along its own axis, so the dashes are revealed, not smeared by
   scaleX(); clockwise from the top-left, the OFF state retracting in reverse. */
/* Traces the viewport, not the image (a box round the picture read as a selection, user report).
   Sticky top-left, sized in px from --vp-w/--vp-h (a percentage resolves against the scrollable
   content); the negative margin cancels its height, so nothing moves. */
.incognito-frame {
    position: sticky;
    top: 0;
    left: 0;
    width: var(--vp-w, 100%);
    /* --vp-w lands a frame after a resize: a shrinking viewport (the panel sliding open) must not overflow. */
    max-width: 100%;
    height: var(--vp-h, 100%);
    margin-bottom: calc(-1 * var(--vp-h, 0px));
    /* The viewport is a flex column (layout/canvas/frame.css), so the frame is a flex item: without
       this it would be shrunk by an overflowing canvas and stop tracing the viewport. */
    flex: none;
    z-index: 6;
    pointer-events: none;
}
.ig-edge {
    position: absolute;
    --dash: repeating-linear-gradient(var(--ig-angle), var(--accent) 0 9px, transparent 9px 16px);
    background-image: var(--dash);
    transition: width var(--ig-draw, 170ms) ease-out var(--ig-delay, 0ms),
                height var(--ig-draw, 170ms) ease-out var(--ig-delay, 0ms);
}
.ig-t { top: 0; left: 0; height: 3px; width: 0; --ig-angle: 90deg; }
.ig-r { top: 0; right: 0; width: 3px; height: 0; --ig-angle: 180deg; }
.ig-b { bottom: 0; right: 0; height: 3px; width: 0; --ig-angle: 270deg; }
.ig-l { bottom: 0; left: 0; width: 3px; height: 0; --ig-angle: 0deg; }
/* Retract: the LAST edge drawn is the first to go. */
.ig-t { --ig-delay: 330ms; } .ig-r { --ig-delay: 220ms; }
.ig-b { --ig-delay: 110ms; } .ig-l { --ig-delay: 0ms; }
body.incognito-mode .ig-t { --ig-delay: 0ms; }
body.incognito-mode .ig-r { --ig-delay: 110ms; }
body.incognito-mode .ig-b { --ig-delay: 220ms; }
body.incognito-mode .ig-l { --ig-delay: 330ms; }
body.incognito-mode .ig-t, body.incognito-mode .ig-b { width: 100%; }
body.incognito-mode .ig-r, body.incognito-mode .ig-l { height: 100%; }

/* The "not saved" wording lives in the toolbar "?" bubble; the frame is the on-canvas marker. */
@media (prefers-reduced-motion: reduce) {
    .ig-edge { transition: none !important; }
}
