.imgr-root{--imgr-ink:#1b2220;--imgr-muted:#5f6b67;--imgr-faint:#8a948f;--imgr-line:#e2e6e3;--imgr-line-2:#cfd6d2;--imgr-surface:#ffffff;--imgr-sunken:#f5f7f6;--imgr-danger:#b42318;--imgr-danger-bg:#fef3f2;--imgr-ok:#167a4a;--imgr-ok-bg:#ecf8f1;--imgr-accent-soft:color-mix(in srgb,var(--imgr-accent,#1e6b52) 10%,#fff);--imgr-accent-mid:color-mix(in srgb,var(--imgr-accent,#1e6b52) 28%,#fff);--imgr-accent-ink:color-mix(in srgb,var(--imgr-accent,#1e6b52) 85%,#000);--imgr-r:var(--imgr-radius,12px);--imgr-r-sm:calc(var(--imgr-r) * .6);display:block;margin:0 auto 2rem;max-width:920px;color:var(--imgr-ink);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
.imgr-root *,.imgr-root *::before,.imgr-root *::after{box-sizing:border-box}
.imgr-root [hidden]{display:none!important}
.imgr-root p{margin:0}
.imgr-root img{max-width:100%;height:auto;border:0;box-shadow:none;margin:0}
.imgr-app{background:var(--imgr-surface);border:1px solid var(--imgr-line);border-radius:var(--imgr-r);padding:22px;box-shadow:0 1px 0 rgba(16,24,20,.03),0 12px 32px -18px rgba(16,24,20,.18)}
@media (max-width:600px){.imgr-app{padding:14px}}
.imgr-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Buttons (reset theme styles) */
.imgr-root button.imgr-btn,.imgr-root a.imgr-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 18px;border-radius:var(--imgr-r-sm);font:inherit;font-size:14.5px;font-weight:600;line-height:1;letter-spacing:0;text-transform:none;cursor:pointer;white-space:nowrap;transition:background-color .15s,border-color .15s,color .15s,transform .05s;user-select:none;-webkit-tap-highlight-color:transparent}
.imgr-root .imgr-btn:active{transform:translateY(1px)}
.imgr-root .imgr-btn:focus-visible{outline:2px solid var(--imgr-accent,#1e6b52);outline-offset:2px}
.imgr-root .imgr-btn svg{width:18px;height:18px;flex:none}
.imgr-root .imgr-btn.imgr-btn-primary{background:var(--imgr-accent,#1e6b52);color:#fff}
.imgr-root .imgr-btn.imgr-btn-primary:hover{background:var(--imgr-accent-ink)}
.imgr-root .imgr-btn.imgr-btn-secondary{background:var(--imgr-surface);color:var(--imgr-ink);border:1px solid var(--imgr-line-2)}
.imgr-root .imgr-btn.imgr-btn-secondary:hover{border-color:var(--imgr-faint);background:var(--imgr-sunken)}
.imgr-root .imgr-btn.imgr-btn-ghost{color:var(--imgr-muted);padding:0 10px;min-height:36px;font-weight:500}
.imgr-root .imgr-btn.imgr-btn-ghost:hover{color:var(--imgr-ink);background:var(--imgr-sunken)}
.imgr-root .imgr-btn.imgr-btn-lg{min-height:50px;font-size:15.5px;padding:0 26px}
.imgr-root .imgr-btn.imgr-btn-block{display:flex;width:100%}
.imgr-root .imgr-btn[disabled]{opacity:.45;cursor:not-allowed;transform:none}
.imgr-root button.imgr-icon-btn{all:unset;box-sizing:border-box;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:var(--imgr-r-sm);color:var(--imgr-muted);cursor:pointer;transition:background-color .15s,color .15s}
.imgr-root .imgr-icon-btn:hover{background:var(--imgr-sunken);color:var(--imgr-ink)}
.imgr-root .imgr-icon-btn:focus-visible{outline:2px solid var(--imgr-accent,#1e6b52);outline-offset:1px}
.imgr-root .imgr-icon-btn svg{width:18px;height:18px}
.imgr-root .imgr-icon-btn[disabled]{opacity:.35;cursor:not-allowed}

/* Drop zone */
.imgr-drop{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 20px 34px;border:1.5px dashed var(--imgr-line-2);border-radius:calc(var(--imgr-r) - 4px);background:linear-gradient(var(--imgr-sunken),var(--imgr-sunken)) padding-box;cursor:pointer;transition:border-color .15s,background-color .15s}
.imgr-drop:hover{border-color:var(--imgr-accent,#1e6b52)}
.imgr-drop.is-drag{border-color:var(--imgr-accent,#1e6b52);background:var(--imgr-accent-soft)}
.imgr-drop-art{width:84px;height:64px;margin-bottom:14px;color:var(--imgr-accent,#1e6b52)}
.imgr-drop-title{font-size:17px;font-weight:650;margin:0 0 4px!important}
.imgr-drop-or{font-size:13px;color:var(--imgr-faint);margin:2px 0 12px!important}
.imgr-drop-meta{font-size:12.5px;color:var(--imgr-muted);margin-top:14px!important}
.imgr-drop-compact{flex-direction:row;justify-content:center;gap:12px;padding:14px;text-align:left}
.imgr-drop-compact .imgr-drop-art{width:36px;height:28px;margin:0}

/* Privacy note */
.imgr-privacy{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px!important;text-align:center;font-size:12.5px;color:var(--imgr-muted)}
.imgr-privacy svg{width:15px;height:15px;color:var(--imgr-ok);flex:none}

/* Panels and fields */
.imgr-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.imgr-bar-title{font-weight:650;font-size:15px}
.imgr-bar-sub{color:var(--imgr-muted);font-size:13px;font-weight:400;margin-left:6px}
.imgr-bar-actions{display:flex;gap:6px;flex-wrap:wrap}
.imgr-panel{border:1px solid var(--imgr-line);border-radius:calc(var(--imgr-r) - 4px);padding:16px;background:var(--imgr-surface)}
.imgr-panel+.imgr-panel{margin-top:12px}
.imgr-grid{display:grid;gap:16px 18px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.imgr-field{min-width:0}
.imgr-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12.5px;font-weight:600;color:var(--imgr-muted);margin:0 0 7px!important;letter-spacing:.01em}
.imgr-label output,.imgr-label .imgr-val{color:var(--imgr-ink);font-weight:600;font-variant-numeric:tabular-nums}
.imgr-hint{font-size:12px;color:var(--imgr-faint);margin-top:6px!important}
.imgr-root input.imgr-input,.imgr-root select.imgr-input{all:unset;box-sizing:border-box;display:block;width:100%;height:40px;padding:0 12px;border:1px solid var(--imgr-line-2);border-radius:var(--imgr-r-sm);background:#fff;color:var(--imgr-ink);font:inherit;font-size:14.5px;line-height:38px;transition:border-color .15s,box-shadow .15s}
.imgr-root select.imgr-input{padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6b67' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}
.imgr-root .imgr-input:focus{border-color:var(--imgr-accent,#1e6b52);box-shadow:0 0 0 3px var(--imgr-accent-soft)}
.imgr-root .imgr-input[disabled]{background:var(--imgr-sunken);color:var(--imgr-faint);cursor:not-allowed}
.imgr-inline{display:flex;gap:8px;align-items:center}
.imgr-inline>.imgr-input{flex:1;min-width:0}
.imgr-unit{font-size:13px;color:var(--imgr-muted);flex:none}
.imgr-root input[type=range].imgr-range{-webkit-appearance:none;appearance:none;display:block;width:100%;height:22px;margin:0;padding:0;background:transparent;border:0;box-shadow:none;cursor:pointer}
.imgr-range::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(var(--imgr-accent,#1e6b52),var(--imgr-accent,#1e6b52)) 0/var(--imgr-fill,50%) 100% no-repeat,var(--imgr-line)}
.imgr-range::-moz-range-track{height:4px;border-radius:4px;background:var(--imgr-line)}
.imgr-range::-moz-range-progress{height:4px;border-radius:4px;background:var(--imgr-accent,#1e6b52)}
.imgr-range::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;margin-top:-7px;border-radius:50%;background:#fff;border:2px solid var(--imgr-accent,#1e6b52);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.imgr-range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:2px solid var(--imgr-accent,#1e6b52)}
.imgr-range:focus-visible{outline:2px solid var(--imgr-accent,#1e6b52);outline-offset:2px}
.imgr-root input[type=color].imgr-color{-webkit-appearance:none;appearance:none;width:40px;height:40px;padding:3px;border:1px solid var(--imgr-line-2);border-radius:var(--imgr-r-sm);background:#fff;cursor:pointer;flex:none}
.imgr-color::-webkit-color-swatch-wrapper{padding:0}
.imgr-color::-webkit-color-swatch{border:0;border-radius:calc(var(--imgr-r-sm) - 3px)}
.imgr-color::-moz-color-swatch{border:0;border-radius:4px}
.imgr-check{display:inline-flex;align-items:center;gap:9px;font-size:14px;cursor:pointer;user-select:none}
.imgr-root .imgr-check input{width:17px;height:17px;margin:0;accent-color:var(--imgr-accent,#1e6b52);cursor:pointer}

/* Segmented control */
.imgr-seg{display:flex;flex-wrap:wrap;gap:6px}
.imgr-root button.imgr-chip{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 14px;border:1px solid var(--imgr-line-2);border-radius:var(--imgr-r-sm);background:#fff;color:var(--imgr-ink);font:inherit;font-size:13.5px;font-weight:500;cursor:pointer;transition:border-color .15s,background-color .15s,color .15s;white-space:nowrap}
.imgr-root .imgr-chip:hover{border-color:var(--imgr-faint)}
.imgr-root .imgr-chip[aria-pressed=true]{border-color:var(--imgr-accent,#1e6b52);background:var(--imgr-accent-soft);color:var(--imgr-accent-ink);box-shadow:inset 0 0 0 1px var(--imgr-accent,#1e6b52)}
.imgr-root .imgr-chip:focus-visible{outline:2px solid var(--imgr-accent,#1e6b52);outline-offset:2px}
.imgr-root .imgr-chip[disabled]{opacity:.4;cursor:not-allowed}
.imgr-seg-fill .imgr-chip{flex:1}
.imgr-tabs{display:flex;gap:2px;padding:3px;background:var(--imgr-sunken);border-radius:var(--imgr-r-sm);margin-bottom:16px}
.imgr-root .imgr-tabs .imgr-chip{flex:1;border:0;background:transparent;min-height:34px;color:var(--imgr-muted)}
.imgr-root .imgr-tabs .imgr-chip[aria-pressed=true]{background:#fff;color:var(--imgr-ink);box-shadow:0 1px 2px rgba(0,0,0,.08),0 0 0 1px var(--imgr-line)}

/* File list */
.imgr-list{list-style:none;margin:0!important;padding:0!important;display:grid;gap:8px}
.imgr-list>li{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 8px 8px 8px;margin:0!important;border:1px solid var(--imgr-line);border-radius:calc(var(--imgr-r) - 4px);background:#fff;list-style:none}
.imgr-list>li::before,.imgr-list>li::marker{content:none}
.imgr-thumb{width:52px;height:52px;border-radius:var(--imgr-r-sm);object-fit:cover;background:var(--imgr-sunken);display:block}
.imgr-fname{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imgr-fmeta{font-size:12.5px;color:var(--imgr-muted);margin-top:3px!important;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;font-variant-numeric:tabular-nums}
.imgr-arrow{color:var(--imgr-faint)}
.imgr-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;font-size:11.5px;font-weight:650;background:var(--imgr-ok-bg);color:var(--imgr-ok)}
.imgr-badge-warn{background:#fff6e5;color:#93500b}
.imgr-badge-muted{background:var(--imgr-sunken);color:var(--imgr-muted)}
.imgr-badge-err{background:var(--imgr-danger-bg);color:var(--imgr-danger)}
.imgr-row-actions{display:flex;gap:2px;align-items:center}
.imgr-spin{width:18px;height:18px;border:2px solid var(--imgr-line);border-top-color:var(--imgr-accent,#1e6b52);border-radius:50%;animation:imgr-spin .7s linear infinite;display:inline-block}
@keyframes imgr-spin{to{transform:rotate(360deg)}}
@media (max-width:520px){.imgr-list>li{grid-template-columns:44px minmax(0,1fr);}.imgr-thumb{width:44px;height:44px}.imgr-row-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid var(--imgr-line);padding-top:6px}}

/* Footer actions */
.imgr-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px}
.imgr-actions .imgr-grow{flex:1}
.imgr-summary{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;padding:12px 14px;margin-top:14px;border-radius:calc(var(--imgr-r) - 4px);background:var(--imgr-ok-bg);color:#0f5132;font-size:14px}
.imgr-summary b{font-variant-numeric:tabular-nums}

/* Messages */
.imgr-msg{display:flex;gap:9px;align-items:flex-start;margin-top:12px;padding:10px 12px;border-radius:var(--imgr-r-sm);font-size:13.5px;background:var(--imgr-danger-bg);color:var(--imgr-danger)}
.imgr-msg svg{width:17px;height:17px;flex:none;margin-top:1px}
.imgr-msg-info{background:var(--imgr-sunken);color:var(--imgr-muted)}
.imgr-progress{height:4px;border-radius:4px;background:var(--imgr-line);overflow:hidden;margin-top:12px}
.imgr-progress>span{display:block;height:100%;width:0;background:var(--imgr-accent,#1e6b52);transition:width .2s}

/* Checkerboard for transparent previews */
.imgr-checker{background-color:#fff;background-image:linear-gradient(45deg,#eef0ef 25%,transparent 25%),linear-gradient(-45deg,#eef0ef 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eef0ef 75%),linear-gradient(-45deg,transparent 75%,#eef0ef 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}
.imgr-fade{animation:imgr-fade .25s ease-out}
@keyframes imgr-fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.imgr-fade,.imgr-spin{animation:none}}

.imgr-rs-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:22px;align-items:start}
@media (max-width:720px){.imgr-rs-layout{grid-template-columns:1fr}}
.imgr-rs-frame{display:grid;place-items:center;min-height:220px;max-height:420px;padding:10px;border-radius:calc(var(--imgr-r) - 4px);background:var(--imgr-sunken);overflow:hidden}
.imgr-rs-frame img{max-height:400px!important;width:auto;object-fit:contain;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.imgr-rs-wh{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:end}
.imgr-root .imgr-rs-lock{margin-bottom:3px}
.imgr-root .imgr-rs-lock[aria-pressed=true]{color:var(--imgr-accent,#1e6b52);background:var(--imgr-accent-soft)}
.imgr-rs-out{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:20px!important;padding:12px 14px;border-radius:var(--imgr-r-sm);background:var(--imgr-sunken);font-size:14px;color:var(--imgr-muted)}
.imgr-rs-out b{color:var(--imgr-ink);font-variant-numeric:tabular-nums}
.imgr-rs-result{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:center;margin-top:20px;background:var(--imgr-ok-bg);border-color:transparent}
@media (max-width:640px){.imgr-rs-result{grid-template-columns:1fr}}
.imgr-rs-result-img{display:grid;place-items:center;max-height:320px;overflow:hidden}
.imgr-rs-result-img img{max-height:300px!important;width:auto;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.15)}
