/*
 * Paper cursors. GENERATED by tools/cursors.mjs - do not edit.
 *
 * One class per tool. Each carries a 1x and a 2x image and an explicit
 * hotspot: without one the browser clicks from the top-left corner, which
 * for a pencil is well above where the point is.
 *
 * PNG rather than webp: Safari has historically refused webp cursors, and a
 * cursor that falls back silently is a hard bug to notice.
 *
 * Every rule ends in a real keyword, so a browser that rejects the image -
 * or the size - still shows something sensible.
 */
:root {
    --paper-cursor-kind: arrow;
    --cursor-default: image-set(url("/cursors/arrow-32.png") 1x, url("/cursors/arrow-64.png") 2x) 5 0, default;
    --cursor-text: image-set(url("/cursors/text-32.png") 1x, url("/cursors/text-64.png") 2x) 16 16, text;
    --cursor-pointer: image-set(url("/cursors/point-32.png") 1x, url("/cursors/point-64.png") 2x) 16 1, pointer;
    --cursor-grab: image-set(url("/cursors/open-32.png") 1x, url("/cursors/open-64.png") 2x) 16 16, grab;
    --cursor-grabbing: image-set(url("/cursors/closed-32.png") 1x, url("/cursors/closed-64.png") 2x) 16 16, grabbing;
    --cursor-move: image-set(url("/cursors/move-32.png") 1x, url("/cursors/move-64.png") 2x) 16 16, move;
    --cursor-resize: image-set(url("/cursors/resize-32.png") 1x, url("/cursors/resize-64.png") 2x) 16 16, nwse-resize;
    --cursor-forbidden: image-set(url("/cursors/forbidden-32.png") 1x, url("/cursors/forbidden-64.png") 2x) 16 16, not-allowed;
}

/*
 * The arrow is the page's default, not a class you opt into.
 *
 * :where() so it carries no specificity at all: every element that names
 * its own cursor - a button, a text field, the canvas mid-drag - still wins
 * without needing to know this rule exists.
 */
:where(html) {
    cursor: url("/cursors/arrow-32.png") 5 0, default;
    cursor: var(--cursor-default);
}

/* Native controls otherwise bring the operating-system cursors back. */
:where(a[href], button:not(:disabled), [role="button"], summary, select, label[for]) {
    --paper-cursor-kind: point;
    cursor: var(--cursor-pointer);
}
:where(button:disabled, [aria-disabled="true"]) {
    --paper-cursor-kind: forbidden;
    cursor: var(--cursor-forbidden);
}
:where(input, textarea, [contenteditable="true"]) {
    --paper-cursor-kind: text;
    cursor: var(--cursor-text);
}
:where(.viewport, .fan__sticker, .strewn__prop, .handle--rotate) {
    --paper-cursor-kind: open;
}
:where(.viewport:active, .fan__sticker:active, .strewn__prop--held, .handle--rotate:active) {
    --paper-cursor-kind: closed;
}
:where(.viewport--over, .viewport--over:active) { --paper-cursor-kind: move; }
:where(.handle--resize) { --paper-cursor-kind: resize; }
:where(.viewport--showing) { --paper-cursor-kind: arrow; }
/* CollageCanvas supplies its own animated eraser at this point. */
:where(.viewport--erasing, .viewport--erasing *) { --paper-cursor-kind: none; }

.cursor-arrow {
    --paper-cursor-kind: arrow;
    cursor: url("/cursors/arrow-32.png") 5 0, default;
    cursor: image-set(url("/cursors/arrow-32.png") 1x, url("/cursors/arrow-64.png") 2x) 5 0, default;
}

.cursor-eraser {
    --paper-cursor-kind: eraser;
    cursor: url("/cursors/eraser-32.png") 3 29, pointer;
    cursor: image-set(url("/cursors/eraser-32.png") 1x, url("/cursors/eraser-64.png") 2x) 3 29, pointer;
}

.cursor-text {
    --paper-cursor-kind: text;
    cursor: url("/cursors/text-32.png") 16 16, text;
    cursor: image-set(url("/cursors/text-32.png") 1x, url("/cursors/text-64.png") 2x) 16 16, text;
}

.cursor-comment {
    --paper-cursor-kind: comment;
    cursor: url("/cursors/comment-32.png") 3 29, pointer;
    cursor: image-set(url("/cursors/comment-32.png") 1x, url("/cursors/comment-64.png") 2x) 3 29, pointer;
}

.cursor-pencil {
    --paper-cursor-kind: pencil;
    cursor: url("/cursors/pencil-32.png") 16 31, crosshair;
    cursor: image-set(url("/cursors/pencil-32.png") 1x, url("/cursors/pencil-64.png") 2x) 16 31, crosshair;
}

.cursor-point {
    --paper-cursor-kind: point;
    cursor: url("/cursors/point-32.png") 16 1, pointer;
    cursor: image-set(url("/cursors/point-32.png") 1x, url("/cursors/point-64.png") 2x) 16 1, pointer;
}

.cursor-open {
    --paper-cursor-kind: open;
    cursor: url("/cursors/open-32.png") 16 16, grab;
    cursor: image-set(url("/cursors/open-32.png") 1x, url("/cursors/open-64.png") 2x) 16 16, grab;
}

.cursor-closed {
    --paper-cursor-kind: closed;
    cursor: url("/cursors/closed-32.png") 16 16, grabbing;
    cursor: image-set(url("/cursors/closed-32.png") 1x, url("/cursors/closed-64.png") 2x) 16 16, grabbing;
}

.cursor-move {
    --paper-cursor-kind: move;
    cursor: url("/cursors/move-32.png") 16 16, move;
    cursor: image-set(url("/cursors/move-32.png") 1x, url("/cursors/move-64.png") 2x) 16 16, move;
}

.cursor-resize {
    --paper-cursor-kind: resize;
    cursor: url("/cursors/resize-32.png") 16 16, nwse-resize;
    cursor: image-set(url("/cursors/resize-32.png") 1x, url("/cursors/resize-64.png") 2x) 16 16, nwse-resize;
}

.cursor-forbidden {
    --paper-cursor-kind: forbidden;
    cursor: url("/cursors/forbidden-32.png") 16 16, not-allowed;
    cursor: image-set(url("/cursors/forbidden-32.png") 1x, url("/cursors/forbidden-64.png") 2x) 16 16, not-allowed;
}

.cursor-agent-ready {
    --paper-cursor-kind: agent-ready;
    cursor: url("/cursors/agent-ready-32.png") 16 16, default;
    cursor: image-set(url("/cursors/agent-ready-32.png") 1x, url("/cursors/agent-ready-64.png") 2x) 16 16, default;
}

.cursor-agent-thinking {
    --paper-cursor-kind: agent-thinking;
    cursor: url("/cursors/agent-thinking-32.png") 16 16, wait;
    cursor: image-set(url("/cursors/agent-thinking-32.png") 1x, url("/cursors/agent-thinking-64.png") 2x) 16 16, wait;
}

.cursor-agent-working {
    --paper-cursor-kind: agent-working;
    cursor: url("/cursors/agent-working-32.png") 16 16, progress;
    cursor: image-set(url("/cursors/agent-working-32.png") 1x, url("/cursors/agent-working-64.png") 2x) 16 16, progress;
}
