.imgpdf-root{--imgpdf-ink:#1b2220;--imgpdf-muted:#5f6b67;--imgpdf-faint:#8a948f;--imgpdf-line:#e2e6e3;--imgpdf-line-2:#cfd6d2;--imgpdf-surface:#ffffff;--imgpdf-sunken:#f5f7f6;--imgpdf-danger:#b42318;--imgpdf-danger-bg:#fef3f2;--imgpdf-ok:#167a4a;--imgpdf-ok-bg:#ecf8f1;--imgpdf-accent-soft:color-mix(in srgb,var(--imgpdf-accent,#1e6b52) 10%,#fff);--imgpdf-accent-mid:color-mix(in srgb,var(--imgpdf-accent,#1e6b52) 28%,#fff);--imgpdf-accent-ink:color-mix(in srgb,var(--imgpdf-accent,#1e6b52) 85%,#000);--imgpdf-r:var(--imgpdf-radius,12px);--imgpdf-r-sm:calc(var(--imgpdf-r) * .6);display:block;margin:0 auto 2rem;max-width:920px;color:var(--imgpdf-ink);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
.imgpdf-root *,.imgpdf-root *::before,.imgpdf-root *::after{box-sizing:border-box}
.imgpdf-root [hidden]{display:none!important}
.imgpdf-root p{margin:0}
.imgpdf-root img{max-width:100%;height:auto;border:0;box-shadow:none;margin:0}
.imgpdf-app{background:var(--imgpdf-surface);border:1px solid var(--imgpdf-line);border-radius:var(--imgpdf-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){.imgpdf-app{padding:14px}}
.imgpdf-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) */
.imgpdf-root button.imgpdf-btn,.imgpdf-root a.imgpdf-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(--imgpdf-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}
.imgpdf-root .imgpdf-btn:active{transform:translateY(1px)}
.imgpdf-root .imgpdf-btn:focus-visible{outline:2px solid var(--imgpdf-accent,#1e6b52);outline-offset:2px}
.imgpdf-root .imgpdf-btn svg{width:18px;height:18px;flex:none}
.imgpdf-root .imgpdf-btn.imgpdf-btn-primary{background:var(--imgpdf-accent,#1e6b52);color:#fff}
.imgpdf-root .imgpdf-btn.imgpdf-btn-primary:hover{background:var(--imgpdf-accent-ink)}
.imgpdf-root .imgpdf-btn.imgpdf-btn-secondary{background:var(--imgpdf-surface);color:var(--imgpdf-ink);border:1px solid var(--imgpdf-line-2)}
.imgpdf-root .imgpdf-btn.imgpdf-btn-secondary:hover{border-color:var(--imgpdf-faint);background:var(--imgpdf-sunken)}
.imgpdf-root .imgpdf-btn.imgpdf-btn-ghost{color:var(--imgpdf-muted);padding:0 10px;min-height:36px;font-weight:500}
.imgpdf-root .imgpdf-btn.imgpdf-btn-ghost:hover{color:var(--imgpdf-ink);background:var(--imgpdf-sunken)}
.imgpdf-root .imgpdf-btn.imgpdf-btn-lg{min-height:50px;font-size:15.5px;padding:0 26px}
.imgpdf-root .imgpdf-btn.imgpdf-btn-block{display:flex;width:100%}
.imgpdf-root .imgpdf-btn[disabled]{opacity:.45;cursor:not-allowed;transform:none}
.imgpdf-root button.imgpdf-icon-btn{all:unset;box-sizing:border-box;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:var(--imgpdf-r-sm);color:var(--imgpdf-muted);cursor:pointer;transition:background-color .15s,color .15s}
.imgpdf-root .imgpdf-icon-btn:hover{background:var(--imgpdf-sunken);color:var(--imgpdf-ink)}
.imgpdf-root .imgpdf-icon-btn:focus-visible{outline:2px solid var(--imgpdf-accent,#1e6b52);outline-offset:1px}
.imgpdf-root .imgpdf-icon-btn svg{width:18px;height:18px}
.imgpdf-root .imgpdf-icon-btn[disabled]{opacity:.35;cursor:not-allowed}

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

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

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

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

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

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

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

/* Checkerboard for transparent previews */
.imgpdf-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}
.imgpdf-fade{animation:imgpdf-fade .25s ease-out}
@keyframes imgpdf-fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.imgpdf-fade,.imgpdf-spin{animation:none}}

.imgpdf-root ol.imgpdf-pdf-grid{list-style:none;margin:0!important;padding:0!important;display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));gap:12px}
.imgpdf-pdf-card{margin:0!important;padding:8px;border:1px solid var(--imgpdf-line);border-radius:calc(var(--imgpdf-r) - 4px);background:#fff;cursor:grab;transition:border-color .15s,box-shadow .15s,opacity .15s;list-style:none}
.imgpdf-pdf-card::marker{content:none}
.imgpdf-pdf-card:hover{border-color:var(--imgpdf-line-2);box-shadow:0 4px 14px -8px rgba(0,0,0,.25)}
.imgpdf-pdf-card.is-dragging{opacity:.4}
.imgpdf-pdf-card.is-over{border-color:var(--imgpdf-accent,#1e6b52);box-shadow:0 0 0 2px var(--imgpdf-accent-soft)}
.imgpdf-pdf-thumb{position:relative;aspect-ratio:3/4;display:grid;place-items:center;overflow:hidden;border-radius:var(--imgpdf-r-sm);background:var(--imgpdf-sunken)}
.imgpdf-pdf-thumb img{max-width:86%!important;max-height:86%!important;object-fit:contain;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:transform .2s;background:#fff}
.imgpdf-pdf-num{position:absolute;left:6px;top:6px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--imgpdf-ink);color:#fff;font-size:11.5px;font-weight:700;display:grid;place-items:center}
.imgpdf-pdf-name{font-size:12px;color:var(--imgpdf-muted);margin:7px 2px 2px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imgpdf-pdf-tools{display:flex;justify-content:space-between}
.imgpdf-root .imgpdf-pdf-tools .imgpdf-icon-btn{width:30px;height:30px}
.imgpdf-root .imgpdf-pdf-tools .imgpdf-icon-btn svg{width:16px;height:16px}
.imgpdf-pdf-done{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px}
.imgpdf-pdf-done-text{font-size:14px;color:var(--imgpdf-muted)}
.imgpdf-pdf-done-text b{color:var(--imgpdf-ok)}
