/* ============================================================
   LOOKASAURUS - STYLE (supplements common.css + Tailwind)
   ============================================================ */

/* Header dino sticker: placed by hand, slightly crooked */
.header-logo {
    --sticker-tilt: 3deg;
    transform: rotate(var(--sticker-tilt));
}

/* The note above the sheet, when a file cannot be opened or exported */
.import-note {
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--status-error);
    text-align: center;
}

/* The label over the document carries the file's name; a long one is cut short */
#viewer-label {
    display: block !important;
    max-width: calc(100% - 2rem);
    line-height: calc(2em + 0.5rem) !important;   /* one line, centered on the whole label like the others */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   THE DOCUMENT
   The Markdown file as a page on cream paper. Tailwind clears the browser's own styles for
   headings, lists and tables, so each is set here. Words are in the body font at reading
   size, headings in the typewriter face, and code in the terminal font.
   ============================================================ */

.md-view {
    padding: 1.5rem 1.75rem;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    overflow-wrap: break-word;
    min-height: 220px;
}

/* A comfortable line length, however wide the folder is */
.md-view > * {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
}

.md-view > :first-child { margin-top: 0; }
.md-view > :last-child  { margin-bottom: 0; }

.md-view h1,
.md-view h2,
.md-view h3,
.md-view h4,
.md-view h5,
.md-view h6 {
    font-family: var(--font-display);
    color: var(--ink-900);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-display);
    margin-top: 1.6em;
    margin-bottom: 0.5em;
    scroll-margin-top: 1rem;
}

.md-view h1 { font-size: var(--text-xl); padding-bottom: 0.3em; border-bottom: 1px solid var(--ink-a20); }
.md-view h2 { font-size: var(--text-lg); padding-bottom: 0.25em; border-bottom: 1px solid var(--ink-a10); }
.md-view h3 { font-size: var(--text-md); }
.md-view h4,
.md-view h5,
.md-view h6 { font-size: var(--text-base); }
.md-view h6 { color: var(--ink-a70); }

.md-view p,
.md-view ul,
.md-view ol,
.md-view blockquote,
.md-view pre,
.md-view .md-table-wrap {
    margin-top: 0;
    margin-bottom: 1em;
}

.md-view strong { font-weight: 600; }
.md-view em { font-style: italic; }
.md-view del { color: var(--ink-a60); }

/* Links are underlined ink: on this desk green means "press me" and belongs to the buttons */
.md-view a {
    color: var(--ink-900);
    text-decoration: underline;
    text-decoration-color: var(--ink-a40);
    text-underline-offset: 2px;
}

.md-view a:hover {
    text-decoration-color: var(--ink-900);
}

/* Lists */
.md-view ul,
.md-view ol {
    padding-left: 1.6em;
}

.md-view ul { list-style: disc; }
.md-view ol { list-style: decimal; }
.md-view ul ul { list-style: circle; }
.md-view ul ul ul { list-style: square; }

.md-view li { margin: 0.25em 0; }

.md-view li > ul,
.md-view li > ol {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

/* Task lists: the tick boxes are for reading, not for pressing */
.md-view li > input[type="checkbox"] {
    margin-right: 0.4em;
    accent-color: var(--green);
}

.md-view li:has(> input[type="checkbox"]) {
    list-style: none;
    margin-left: -1.3em;
}

/* Quotes */
.md-view blockquote {
    padding: 0.1em 0 0.1em 1em;
    border-left: 3px solid var(--ink-a30);
    color: var(--ink-a70);
}

.md-view blockquote > :last-child { margin-bottom: 0; }

/* Code */
.md-view code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: var(--radius-sm);
    background: var(--ink-a10);
}

.md-view pre {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--ink-a20);
    background: rgba(69, 26, 3, 0.06);
    overflow-x: auto;
    line-height: 1.5;
}

.md-view pre code {
    padding: 0;
    background: none;
    font-size: var(--text-sm);
    white-space: pre;
}

/* Tables */
.md-view .md-table-wrap {
    overflow-x: auto;
}

.md-view table {
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.md-view th,
.md-view td {
    padding: 0.4em 0.75em;
    border: 1px solid var(--ink-a20);
    text-align: left;
    vertical-align: top;
}

.md-view th {
    font-weight: 600;
    background: var(--ink-a10);
}

/* Rules and pictures */
.md-view hr {
    border: 0;
    border-top: 1px solid var(--ink-a30);
    margin-top: 1.75em;
    margin-bottom: 1.75em;
}

.md-view img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* A picture that lives on another site is not fetched; its description stands in */
.md-view .md-missing-image {
    font-size: var(--text-sm);
    color: var(--ink-a60);
}

@media (max-width: 768px) {
    .md-view {
        padding: 1rem;
    }
}

/* ============================================================
   OTHER FILES — an HTML page, the pages of a PDF, an SVG picture
   ============================================================ */

.file-view {
    padding: 1rem;
    min-height: 220px;
    text-align: center;
}

/* An HTML page in its sealed frame, on white: web pages are written for a white window */
.file-view .html-frame {
    display: block;
    width: 100%;
    height: 70vh;
    min-height: 320px;
    border: 1px solid var(--ink-a20);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

/* A PDF's pages: white sheets one under the other, each with the sheet shadow */
.file-view .pdf-page {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
    background: #ffffff;
    border: 1px solid var(--ink-a20);
    box-shadow: var(--shadow-sheet);
}

.file-view .pdf-page:last-child {
    margin-bottom: 0;
}

/* An SVG, PNG or JPG picture, as large as the sheet allows and no taller than the window */
.file-view .svg-picture {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 75vh;
    min-width: min(16rem, 100%);   /* a picture with no size of its own still shows */
    height: auto;
}

/* The frame a document is printed from: on the page, so the browser will print it, but no size */
.print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 0;
}

/* ============================================================
   CONTROLS — Create Mode and Export As
   ============================================================ */

/* A cream button that is switched on wears the green, like a toggle's chosen side: Create Mode
   while it is on, and the brush in hand */
button.btn-cream.is-on,
button.btn-cream.is-on:hover {
    background: var(--green);
    color: var(--on-green);
    border-color: var(--green);
    box-shadow: var(--shadow-sheet-dark);
}

/* An open menu is lifted off the paper, so its row rises above everything near it in the panel */
.panel-buttons:has(#export-menu:not(.hidden)) {
    position: relative;
    z-index: 50;
}

/* The Export As menu is the same paper as the key menu on the other tools: solid cream, thin ink
   edge, as wide as its longest line and opening from the button's right edge */
.export-menu {
    right: 0;
    width: max-content;
    min-width: 100%;
    background: var(--paper-cream);
    border-color: rgba(69, 26, 3, 0.25);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-paper-lift);
}

/* The name box, asked after a form is picked: a small sheet over the dimmed page, like the
   voice box in Notosaurus */
.name-box-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.name-box-overlay.active {
    display: flex;
}

.name-box-content {
    background: var(--sheet);
    border: 2px solid var(--ink-900);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 6px 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* ============================================================
   CREATE MODE — the tools in a narrow strip beside the paper
   ============================================================ */

.paint-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

/* The tool box: a cream box with a bar across its top, holding the tools in a tight grid two
   across, the way Paint's tool box is. The bar names it and carries the buttons that pop it out,
   pin it and dock it; floating, the bar is the handle it is dragged by. */
.paint-palette {
    display: flex;
    flex-direction: column;
    width: max-content;
    background: var(--paper-cream);
    border: 1px solid var(--ink-a40);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sheet);
}

.paint-palette[hidden] {
    display: none;
}

.paint-palette-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;   /* the buttons keep to the right; the rest of the bar is the handle */
    gap: 0.125rem;
    min-height: 1.75rem;
    padding: 0.125rem;
    border-bottom: 1px solid var(--ink-a20);
    background: linear-gradient(var(--ink-a10), var(--ink-a10)), var(--paper-cream);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    user-select: none;
    -webkit-user-select: none;
}

/* The bar's own buttons: small flat squares, like the tools */
button.btn-cream.paint-palette-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    min-height: 0;
    padding: 0;
    border-radius: var(--radius-sm);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: none;
}

button.btn-cream.paint-palette-btn:hover {
    border-color: var(--ink-a40);
    background: var(--paper-cream);
    transform: none;
}

button.btn-cream.paint-palette-btn[hidden] {
    display: none;
}

.paint-palette-btn .material-symbols-outlined {
    font-size: 1rem;
    line-height: 1;
}

/* Pinned to the page: the pin is filled in */
button.btn-cream.paint-palette-btn.is-on,
button.btn-cream.paint-palette-btn.is-on:hover {
    background: linear-gradient(var(--ink-a20), var(--ink-a20)), var(--paper-cream);
    color: var(--ink-text);
    border-color: var(--ink-a40);
    box-shadow: none;
}

button.btn-cream.paint-palette-btn.is-on .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* Floating: lifted off the panel onto the page, over everything but the dropper's glass.
   It follows the screen as the page scrolls. Pinned, it sits in the paper's own box (app.js
   moves it there) and so goes wherever the paper goes; the bar is no longer a handle and the
   corner grip is away. */
.paint-palette.is-floating {
    position: fixed;
    z-index: 400;
    box-shadow: var(--shadow-paper-lift);
}

.paint-palette.is-floating.is-pinned {
    position: absolute;
}

/* Pinned, the box lies over the paper's frames, handles and text box */
.paint-canvas-wrap > .paint-palette.is-pinned {
    z-index: 40;
}

.paint-palette.is-floating .paint-palette-bar {
    cursor: move;
    touch-action: none;
}

.paint-palette.is-floating.is-pinned .paint-palette-bar {
    cursor: default;
}

.paint-palette.is-floating.is-dragging .paint-palette-bar {
    cursor: grabbing;
}

/* Floating near the right edge, the sliders and colors open to its left instead */
.paint-palette.is-floating.is-at-right .paint-pop {
    left: auto;
    right: calc(100% + 0.5rem);
}

/* Floating, the box can be made wider: its groups fill as many columns as fit, and the
   bottom-right corner is the grip that sets the width */
.paint-palette.is-floating .paint-group {
    grid-template-columns: repeat(auto-fill, 2rem);
}

.paint-palette-grip {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0.875rem;
    height: 0.875rem;
    cursor: nwse-resize;
    touch-action: none;
    border-bottom-right-radius: var(--radius-md);
    /* Three short diagonal lines in the corner, the way a window's grip is drawn */
    background: repeating-linear-gradient(135deg, transparent 0 3px, var(--ink-a40) 3px 4px);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.paint-palette-grip[hidden] {
    display: none;
}

.paint-palette.is-resizing,
.paint-palette.is-resizing .paint-palette-grip {
    cursor: nwse-resize;
}

/* The tools inside the box: groups stacked, each a grid two across */
.paint-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
}

.paint-group {
    display: grid;
    grid-template-columns: repeat(2, 2rem);
    grid-auto-rows: 2rem;
    justify-content: center;
    align-items: center;
    align-self: stretch;   /* the group spans the box, so the line between groups runs its full width */
    gap: 0.125rem;
}

/* A thin line between one group of tools and the next */
.paint-group + .paint-group {
    padding-top: 0.25rem;
    border-top: 1px solid var(--ink-a20);
}

/* A tool in the box: a flat square with a symbol and no words, packed edge to edge with its
   neighbors; the one in hand has a darker fill and sits a little sunken */
button.btn-cream.paint-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    min-height: 0;
    padding: 0;
    border-radius: var(--radius-sm);
    border-color: var(--ink-a20);
    box-shadow: none;
}

button.btn-cream.paint-tool:hover {
    transform: none;
    border-color: var(--ink-a40);
}

button.btn-cream.paint-tool.is-on,
button.btn-cream.paint-tool.is-on:hover {
    background: linear-gradient(var(--ink-a20), var(--ink-a20)), var(--paper-cream);
    color: var(--ink-text);
    border-color: var(--ink-a40);
    box-shadow: inset 0 1px 2px rgba(69, 26, 3, 0.3);
}

.paint-tool .material-symbols-outlined {
    font-size: 1.25rem;
    line-height: 1;
}

/* The frame's buttons, once out, take their own squares in the grid under the button that brought them */
.paint-tools .crop-tools:not([hidden]) {
    display: contents;
}

/* A symbol filled in, to tell it from its outlined twin (Erase Background from the Eraser) */
.paint-tool .material-symbols-outlined.is-filled {
    font-variation-settings: 'FILL' 1;
}

/* A symbol drawn on the page, at the size of the font's symbols */
.paint-tool-drawn {
    width: 1.25rem;
    height: 1.25rem;
}

/* The Color button's symbol is the color in hand */
.paint-ink {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--ink-a40);
}

/* The sliders and the colors open beside their buttons, over the paper's edge */
.paint-pop-wrap {
    position: relative;
}

.paint-pop {
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 13rem;
    padding: 0.75rem;
    background: var(--paper-cream);
    border: 1px solid rgba(69, 26, 3, 0.25);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-paper-lift);
}

.paint-pop[hidden] {
    display: none;
}

.paint-label {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-text);
}

.paint-range {
    width: 100%;
    accent-color: var(--green);
}

/* Quick grab: the primary colors, black and white in a row above the wheel, one press each */
.color-quick {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.color-quick-btn {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--ink-a40);
    box-shadow: var(--shadow-sheet);
    cursor: pointer;
}

/* The color wheel: the colors run around it from red at the top, and fade to white at the
   middle. The shade over it darkens with the slider, so the wheel shows the colors on offer. */
.color-wheel {
    position: relative;
    width: 100%;
    max-width: 11rem;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    border: 1px solid var(--ink-a40);
    background:
        radial-gradient(closest-side, #ffffff 0%, rgba(255, 255, 255, 0) 100%),
        conic-gradient(#ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    box-shadow: var(--shadow-sheet);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.color-wheel-shade {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #000000;
    opacity: 0;
    pointer-events: none;
}

/* The dot marks the color in hand */
.color-wheel-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.paint-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-swatch {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--ink-a40);
    box-shadow: var(--shadow-sheet);
}

.paint-current[hidden] {
    display: none;
}

/* A clear background: the Background color button's square shows the page's faint check */
.paint-ink.is-clear {
    background: repeating-conic-gradient(#d9d9d9 0% 25%, #ffffff 0% 50%) 50% / 10px 10px;
}

/* The color's code, in a field where it can be typed as well as read */
input.color-hex {
    flex: 1;
    min-width: 0;
    width: 6.5rem;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--ink-text);
    background: var(--sheet);
    border: 1px solid var(--ink-a40);
    border-radius: var(--radius-sm);
}

input.color-hex:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
}

/* The paper: white, shown as wide as there is room for and kept in its own shape */
.paint-canvas-wrap {
    min-width: 0;
}

.paint-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
    border: 1px solid var(--ink-a30);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sheet);
    cursor: crosshair;
    touch-action: none;   /* a finger on the paper draws; it does not scroll the page */
    user-select: none;
    -webkit-user-select: none;
}

/* Narrow screens and phones: the tool box lies above the paper, its tools on one grid eight
   across so every square lines up (the groups and the lines between them fall away), and the
   sliders and colors open under it. It stays docked here: there is no room to float it (app.js
   docks it on a narrow screen), so the bar's pop-out button is away. */
@media (max-width: 900px) {
    .paint-layout {
        grid-template-columns: 1fr;
    }

    .paint-palette {
        width: auto;
    }

    .paint-palette-bar #palette-pop-out-btn {
        display: none;
    }

    .paint-tools {
        position: relative;
        display: grid;
        grid-template-columns: repeat(8, 2rem);
        grid-auto-rows: 2rem;
        justify-content: center;
        align-items: center;
        gap: 0.125rem;
    }

    .paint-group {
        display: contents;
    }

    .paint-pop-wrap {
        position: static;
    }

    .paint-pop {
        left: 0;
        top: calc(100% + 0.5rem);
        transform: none;
        width: min(13rem, 100%);
    }
}

/* The Text tool: the pointer is a text cursor on the paper, and the box to type in sits on the
   paper where it was pressed, in the ink in hand, with a thin dashed edge and no paper of its
   own, so the words look as they will once written */
.paint-canvas-wrap {
    position: relative;
}

.paint-canvas.is-writing {
    cursor: text;
}

/* The Hand: an open hand over anything that can be carried, closed while carrying it */
.paint-canvas.is-hand {
    cursor: default;
}

.paint-canvas.is-hand.is-over-thing {
    cursor: grab;
}

.paint-canvas.is-hand.is-carrying {
    cursor: grabbing;
}

/* The dropper's magnifying glass: the dots under the pointer, enlarged, in a ring of the color
   that a press would pick. It follows the pointer and never gets in its way. */
.paint-loupe {
    position: fixed;
    z-index: 600;
    width: 132px;
    height: 132px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    outline: 1px solid var(--ink-900);
    box-shadow: var(--shadow-paper-lift);
    pointer-events: none;
}

.paint-loupe[hidden] {
    display: none;
}

.paint-text-frame {
    position: absolute;
    z-index: 5;
    transform-origin: 0 0;   /* turned about its top-left corner, as the words are on the paper */
    padding: 8px;            /* a grip around the box: dragged to move the words (app.js keeps the words in place for it) */
    cursor: move;
    touch-action: none;
}

/* Fill, under the sliders: a small check beside its words */
.paint-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-text);
    cursor: pointer;
}

.paint-check[hidden] {
    display: none;
}

.paint-check input {
    accent-color: var(--green);
}

.paint-text-frame[hidden] {
    display: none;
}

/* The frame around a shape or an added picture in hand: a thin dashed edge on the thing itself,
   which is drawn on the paper underneath; the frame is dragged to move it */
.paint-object-frame {
    position: absolute;
    z-index: 5;
    box-sizing: border-box;
    border: 1px dashed var(--ink-a50);
    transform-origin: 0 0;   /* turned about its top-left corner, as the thing is on the paper */
    cursor: move;
    touch-action: none;
}

.paint-object-frame[hidden] {
    display: none;
}

/* The handles: small cream squares on the box's corners and its right edge */
.paint-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--paper-cream);
    border: 1px solid var(--ink-900);
    border-radius: 2px;
    z-index: 6;
    touch-action: none;
}

.paint-handle-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.paint-handle-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.paint-handle-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.paint-handle-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.paint-handle-e  { right: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.paint-handle-w  { left: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.paint-handle-n  { top: -6px; left: calc(50% - 5px); cursor: ns-resize; }
.paint-handle-s  { bottom: -6px; left: calc(50% - 5px); cursor: ns-resize; }

/* The turning handle: round, standing above the middle of the box on a short stalk */
.paint-handle-turn {
    top: -30px;
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: grab;
}

.paint-handle-turn::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 11px;
    width: 0;
    height: 18px;
    border-left: 1px dashed var(--ink-a50);
    pointer-events: none;
}

.paint-handle-turn:active {
    cursor: grabbing;
}

.paint-text {
    display: block;
    min-width: 8rem;
    padding: 0;
    margin: 0;
    border: 1px dashed var(--ink-a50);
    border-radius: 2px;
    background: transparent;
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.25;
    resize: none;
    overflow: hidden;
    white-space: pre;
    outline: none;
}

/* ============================================================
   CROP & ROTATE — for a file laid on the paper
   The frame lies over the paper; what is outside it is dimmed (drawn on the paper itself). Its corners are pulled to set
   what is kept, and the frame itself is dragged to move it.
   ============================================================ */
/* While expanding, the frame reaches past the paper, over the tools beside it: a firm edge, and
   only its handles take the pointer, so the tools under it still work */
.crop-frame.is-expanding {
    cursor: default;
    border-style: solid;
    pointer-events: none;
}

.crop-frame.is-expanding .paint-handle {
    pointer-events: auto;
}

/* The frame's own buttons come out on the strip, under the button that brought the frame */
.crop-tools {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crop-tools[hidden] {
    display: none;
}

.crop-frame {
    position: absolute;
    z-index: 5;
    border: 1px dashed var(--paper-cream);
    outline: 1px dashed var(--ink-900);
    cursor: move;
    touch-action: none;
}

.crop-frame[hidden] {
    display: none;
}

/* The brush and the trash can stand alone on their buttons, so the icon's room for words beside it goes */
.panel-buttons .btn-icon {
    margin-right: 0;
}
