/* Crop PDF in the new design (croppers/new_ui/crop.html).

   The crop studio is the browser-only tool it always was: croppers/js_source/anonymous-crop-pdf.js
   owns 39 ids plus the state classes (is-active, is-on, is-dragover, is-invalid, is-success), Jcrop
   draws the selection inside .studio-mat, and croppers/css/anonymous-crop-pdf.css still styles that
   selection and its handles. This file loads after that one and restyles everything around it: the
   hero band's drop card, the stage and its bar, and the settings panel.

   The page also loads tool.css, so the shared tool-page pieces - .th, .dropcard, .spec, .hsteps,
   .toollist, .done - come from there and this page draws none of its own. */

/* The studio's palette onto the desk.css tokens, so it follows the light and dark themes */
.anonymous-crop-page {
  --pc-ink: var(--text); --pc-ink-soft: var(--text-muted); --pc-brand: var(--primary-text); --pc-brand-2: var(--primary-hover);
  --pc-grad: var(--grad); --pc-accent: var(--focus); --pc-accent-soft: var(--primary-soft); --pc-paper: var(--surface);
  --pc-mist: var(--surface-alt); --pc-line: var(--border); --pc-line-strong: var(--border-strong);
  --pc-good: var(--success); --pc-good-soft: var(--success-soft); --pc-bad: var(--danger); --pc-bad-soft: var(--danger-soft);
  --pc-radius: var(--r-lg); --pc-display: var(--font);
}
.anonymous-crop-page .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; display: inline-block; }

/* ── The header over the hero ──────────────────────────────────────────────────────────────────
   tool.css turns .sc-header clear at the top of the page and relies on the page's script to put the
   band back on the first scroll; this page has that script now. The studio's full-screen mode has no
   hero for the header to show through, so there the band is on from the start. */
body.crop-active .sc-header,
body:has(#cropHero[hidden]) .sc-header { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom-color: var(--border); box-shadow: 0 10px 26px -22px rgba(10,29,41,.6); }

/* ── 1. The hero's drop card ───────────────────────────────────────────────────────────────────
   The drop area keeps its class (the studio sheet hides it with display:none !important when the
   crop script sets its hidden attribute) and its crop marks, which say what the tool does before a
   word is read. Everything else about it is the shared .dropzone look. */
.anonymous-crop-page .th__copy h1 em { font-style: normal; color: var(--primary-text); }
.anonymous-crop-page .studio-drop { position: relative; margin: 16px; padding: 28px 18px; border: 2px dashed var(--border-strong); border-radius: 18px; background: var(--surface-alt); text-align: center; cursor: pointer; outline: none; transition: border-color .15s, background-color .15s; }
.anonymous-crop-page .studio-drop:hover,
.anonymous-crop-page .studio-drop:focus-visible,
.anonymous-crop-page .studio-drop.is-dragover { border-color: var(--primary); background-color: var(--primary-soft); transform: none; }
.anonymous-crop-page .cutmark { position: absolute; width: 16px; height: 16px; border: 2px solid var(--primary); opacity: .55; pointer-events: none; }
.anonymous-crop-page .cutmark-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 3px 0 0 0; }
.anonymous-crop-page .cutmark-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 3px 0 0; }
.anonymous-crop-page .cutmark-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 3px; }
.anonymous-crop-page .cutmark-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 3px 0; }
.anonymous-crop-page .studio-drop-inner { display: grid; justify-items: center; gap: 0; }

/* A page with a crop frame on it, instead of the stack of pages the other tools show */
.crop-art { position: relative; display: block; width: 108px; height: 82px; margin: 0 auto 16px; }
.crop-art__pg { position: absolute; inset: 0 14px; border-radius: 4px; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 10px 20px -12px rgba(3,61,99,.6); display: grid; align-content: start; gap: 4px; padding: 9px 8px; }
.crop-art__pg i { display: block; height: 3px; border-radius: 2px; background: var(--grid); }
.crop-art__pg i:first-child { width: 58%; height: 5px; background: var(--primary-soft-border); }
.crop-art__sel { position: absolute; left: 8px; right: 8px; top: 20px; bottom: 16px; border: 2px solid var(--primary); border-radius: 2px; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.crop-art__sel b { position: absolute; width: 7px; height: 7px; background: var(--surface); border: 2px solid var(--primary); border-radius: 1px; }
.crop-art__sel b:nth-child(1) { left: -4px; top: -4px; }
.crop-art__sel b:nth-child(2) { right: -4px; top: -4px; }
.crop-art__sel b:nth-child(3) { left: -4px; bottom: -4px; }
.crop-art__sel b:nth-child(4) { right: -4px; bottom: -4px; }

.anonymous-crop-page .studio-choose-btn { margin: 0; }
.anonymous-crop-page .studio-choose-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.anonymous-crop-page .studio-drop-or { width: auto; margin: 10px 0 0; color: var(--text-muted); font-size: var(--fs-body); text-transform: none; letter-spacing: 0; }
.anonymous-crop-page .studio-drop-or::before, .anonymous-crop-page .studio-drop-or::after { content: none; }
.anonymous-crop-page .studio-drop-hint { margin: 12px 0 0; color: var(--text-faint); font-size: var(--fs-label); }

/* The three steps, as the strip at the foot of the card every tool page has */
.anonymous-crop-page .crop-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; justify-content: stretch; list-style: none; margin: 0; padding: 0; background: var(--border); border-top: 1px solid var(--border); }
.anonymous-crop-page .crop-steps li { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--surface); color: var(--text); font-family: inherit; font-size: var(--fs-label); font-weight: var(--fw-medium); line-height: 1.3; white-space: normal; }
.anonymous-crop-page .crop-steps li span { width: 18px; height: 18px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--text-muted); font-size: 10px; font-weight: var(--fw-bold); display: grid; place-items: center; }
.anonymous-crop-page .crop-steps li.is-active { color: var(--text); }
.anonymous-crop-page .crop-steps li.is-active span { background: var(--primary-soft); color: var(--primary-text); }
.anonymous-crop-page .crop-steps li.is-done span { background: var(--success-soft); color: var(--success-text); }
.anonymous-crop-page .crop-steps[hidden] { display: none; }

/* ── 2. The studio ─────────────────────────────────────────────────────────────────────────────
   Its own stacking context: Jcrop's overlays run to z-index ~300 and must stay under the site
   header's menus. The card's own frame goes, because with files loaded the studio is the screen. */
.anonymous-crop-page .crop-studio { position: relative; z-index: 0; isolation: isolate; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.anonymous-crop-page .crop-studio::before { content: none; }
.anonymous-crop-page .studio-work { display: grid; gap: 0; }
.anonymous-crop-page .studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0 14px; align-items: stretch; }
/* A column, not a grid with named rows: the crop script writes into #messages above the stage, and
   a third item would otherwise take the row the stage needs. */
.anonymous-crop-page .studio-preview { display: flex; flex-direction: column; gap: 10px; min-width: 0; height: 100%; }
.anonymous-crop-page .studio-preview > .stgbar { flex: 0 0 auto; }
.anonymous-crop-page #messages:empty { display: none; }

/* The stage's bar: which file is on the stage, the page, and the zoom */
.stgbar { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 8px 7px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.stgbar__f { display: flex; align-items: center; gap: 9px; min-width: 0; }
.stgbar__f > .ico { flex-shrink: 0; color: var(--primary-text); }
.stgbar__f b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-label); font-weight: var(--fw-bold); }
.stgbar__f b:empty { display: none; }
.stgbar__grp { display: inline-flex; align-items: center; gap: 2px; }
.stgbar__grp--pg { margin-left: auto; }
.stgbar button { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-muted); font: inherit; font-size: 17px; line-height: 1; display: inline-grid; place-items: center; cursor: pointer; }
.stgbar button:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.stgbar button:disabled { opacity: .4; cursor: default; }
.stgbar button .ico { width: 14px; height: 14px; stroke-width: 2.4; vertical-align: 0; }
.stgbar__page { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-label); color: var(--text-muted); white-space: nowrap; }
.stgbar__page input { width: 42px; height: 28px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--input-bg); color: var(--text); font: inherit; font-size: var(--fs-label); font-weight: var(--fw-bold); text-align: center; -moz-appearance: textfield; }
.stgbar__page input::-webkit-outer-spin-button, .stgbar__page input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stgbar__page input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.stgbar__page b { color: var(--text); font-weight: var(--fw-semibold); }
.stgbar__sep { width: 1px; height: 20px; flex-shrink: 0; background: var(--border); }
.stgbar__zoom { min-width: 44px; text-align: center; font-size: var(--fs-label); font-weight: var(--fw-bold); color: var(--text); }
.stgbar__fit { width: auto !important; padding: 0 10px; font-size: var(--fs-label) !important; font-weight: var(--fw-semibold); color: var(--primary-text) !important; }

/* The page scrolls inside a viewer-height box; zoom widens the mat and the crop script sizes the
   preview from the mat's width, so the mat must not get its own frame or background. */
.anonymous-crop-page .studio-stage { position: relative; flex: 1 1 auto; min-width: 0; max-width: 100%; min-height: 0; }
.anonymous-crop-page .studio-viewport { width: 100%; max-width: 100%; height: 100%; min-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); scrollbar-width: thin; }
.anonymous-crop-page .studio-mat { min-height: 100%; margin: 0 auto; padding: 22px 22px 56px; border: none; border-radius: 0; overflow: visible; background-color: transparent; background-image: none; }

/* The crop size, read while the handles are being dragged, over the foot of the stage */
.anonymous-crop-page .studio-readout { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 400; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); padding: 5px 12px; border-radius: 999px; background: rgba(10,29,41,.92); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 10px 28px -10px rgba(0,0,0,.5); }
.anonymous-crop-page .studio-readout-label { display: inline-flex; align-items: center; gap: 5px; color: rgba(255,255,255,.62); font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; }
.anonymous-crop-page .studio-readout-label .ico { width: 13px; height: 13px; }
.anonymous-crop-page #client-crop-readout { padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff; font-family: inherit; font-size: var(--fs-label); font-weight: var(--fw-bold); white-space: nowrap; }

/* ── 3. The settings panel ─────────────────────────────────────────────────────────────────────
   Head, scrolling body and foot, so the Crop button is reachable however long the settings run. */
.anonymous-crop-page .studio-settings { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: var(--surface); }
.anonymous-crop-page .studio-settings > * { min-width: 0; }
.anonymous-crop-page .studio-settings input, .anonymous-crop-page .studio-settings select { min-width: 0; max-width: 100%; }
.anonymous-crop-page .studio-panel-head { padding: 13px 16px 12px; border-bottom: 1px solid var(--border); }
.anonymous-crop-page .studio-panel-head h2 { margin: 0; font-size: var(--fs-body-lg); font-weight: var(--fw-bold); text-align: left; }
.anonymous-crop-page .studio-tip { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 9px 11px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary-text); font-size: var(--fs-label); line-height: 1.45; }
.anonymous-crop-page .studio-tip .ico { flex-shrink: 0; width: 15px; height: 15px; margin-top: 1px; }
.anonymous-crop-page .studio-panel-body { padding: 0 16px; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* The files, then the crop, then the fold */
.anonymous-crop-page .studio-files { display: grid; gap: 8px; padding: 13px 0; border: 0; border-radius: 0; background: transparent; }
.anonymous-crop-page .studio-files-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.anonymous-crop-page .studio-files-head strong { font-size: var(--fs-caption); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.anonymous-crop-page .studio-add-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px dashed var(--border-strong); border-radius: 14px; background: transparent; color: var(--primary-text); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-semibold); cursor: pointer; }
.anonymous-crop-page .studio-add-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.anonymous-crop-page .studio-add-btn .ico { width: 13px; height: 13px; }

/* The selected PDFs as rows; the previewed one is marked, and clicking a row previews it. The rows
   are written by the crop script, so their classes are fixed. */
.anonymous-crop-page .studio-file-list { display: grid; gap: 6px; max-height: 196px; overflow-y: auto; scrollbar-width: thin; }
.anonymous-crop-page .anonymous-file-chip { display: flex; align-items: center; gap: 9px; width: 100%; max-width: none; padding: 8px 9px 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: var(--fs-label); cursor: pointer; animation: none; }
.anonymous-crop-page .anonymous-file-chip::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; background: var(--danger); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center / contain no-repeat; }
.anonymous-crop-page .anonymous-file-chip > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-semibold); }
.anonymous-crop-page .anonymous-file-chip .chip-pages { flex: none; color: var(--text-muted); font-size: var(--fs-small); }
.anonymous-crop-page .anonymous-file-chip:hover { border-color: var(--primary-soft-border); background: var(--primary-soft); }
.anonymous-crop-page .anonymous-file-chip.is-active { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.anonymous-crop-page .anonymous-file-chip.is-active > span:first-of-type { color: var(--primary-text); }
.anonymous-crop-page .anonymous-file-remove { flex-shrink: 0; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--text-faint); font-size: 15px; }
.anonymous-crop-page .anonymous-file-remove:hover { background: var(--danger-soft); color: var(--danger); }

.anonymous-crop-page .setting-group { display: grid; gap: 9px; padding: 13px 0; border-top: 1px dashed var(--border); }
.anonymous-crop-page .setting-group + .setting-group { padding-top: 13px; }
.anonymous-crop-page .setting-label { color: var(--text-faint); font-size: var(--fs-caption); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; }
.anonymous-crop-page .setting-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.anonymous-crop-page .setting-label-row select, .anonymous-crop-page .setting-quality select, .anonymous-crop-page .setting-preset-row select, .anonymous-crop-page .setting-preset-row input { border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--input-bg); color: var(--text); font: inherit; font-size: var(--fs-label); font-weight: var(--fw-semibold); padding: 5px 8px; }
.anonymous-crop-page .setting-chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.anonymous-crop-page .setting-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 15px; background: var(--surface); color: var(--text-muted); font: inherit; font-size: var(--fs-label); font-weight: var(--fw-semibold); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.anonymous-crop-page .setting-chip:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.anonymous-crop-page .setting-chip.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.anonymous-crop-page .setting-chip:disabled { opacity: .5; cursor: default; }
.anonymous-crop-page .setting-chip .ico { width: 13px; height: 13px; }
.anonymous-crop-page .setting-chip-danger { color: var(--danger); }
.anonymous-crop-page .setting-chip-danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.anonymous-crop-page .setting-help-btn { width: 26px; height: 26px; display: inline-grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.anonymous-crop-page .setting-help-btn:hover { border-color: var(--primary); color: var(--primary-text); }
.anonymous-crop-page .setting-numgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.anonymous-crop-page .setting-numgrid label { display: grid; gap: 4px; margin: 0; color: var(--text-muted); font-size: var(--fs-small); font-weight: var(--fw-medium); }
.anonymous-crop-page .setting-numgrid input { width: 100%; height: 32px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--input-bg); color: var(--text); font: inherit; font-size: var(--fs-label); font-weight: var(--fw-semibold); }
.anonymous-crop-page .setting-numgrid input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.anonymous-crop-page .setting-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-alt); }
.anonymous-crop-page .setting-segment label span { min-height: 26px; border-radius: 12px; color: var(--text-muted); font-size: var(--fs-label); font-weight: var(--fw-semibold); }
.anonymous-crop-page .setting-segment input:checked + span { background: var(--surface); color: var(--primary-text); box-shadow: 0 1px 3px rgba(10,29,41,.1); }
.anonymous-crop-page .setting-rangeinput { height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--input-bg); color: var(--text); font: inherit; font-size: var(--fs-label); }
.anonymous-crop-page .setting-preset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.anonymous-crop-page .setting-preset-row label { margin: 0; color: var(--text-muted); font-size: var(--fs-small); font-weight: var(--fw-semibold); }
.anonymous-crop-page .setting-preset-row select, .anonymous-crop-page .setting-preset-row input { flex: 1; max-width: 190px; }
.anonymous-crop-page .setting-saved-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.anonymous-crop-page .setting-hint { margin: 0; color: var(--text-faint); font-size: var(--fs-small); font-weight: var(--fw-body); line-height: 1.45; }
.anonymous-crop-page .setting-quality { display: grid; gap: 6px; margin: 0; color: var(--text-muted); font-size: var(--fs-small); font-weight: var(--fw-semibold); }
.anonymous-crop-page .setting-quality select { max-width: none; width: 100%; }

/* The fold: presets, pages and output. The page's script opens it for the guided tour and for a
   preset saved from the download screen, and lifts the preset group out of it once any exist. */
.anonymous-crop-page .studio-more { padding: 12px 0; border-top: 1px dashed var(--border); }
.anonymous-crop-page .studio-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 7px; padding: 4px 0; color: var(--primary-text); font-weight: var(--fw-semibold); font-size: var(--fs-label); }
.anonymous-crop-page .studio-more > summary::-webkit-details-marker { display: none; }
.anonymous-crop-page .studio-more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin: 0 3px 0 2px; transition: transform .15s; }
.anonymous-crop-page .studio-more[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
.anonymous-crop-page .studio-more > summary small { flex-basis: 100%; padding-left: 19px; color: var(--text-faint); font-weight: var(--fw-body); font-size: var(--fs-small); }
.anonymous-crop-page .studio-more[open] > summary small { display: none; }
.anonymous-crop-page .studio-more > .setting-group:first-of-type { border-top: 0; padding-top: 6px; }
.anonymous-crop-page .setting-group--lifted { border-top: 1px dashed var(--border); }

/* The foot: the progress bar, Crop, Start over, and the status line */
.anonymous-crop-page .studio-actions { display: grid; gap: 9px; margin: 0; padding: 11px 16px 13px; border-top: 1px solid var(--border); background: var(--surface); box-shadow: none; }
.anonymous-crop-page .studio-actions[hidden] { display: none; }
.anonymous-crop-page .studio-actions-row { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 8px; }
.anonymous-crop-page .studio-actions-row .btn--go { flex: 1; min-width: 0; }
.anonymous-crop-page .studio-progress { height: 8px; border-radius: 6px; background: var(--surface-alt); border: 1px solid var(--border); overflow: hidden; }
.anonymous-crop-page .studio-ghost { border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); color: var(--text-muted); font: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-label); padding: 8px 16px; cursor: pointer; }
.anonymous-crop-page .studio-ghost:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.anonymous-crop-page .studio-ghost:disabled { opacity: .5; cursor: default; }
.anonymous-crop-page .studio-ghost--icon { position: relative; width: 44px; flex: 0 0 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 22px; }
.anonymous-crop-page .studio-ghost--icon .ico { width: 18px; height: 18px; }
.anonymous-crop-page .studio-ghost--icon::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 8px); padding: 5px 9px; border-radius: 7px; background: rgba(10,29,41,.94); color: #fff; font-size: var(--fs-small); font-weight: var(--fw-semibold); white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .08s, transform .08s; }
.anonymous-crop-page .studio-ghost--icon:hover::after, .anonymous-crop-page .studio-ghost--icon:focus-visible::after { opacity: 1; transform: none; }
.anonymous-crop-page .studio-ghost--icon:disabled::after { display: none; }
.anonymous-crop-page .studio-status { min-height: 0; margin: 0; padding: 0; text-align: center; font-size: var(--fs-label); font-weight: var(--fw-semibold); color: var(--text-muted); }
.anonymous-crop-page .studio-status:empty { display: none; }
.anonymous-crop-page .studio-status.is-success { padding: 8px 12px; border: 1px solid var(--success-soft-border, var(--border)); border-radius: var(--r-sm); background: var(--success-soft); color: var(--success-text); }
.anonymous-crop-page .studio-status.is-error { padding: 8px 12px; border: 1px solid var(--danger-soft-border, var(--border)); border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); }
/* No flash of the disabled look while a page re-renders: disabling waits, enabling is instant */
.anonymous-crop-page .studio-actions .btn, .anonymous-crop-page .studio-ghost { transition: opacity .15s ease .35s, box-shadow .15s ease .35s, transform .15s ease, border-color .15s ease, color .15s ease; }
.anonymous-crop-page .studio-actions .btn:not(:disabled), .anonymous-crop-page .studio-ghost:not(:disabled) { transition-delay: 0s; }

/* ── 4. Files loaded: the studio is the screen ─────────────────────────────────────────────────
   The page's script measures what is left of the window below the studio's top edge and sets
   --crop-stage-h; the stage row is that tall, so the panel ends where the window does. */
body.crop-active main.page-wrap--fluid { padding: 0; }
/* The studio runs edge to edge here, so the trail drops tool.css's 1200px measure and follows it. */
body.crop-active .tool-crumbs { padding: 10px 16px 6px; max-width: none; }
body.crop-active .crop-studio { padding: 10px 0 0 14px; }
body.crop-active .studio-grid { grid-template-rows: var(--crop-stage-h, calc(100vh - 160px)); }
body.crop-active .page-inner { padding: 0 24px; }

/* ── 5. The download screen (tool.css .done) ───────────────────────────────────────────────────*/
.anonymous-crop-page #cropDoneStage { border: none; margin: 10px auto 0; }
.anonymous-crop-page #cropDoneStage .out { text-align: left; }
.anonymous-crop-page #cropDoneStage .done__actions .btn svg { width: 16px; height: 16px; }
.anonymous-crop-page .studio-done__preset { display: grid; gap: 6px; max-width: 460px; margin: 22px auto 0; padding: 13px; border-radius: var(--r-md); background: var(--surface); text-align: left; }
.anonymous-crop-page .studio-done__preset .setting-label { text-transform: none; letter-spacing: 0; font-size: var(--fs-label); color: var(--text); }
.anonymous-crop-page .studio-done__row { display: flex; gap: 7px; }
.anonymous-crop-page .studio-done__row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--input-bg); color: var(--text); font: inherit; font-size: var(--fs-body); }
.anonymous-crop-page .studio-done__row input:focus { outline: none; border-color: var(--primary); }
.anonymous-crop-page .studio-done__hint { margin: 2px 0 0; color: var(--text-muted); font-size: var(--fs-small); line-height: 1.5; }
.anonymous-crop-page .studio-done__saved { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: var(--success-text); font-weight: var(--fw-semibold); }
/* The preset offer gets a moving multi-colour border so it is noticed */
.anonymous-crop-page #cropDoneStage .studio-done__preset { position: relative; }
.anonymous-crop-page #cropDoneStage .studio-done__preset::before { content: ""; position: absolute; inset: -2px; border-radius: 14px; padding: 2px; background: linear-gradient(120deg, #e6944c, #dd2c2c, #7c3aed, #119ad4, #2c9664, #e6944c, #dd2c2c); background-size: 300% 300%; animation: pc-preset-glow 4s linear infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
@keyframes pc-preset-glow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@media (prefers-reduced-motion: reduce) { .anonymous-crop-page #cropDoneStage .studio-done__preset::before { animation: none; } }

/* ── 6. The guided tour ────────────────────────────────────────────────────────────────────────*/
.anonymous-crop-page .crop-tour-panel { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.anonymous-crop-page .crop-tour-panel h3 { font-family: inherit; color: var(--text); }
.anonymous-crop-page .crop-tour-panel p { color: var(--text-muted); font-weight: var(--fw-body); }
.anonymous-crop-page .crop-tour-step { color: var(--primary-text); }
.anonymous-crop-page .crop-tour-actions .studio-cta { min-width: 0; padding: 9px 18px; border: 0; border-radius: 22px; background: var(--grad); color: var(--on-primary); font: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-body); cursor: pointer; }

/* ── 7. The guide sections below ───────────────────────────────────────────────────────────────*/
.crop-seo h3 { font-size: 16px; font-weight: var(--fw-bold); margin: 16px 0 6px; }
.crop-seo ul { margin: 8px 0 0 20px; }
.crop-seo li { margin: 4px 0; color: var(--text); }

/* ── 8. Narrower windows ───────────────────────────────────────────────────────────────────────*/
@media (max-width: 1000px) {
  .anonymous-crop-page .studio-grid { grid-template-columns: minmax(0, 1fr); }
  body.crop-active .studio-grid { grid-template-rows: auto; }
  .anonymous-crop-page .studio-settings { height: auto; border-left: 0; border-top: 1px solid var(--border); }
  .anonymous-crop-page .studio-panel-body { overflow: visible; }
  .anonymous-crop-page .studio-stage, .anonymous-crop-page .studio-viewport { height: 70vh; min-height: 360px; }
  body.crop-active .crop-studio { padding: 10px 0 0; }
}
@media (max-width: 760px) {
  body.crop-active .page-inner { padding: 0 16px; }
  .stgbar { flex-wrap: wrap; row-gap: 6px; }
  .stgbar__grp--pg { margin-left: 0; }
  .stgbar__sep { display: none; }
  .anonymous-crop-page .studio-mat { padding: 14px 12px 50px; }
}
@media (max-width: 420px) {
  .anonymous-crop-page .setting-numgrid { grid-template-columns: 1fr 1fr; }
  .anonymous-crop-page .studio-drop { margin: 12px; padding: 22px 14px; }
}
