/* Local export controls; no ad selectors or fixed overlays. */
.controls #edge-fields { border:0;padding:4px 15px 14px;margin:0;min-width:0; }
.edge-box .export-label { margin-top:8px; }.edge-box .range-labels { margin-bottom:14px; }
.edge-box .helper { font-size:12px; }.edge-box .text-button { min-height:40px; }
.compare-controls { margin:0 20px 18px; }.compare-labels { display:flex;justify-content:space-between;font-size:12px;color:var(--ink);font-weight:600; }
#compare-range { appearance:none;-webkit-appearance:none;display:block;width:100%;height:36px;background:transparent;accent-color:var(--brand);cursor:ew-resize;margin:2px 0; }
#compare-range::-webkit-slider-runnable-track { height:3px;border-radius:3px;background:#e3e0d6; }
#compare-range::-moz-range-track { height:3px;border-radius:3px;background:#e3e0d6; }
#compare-range::-webkit-slider-thumb { appearance:none;-webkit-appearance:none;box-sizing:border-box;width:16px;height:16px;margin-top:-6.5px;border:1px solid #b99644;border-radius:50%;background:var(--brand); }
#compare-range::-moz-range-thumb { box-sizing:border-box;width:16px;height:16px;border:1px solid #b99644;border-radius:50%;background:var(--brand); }
@media (forced-colors:active) { #compare-range { appearance:auto; } }
.compare-controls p { font-size:12px;color:var(--muted);line-height:1.65;margin:4px 0 0; }
.compare-controls input:focus-visible { outline:2px solid var(--brand-ink);outline-offset:2px; }
#preview.comparing { cursor:ew-resize;touch-action:pan-y; }
.workspace-bar .segmented { flex-shrink:0; }.workspace-bar #image-meta { min-width:0; }
@media(max-width:900px) { .workspace-bar .segmented button { padding-left:12px;padding-right:12px; }.compare-controls { margin-left:14px;margin-right:14px; } }
@media(min-width:761px) and (min-height:700px) { .editor .workspace:has(#batch-panel[hidden]):has(#compare-controls:not([hidden])) .stage { height:min(400px,calc(100vh - 270px));min-height:240px; } }
.controls #preset-fields,.controls #composition-fields { border:0;min-width:0;padding:0;margin:0; }
.controls #preset-fields { padding:14px;margin-bottom:22px;background:#f8f7f3;border-radius:9px; }
.preset-row { display:flex;align-items:center;gap:8px; }.preset-row select { flex:1;margin:0; }.preset-row .button { flex:none;padding:10px 15px;min-height:44px;font-size:14px; }
.preset-box .export-label { margin-bottom:8px; }.preset-box .helper { font-size:12px;margin:9px 0 0; }
.composition-box { border:1px solid var(--line);border-radius:9px;margin:20px 0 0; }
.composition-box summary { cursor:pointer;padding:15px;font-size:14px;font-weight:600; }
.controls .composition-box #composition-fields { padding:4px 15px 14px; }
.composition-box .helper,.composition-scope { font-size:12px; }
.color-row { display:flex;align-items:center;gap:10px; }.color-row .export-label { flex:1;min-width:0; }.color-row input[type="color"] { flex:none;width:48px;height:44px;border:1px solid var(--line);border-radius:7px;padding:4px;background:#fff; }
.color-row input[type="text"] { width:100%;box-sizing:border-box;display:block;margin-top:7px;padding:11px;border:1px solid #d8d6ce;border-radius:8px;font:inherit;font-size:16px; }
.composition-box input[type="file"] { display:block;width:100%;font-size:13px;margin-top:9px; }
.composition-box input[type="file"]::file-selector-button { padding:10px 12px;background:#fff;border:1px solid #d8d6ce;border-radius:7px;margin-right:8px;color:var(--ink); }
#background-file-name { overflow-wrap:anywhere; }#composition-status { color:var(--brand-ink); }#composition-status.error { color:#a12d22; }
.placement-heading { display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding-top:14px;margin:15px 0; }.placement-heading strong { font-size:14px; }.placement-heading button { min-height:38px; }
/* Keep a single-photo preview in sight while the longer desktop controls scroll. */
@media (min-width:761px) and (min-height:700px) {
  .editor { overflow:clip; }
  .editor .workspace:has(#batch-panel[hidden]) { position:sticky;top:12px; }
  .editor .workspace:has(#batch-panel[hidden]) .stage { min-height:280px;height:min(475px,calc(100vh - 180px));flex:none; }
  .editor .workspace:has(#batch-panel[hidden]) .stage canvas { max-height:calc(100% - 24px); }
}
.editor-tabs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:10px 12px 0;border-bottom:1px solid var(--line); }
.editor-tabs button { min-width:0;min-height:46px;border:0;border-bottom:2px solid transparent;border-radius:6px 6px 0 0;background:#fff;color:var(--muted);font-size:14px;padding:10px 4px; }
.editor-tabs button[aria-selected="true"] { background:var(--brand-soft);border-bottom-color:var(--brand);color:var(--ink);font-weight:600; }
.control-section[role="tabpanel"] { border-bottom:0; }
.export-section fieldset { padding:0;border:0;margin:0;min-width:0; }
.export-label { display:block;font-size:13px;color:var(--ink);margin:0 0 13px; }
.export-label output { float:right;font-size:15px;font-weight:600; }
.controls select,.export-label input[type="number"] { width:100%;min-width:0;max-width:100%;min-height:44px;margin-top:7px;padding:10px 12px;border:1px solid #d8d6ce;border-radius:8px;background:white;color:var(--ink);font:inherit;font-size:15px; }
.controls input[type="range"] { appearance:none;-webkit-appearance:none;display:block;width:100%;height:32px;min-height:32px;margin:0 0 5px;background:transparent;accent-color:var(--brand);cursor:pointer; }
.controls input[type="range"]::-webkit-slider-runnable-track { height:3px;border-radius:3px;background:#e3e0d6; }
.controls input[type="range"]::-moz-range-track { height:3px;border-radius:3px;background:#e3e0d6; }
.controls input[type="range"]::-webkit-slider-thumb { appearance:none;-webkit-appearance:none;box-sizing:border-box;width:14px;height:14px;margin-top:-5.5px;border:1px solid #b99644;border-radius:50%;background:var(--brand); }
.controls input[type="range"]::-moz-range-thumb { box-sizing:border-box;width:14px;height:14px;border:1px solid #b99644;border-radius:50%;background:var(--brand); }
.controls input[type="range"]:focus-visible { outline:2px solid var(--brand-ink);outline-offset:2px;border-radius:4px; }
.export-modes { display:grid;grid-template-columns:1fr 1fr;gap:3px;background:#f5f5f3;border-radius:8px;padding:3px;margin:17px 0; }
.export-modes button { border:0;background:transparent;border-radius:6px;padding:8px 5px;min-height:38px;font-size:13px;color:var(--muted); }
.export-modes button[aria-pressed="true"] { background:#fff;color:var(--ink);box-shadow:0 1px 3px #29251012; }
.range-labels { display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:17px; }
.export-summary { display:flex;flex-direction:column;gap:7px;background:#f5f5f1;border-radius:10px;padding:15px;margin:18px 0 14px;overflow-wrap:anywhere; }
.export-summary strong { font-size:22px; }.export-summary span { font-size:13px;color:var(--muted);line-height:1.65; }
.export-warning,.export-summary .export-warning { color:#91520d;font-size:13px;line-height:1.7; }
.crop-toggle { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px;border:1px solid #e8dfc9;border-radius:9px;background:var(--brand-soft);margin-bottom:10px; }
.crop-toggle strong { font-size:15px; }.crop-toggle small { display:block;color:var(--muted);font-size:13px;line-height:1.6;margin-top:4px; }
.crop-toggle input { width:21px;height:21px;accent-color:var(--brand);flex-shrink:0; }
#crop-reset { margin-left:auto;white-space:nowrap; }#crop-options { border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:20px; }
.zip-actions { border-top:1px solid var(--line);padding-top:17px;margin-top:17px; }.zip-actions .helper { margin:8px 0 0;font-size:13px;text-align:center; }
.export-confirm { background:var(--brand-soft);border:1px solid #e8dfc9;border-radius:10px;padding:15px;margin-top:18px;overflow-wrap:anywhere; }
.export-confirm h3 { font-size:16px;margin:0 0 10px; }.export-confirm ul { padding-left:20px;font-size:13px;line-height:1.8; }.export-confirm p { font-size:13px;line-height:1.7; }
.export-confirm .text-button { display:block;margin:10px auto 0;min-height:35px; }#export-job { margin-top:15px;font-size:13px;line-height:1.7; }
.download-note.error { color:#a12d22; }.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.workspace-footer { flex-wrap:wrap; }#file-name { flex:1 1 120px; }#crop-shortcut,#replace-file { white-space:nowrap; }
/* Shared editor details: light borders, readable helper text, roomy controls. */
.controls .dimension-row input { min-height:44px;border-radius:8px;border-color:#d8d6ce; }
.controls .dimension-row input[aria-invalid="true"] { border-color:#b8473b; }
.controls .presets button { min-height:40px;border-radius:8px; }
.controls .helper,.controls .consent-details { line-height:1.75; }
#target-options { margin-bottom:18px; }
.editor button:focus-visible { outline:2px solid var(--brand-ink);outline-offset:3px; }
.workspace-footer { gap:12px;line-height:1.6; }
#file-name { font-size:13px; }

/* The entire photo card is the selection target, without an oversized badge. */
.workspace .batch-panel { margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:#fff;padding:20px;min-width:0; }
.workspace .batch-panel h2 { display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;font-size:15px;font-weight:600;margin:0 0 6px; }
#batch-count { font-size:13px;font-weight:400;color:var(--muted); }
.workspace .batch-panel > p { font-size:13px;line-height:1.75;color:var(--muted);margin:6px 0 12px; }
.workspace .batch-panel ol { display:flex;align-items:stretch;gap:10px;list-style:none;overflow-x:auto;scrollbar-width:none;scroll-behavior:auto;scroll-snap-type:none;overflow-anchor:none;padding:4px 3px;margin:0 -3px; }
.workspace .batch-panel ol::-webkit-scrollbar { display:none; }
.workspace .batch-panel li { flex:0 0 clamp(212px,31%,280px);min-width:0;display:flex;flex-direction:column;gap:8px;padding:0;border:0;background:transparent; }
.workspace .batch-panel ol:has(.batch-item-save) li { display:grid;grid-template-rows:1fr 44px; }
.workspace .batch-panel .batch-card { display:flex;flex:1;flex-direction:column;align-items:stretch;gap:10px;min-height:0;width:100%;padding:13px 14px;border:1px solid #dcdad2;border-radius:8px;background:#fff;color:var(--ink);text-align:left;line-height:1.6; }
.workspace .batch-panel .batch-card[aria-pressed="true"] { border-color:#b99644;background:#fffbf1;box-shadow:none; }
.batch-card-meta { display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:12px;line-height:1.5; }
.batch-selected { visibility:hidden;color:var(--brand-ink);font-weight:600; }
.batch-card[aria-pressed="true"] .batch-selected { visibility:visible; }
.batch-filename { display:block;overflow-wrap:anywhere;font-size:13px;font-weight:500;line-height:1.6; }
.batch-card-status { margin-top:auto;display:block;color:var(--muted);font-size:12px;line-height:1.6;overflow-wrap:anywhere; }
.workspace .batch-panel .batch-item-save { width:100%;min-height:40px;font-size:13px;padding:8px 10px; }
.batch-actions { display:flex;gap:10px;flex-wrap:wrap; }
.workspace .batch-actions .button { min-height:44px;font-size:13px; }
.workspace .batch-panel #batch-status { margin:10px 0 0;color:var(--ink); }
.workspace .batch-panel .batch-note { margin:8px 0 0; }
@media (hover:hover) { .batch-card:not(:disabled):hover { border-color:#b5ae99;background:#fdfcf8; } }

/* Visible only when the list overflows; a thin rail inside a 28px target. */
.batch-scroll { margin:6px 0 12px; }
.batch-scroll[hidden] + .batch-actions { margin-top:12px; }
#batch-scrollbar { appearance:none;-webkit-appearance:none;display:block;width:100%;height:28px;margin:0;background:transparent;cursor:ew-resize;--scroll-thumb:48px; }
#batch-scrollbar::-webkit-slider-runnable-track { height:3px;border-radius:3px;background:#e9e7e1; }
#batch-scrollbar::-moz-range-track { height:3px;border-radius:3px;background:#e9e7e1; }
#batch-scrollbar::-webkit-slider-thumb { appearance:none;-webkit-appearance:none;box-sizing:border-box;width:var(--scroll-thumb);height:6px;margin-top:-1.5px;border:0;border-radius:3px;background:#a39f93; }
#batch-scrollbar::-moz-range-thumb { box-sizing:border-box;width:var(--scroll-thumb);height:6px;border:0;border-radius:3px;background:#a39f93; }
#batch-scrollbar:disabled { cursor:default;opacity:.6; }
#batch-scrollbar:focus-visible { outline:2px solid var(--brand-ink);outline-offset:1px;border-radius:4px; }
@media (forced-colors:active) { .batch-card[aria-pressed="true"] { outline:2px solid Highlight;outline-offset:-2px; } #batch-scrollbar,.controls input[type="range"] { appearance:auto; } }
@media (max-width:760px) {
  .controls select,.export-label input[type="number"] { font-size:16px; }
  .editor-tabs { padding-top:8px; }.editor-tabs button,.export-modes button { min-height:44px; }
  .workspace .batch-panel { padding:18px 16px; }
  .workspace .batch-panel li { flex-basis:218px; }
  .workspace .batch-panel .batch-item-save { min-height:44px; }
  .control-section { padding:20px; }.controls input[type="range"] { min-height:34px; }
  .controls .presets button { min-height:44px; }
}
@media (max-width:370px) {
  .control-section { padding:16px; }.workspace .batch-panel { padding:16px 12px; }
  .workspace .batch-panel li { flex-basis:202px; }.editor-tabs button { font-size:13px; }
}
.transform-box { min-width: 0; margin: 20px 0; padding: 0; border: 0; }
.transform-box legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.transform-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.transform-buttons .button { min-width: 0; min-height: 44px; padding: 9px 6px; font-size: 13px; }
.transform-buttons [aria-pressed="true"] { background: #fbf5e5; border-color: #c9a044; color: #705723; }
.transform-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.transform-footer .helper { margin: 0; font-size: 12px; }
.transform-footer .text-button { font-size: 12px; }
