.ai-style-finder { box-sizing:border-box; width:min(540px,94vw); max-height:86dvh; overflow:auto; padding:22px; color:#242725; background:#fff; border:1px solid #d9dcd8; border-radius:14px; }
.ai-style-finder {
  position: fixed;
  inset: 0;
  margin: auto;
}
.ai-style-finder::backdrop { background:rgb(25 32 30 / .45); }
.ai-style-finder header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ai-style-finder h3 { margin:0; }
.ai-style-finder button,.ai-style-finder input { font:inherit; }
.ai-style-finder button { color:inherit; background:white; border:1px solid #d4d8d5; border-radius:8px; padding:7px 12px; cursor:pointer; }
.ai-style-finder button:disabled { opacity:.5; cursor:default; }
.ai-style-finder footer { display:grid; gap:8px; }
.ai-style-finder small,.finder-note { font-size:12px; color:#565e59; }
.finder-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:14px 0; }
.finder-results button { display:grid; padding:4px 4px 8px; gap:4px; align-content:start; min-width:0; overflow-wrap:anywhere; }
.finder-results button[aria-pressed=true] { border-color:#234b40; outline:2px solid #234b40; }
.finder-result { position:relative; min-width:0; }
.finder-result > button { width:100%; height:100%; }
.finder-cover-actions { position:absolute; inset:5px 5px auto; aspect-ratio:1; display:flex; align-items:flex-end; overflow:hidden; border-radius:4px; pointer-events:none; }
.finder-cover-actions button { display:block; width:100%; padding:4px 6px; min-height:24px; color:#fff; background:rgb(0 0 0 / .55); border:0; border-radius:0; font-size:11px; line-height:1.2; pointer-events:auto; }
.finder-cover-actions button:hover,.finder-cover-actions button:focus-visible { background:rgb(0 0 0 / .75); }
.finder-cover-actions button[hidden] { display:none; }
.finder-gallery-dialog { position:fixed; inset:0; margin:0; width:100%; height:100%; max-width:none; max-height:none; padding:0; border:0; background:transparent; }
.finder-cover { display:grid; place-items:center; position:relative; overflow:hidden; aspect-ratio:1; border-radius:4px; background:#f3f4f1; font-size:11px; }
.finder-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ai-style-finder footer button { justify-self:end; }
#workflowStyleModal .workflows-style-mode-tabs:has(#workflowStyleFinderBtn) { flex-wrap:wrap; }
.ai-style-finder { font-family:inherit; color:var(--ink,#242725); border-color:var(--line,#d9dcd8); box-shadow:0 16px 60px #18221b29; }
.style-offer-card { display:flex; gap:16px; align-items:center; border:1px solid var(--line,#d9dcd8); border-radius:8px; padding:10px; margin:16px 0; }
.style-offer-card .finder-cover { width:clamp(76px,22vw,112px); flex-shrink:0; }
.style-offer-card strong { display:block; margin-top:4px; overflow-wrap:anywhere; }
.style-offer-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.style-offer-actions button { min-height:44px; }
.style-offer-actions .offer-primary { background:var(--ink,#242725); color:var(--bg,#fff); }
@media(max-width:480px){ .ai-style-finder { padding:16px; } .style-offer-actions button { flex:1 1 120px; } }
.ai-style-finder header button { min-width:44px; min-height:44px; }
.ai-style-finder button:focus-visible,.ai-style-finder input:focus-visible { outline:2px solid var(--accent,#365e50); outline-offset:2px; }
.ai-style-finder:has(.finder-results) [data-apply]:enabled { color:var(--bg,#fff); background:var(--ink,#242725); }

.finder-activity { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-block:8px; font-size:14px; }
.finder-activity button { font:inherit; color:inherit; background:transparent; border:1px solid var(--line,#ccc); border-radius:6px; padding:5px 10px; cursor:pointer; }
.finder-working::before { content:''; display:inline-block; vertical-align:-2px; width:14px; height:14px; margin-right:8px; border:2px solid #d4dad5; border-top-color:#455b4d; border-radius:50%; animation:finder-spin .85s linear infinite; }
@keyframes finder-spin { to {transform:rotate(360deg)} }
@media(prefers-reduced-motion:reduce){.finder-working::before{animation:none}}

.finder-input-wrap { position:relative; }
.finder-upload [data-finder-source] { width:auto; max-width:100%; height:96px; object-fit:contain; }
.finder-upload:has(img:not([hidden]))::before {display:none;}
.finder-upload.is-loading {background:#e7e9e7; color:#414a45;}
.finder-upload.is-loading [data-picker-label]::before { content:''; display:inline-block; width:16px; height:16px; vertical-align:-3px; margin-right:8px; border:2px solid #bec5c0; border-top-color:#46584b; border-radius:50%; animation:finder-spin .85s linear infinite; }
.finder-upload.is-loading img { opacity:.45; }
.ai-style-finder [data-remove-source] {position:absolute; top:4px; right:4px; width:36px; height:36px; padding:0; border-radius:50%; font-size:20px;}
@media(prefers-reduced-motion:reduce){.finder-upload.is-loading [data-picker-label]::before{animation:none;}}

.finder-input-wrap [hidden] { display:none !important; }
.finder-crop-choice:not([hidden]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }
.finder-crop-choice button { display:grid; gap:6px; justify-items:center; min-width:0; }
.finder-crop-choice img { width:100%; height:clamp(80px,16vh,135px); object-fit:contain; background:var(--bg-soft,#f5f5f5); }
