/* ArtistCastle Image Splitter. Every rule is scoped to .acis; nothing targets :root, html or body. */
.acis{--head:#1C1714;--ink:#3D2F2A;--soft:#FFF2F0;--card:#FFFFFF;--coral:#FF5244;--coral2:#FF928A;--muted:#9A8880;--sub:#6B5B54;--acc:#C4301F;--acc-h:#9E2417;--err:#A8200F;
 box-sizing:border-box;max-width:960px;margin:0 auto;padding:16px 0;color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.55;text-align:left}
.acis *{box-sizing:border-box}
.acis [hidden]{display:none!important}
.acis h2{color:var(--head);margin:1.4em 0 .4em}
.acis p{margin:.5em 0}
.acis-card{background:var(--card);border:1px solid var(--muted);border-top:4px solid var(--coral);border-radius:12px;padding:16px;margin:12px 0}
.acis-drop{border:2px dashed var(--muted);border-radius:12px;padding:32px 16px;text-align:center;background:var(--soft)}
.acis-drop.acis-over{border:2px solid var(--coral);background:#FFE6E2}
.acis button,.acis select,.acis input[type=number]{font:inherit;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.3;min-height:44px;margin:0;border-radius:8px;border:1px solid var(--muted);background:var(--card);color:var(--ink);padding:6px 12px;text-transform:none;letter-spacing:normal;box-shadow:none}
.acis button{cursor:pointer}
.acis button:hover:not(:disabled){background:var(--soft)}
.acis button.acis-primary{background:var(--acc);color:#fff;border-color:var(--acc);font-weight:700}
.acis button.acis-primary:hover:not(:disabled){background:var(--acc-h);border-color:var(--acc-h)}
.acis button[aria-pressed=true]{border:2px solid var(--acc);background:var(--soft);font-weight:700}
.acis button:disabled,.acis select:disabled,.acis input:disabled{opacity:.5;cursor:not-allowed}
.acis :focus-visible{outline:3px solid var(--head);outline-offset:2px}
.acis-row{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin:8px 0}
.acis label{display:flex;flex-direction:column;font-weight:600;font-size:.9rem;gap:4px;color:var(--head)}
.acis input[type=number]{width:90px}
.acis-h{font-weight:700;color:var(--head);margin:1.2em 0 .2em}
.acis-hint,.acis-meta{color:var(--sub);font-size:.95rem;margin:4px 0}
.acis-err{color:var(--err);font-weight:600;margin:4px 0}
.acis-stage{position:relative;display:inline-block;max-width:100%;line-height:0;border:1px solid var(--muted);background:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%) 0 0/16px 16px}
.acis-stage img{max-width:100%;max-height:70vh;display:block;height:auto}
.acis-ov{position:absolute;inset:0}
.acis-cell{position:absolute;border:1px solid rgba(255,255,255,.95);outline:1px solid rgba(0,0,0,.55);outline-offset:-2px;display:flex;align-items:center;justify-content:center;line-height:1}
.acis-cell b{background:rgba(28,23,20,.78);color:#fff;border-radius:999px;padding:3px 7px;font-size:12px}
.acis-pieces{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:8px}
.acis-pieces button{text-align:left;font-size:.85rem}
.acis progress{width:100%;height:14px;accent-color:var(--coral)}
.acis details{border-bottom:1px solid var(--muted);padding:8px 0}
.acis summary{cursor:pointer;font-weight:600;color:var(--head)}
.acis-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
