/* ============================================================
   Image Cropper - scoped under .icr / .icr-* (rebuilt 2026-10-06)
   Shared header, footer, FAQ and related pills come from custom_styles.css.
   Accent per category. Single colours, no gradients, no 4px side borders.
   Light default, dark via [data-theme="dark"].
   ============================================================ */
.icr {
    --icr-accent: #339966;
    --icr-accent-strong: #2a7d54;
    --icr-accent-soft: rgba(51, 153, 102, 0.09);
    --icr-accent-line: rgba(51, 153, 102, 0.4);
    --icr-go: #2b7a52;
    --icr-go-hover: #22633f;
    --icr-card: var(--bg-elevated, #fff);
    --icr-sunk: var(--card-tertiary, #f1f5f9);
    --icr-open: var(--card-secondary, #f8f9fa);
    --icr-line: var(--border-color, #e2e8f0);
    --icr-text-1: var(--text-primary, #1e293b);
    --icr-text-2: var(--text-secondary, #555);
    --icr-muted: var(--text-muted, #64748b);
    --icr-checker: #e5e7eb;
    --icr-checker-bg: #fff;
    --icr-ok: #2f855a;
    --icr-ok-soft: rgba(51, 153, 102, 0.1);
    --icr-ok-line: rgba(51, 153, 102, 0.35);
    --icr-warn: #b45309;
    --icr-info: #3399cc;
    --icr-red: #c23b3b;
}
[data-theme="dark"] .icr {
    --icr-accent: #5cc28d;
    --icr-accent-strong: #86d6ad;
    --icr-accent-soft: rgba(92, 194, 141, 0.12);
    --icr-accent-line: rgba(92, 194, 141, 0.45);
    --icr-go: #2b7a52;
    --icr-go-hover: #22633f;
    --icr-sunk: #172033;
    --icr-open: #1a2438;
    --icr-checker: #334155;
    --icr-checker-bg: #1e293b;
    --icr-ok: #4ade80;
    --icr-ok-soft: rgba(74, 222, 128, 0.1);
    --icr-ok-line: rgba(74, 222, 128, 0.35);
    --icr-warn: #fbbf24;
    --icr-info: #60a5fa;
    --icr-red: #f87171;
}

.icr.tool-container { max-width: 1000px; margin: 0 auto; padding: 2rem; }
.icr [hidden] { display: none !important; }
.icr .icr-main { background: none; border: none; box-shadow: none; border-radius: 0; overflow: visible; padding: 0; }
.icr button { width: auto; font: inherit; }
.icr .faq-question { width: 100%; }
.icr code { font-size: 0.86em; padding: 0.05rem 0.35rem; border-radius: 5px; background: var(--icr-sunk); }

/* ---------- title ---------- */
.icr .tool-header { text-align: center; margin-bottom: 1.75rem; }
.icr .tool-title-row { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.icr .icr-title-icon {
    width: 56px; height: 56px; border-radius: 16px; background: var(--icr-accent); color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
[data-theme="dark"] .icr .icr-title-icon { color: #0b1e33; }
.icr .icr-title-icon svg { width: 30px; height: 30px; display: block; }
.icr .tool-title { margin: 0; font-size: 2rem; font-weight: 700; color: var(--icr-accent); line-height: 1.2; }
.icr .tool-description { max-width: 800px; margin: 0 auto; font-size: 1.05rem; line-height: 1.65; color: var(--icr-text-2); }
.icr .tool-description a { color: var(--icr-accent-strong); font-weight: 500; }
[data-theme="dark"] .icr .tool-description a { color: var(--icr-accent); }

/* ---------- error ---------- */
.icr .icr-error {
    display: flex; align-items: flex-start; gap: 0.7rem; margin: 0 0 1rem; padding: 0.9rem 1rem;
    border-radius: 12px; border: 1px solid rgba(230, 78, 78, 0.35); background: rgba(230, 78, 78, 0.08); color: var(--icr-text-1);
}
.icr .icr-error > svg { width: 20px; height: 20px; color: #e64e4e; flex-shrink: 0; margin-top: 2px; }
.icr .icr-error > div { flex: 1; min-width: 0; }
.icr .icr-error p { margin: 0; font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.icr .icr-error p + p { margin-top: 0.3rem; color: var(--icr-muted); font-size: 0.86rem; }
.icr .icr-error a { color: var(--icr-red); font-weight: 600; }
.icr .icr-x {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0;
    border: none; border-radius: 8px; background: none; color: var(--icr-muted); cursor: pointer; padding: 0;
}
.icr .icr-x:hover { background: rgba(100, 116, 139, 0.12); color: var(--icr-text-1); }
.icr .icr-x svg { width: 17px; height: 17px; }

/* ---------- cards + shared ---------- */
.icr .icr-card {
    background: var(--icr-card); border: 1px solid var(--icr-line); border-radius: 20px;
    padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem;
}
.icr .icr-h { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.98rem; font-weight: 700; color: var(--icr-text-1); }
.icr .icr-h svg { width: 18px; height: 18px; color: var(--icr-accent); flex-shrink: 0; }
.icr .icr-label { display: block; margin: 0 0 0.45rem; font-size: 0.85rem; font-weight: 700; color: var(--icr-text-1); }
.icr .icr-hint { margin: 0.55rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--icr-muted); overflow-wrap: anywhere; }
.icr .icr-caption { display: block; margin: 0 0 0.45rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--icr-muted); }
.icr .icr-checker {
    background-color: var(--icr-checker-bg);
    background-image:
        linear-gradient(45deg, var(--icr-checker) 25%, transparent 25%),
        linear-gradient(-45deg, var(--icr-checker) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--icr-checker) 75%),
        linear-gradient(-45deg, transparent 75%, var(--icr-checker) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.icr .icr-bg-white { background: #fff; }
.icr .icr-bg-dark { background: #111827; }

/* ---------- buttons ---------- */
.icr .icr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    min-height: 44px; padding: 0.6rem 1.1rem; border-radius: 12px; border: 1px solid transparent;
    font-size: 0.95rem; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.icr .icr-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.icr .icr-go { background: var(--icr-go); color: #fff; }
.icr .icr-go:hover:not(:disabled) { background: var(--icr-go-hover); color: #fff; }
.icr .icr-go:disabled { opacity: 0.55; cursor: not-allowed; }
.icr .icr-btn-lg { min-height: 50px; padding: 0.65rem 1.5rem; font-size: 1rem; }
.icr .icr-btn-sm { min-height: 36px; padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 10px; }
.icr .icr-btn-sm svg { width: 16px; height: 16px; }
.icr .icr-btn-ghost { background: var(--icr-sunk); color: var(--icr-text-2); border-color: var(--icr-line); }
.icr .icr-btn-ghost:hover:not(:disabled) { color: var(--icr-text-1); border-color: var(--icr-accent-line); }
.icr .icr-btn-ok { background: var(--icr-ok-soft); color: var(--icr-ok); border-color: var(--icr-ok-line); }
.icr .icr-btn-ok:hover { background: rgba(51, 153, 102, 0.18); color: var(--icr-ok); }
.icr .icr-text-btn {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.6rem; border: none; border-radius: 8px;
    background: none; color: var(--icr-accent-strong); font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
[data-theme="dark"] .icr .icr-text-btn { color: var(--icr-accent); }
.icr .icr-text-btn:hover { background: var(--icr-accent-soft); }
.icr .icr-text-btn svg { width: 15px; height: 15px; }
.icr .icr-link-btn {
    display: inline-flex; align-items: center; gap: 0.3rem; padding: 0; border: none; background: none; cursor: pointer;
    color: var(--icr-accent-strong); font-size: 0.82rem; font-weight: 600;
}
[data-theme="dark"] .icr .icr-link-btn { color: var(--icr-accent); }
.icr .icr-link-btn:hover { text-decoration: underline; }
.icr .icr-link-btn svg { width: 14px; height: 14px; }

/* ---------- tabs ---------- */
.icr .icr-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.3rem; margin: 0 0 1.1rem;
    border-radius: 14px; background: var(--icr-sunk);
}
.icr .icr-tab {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 42px;
    border: none; border-radius: 11px; background: none; cursor: pointer; color: var(--icr-muted); font-size: 0.92rem; font-weight: 700;
}
.icr .icr-tab svg { width: 18px; height: 18px; }
.icr .icr-tab:hover { color: var(--icr-text-1); }
.icr .icr-tab.is-active { background: var(--icr-card); color: var(--icr-accent-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .icr .icr-tab.is-active { color: var(--icr-accent); background: #26334a; }
.icr .icr-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.icr .icr-seg-btn {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: 36px; padding: 0.35rem 0.85rem; border-radius: 999px;
    border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2); font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.icr .icr-seg-btn svg { width: 15px; height: 15px; }
.icr .icr-seg-btn.is-active { border-color: var(--icr-accent); color: var(--icr-accent-strong); background: var(--icr-accent-soft); }
[data-theme="dark"] .icr .icr-seg-btn.is-active { color: var(--icr-accent); }
.icr .icr-seg-tight { margin: 0; }

/* ---------- logo loader ---------- */
.icr .icr-loading { text-align: center; padding: 2.2rem 1.25rem; }
.icr .icr-loader {
    display: block; width: 72px; height: 72px; margin: 0 auto 1rem; overflow: visible;
    --cico-outer: #f2534e; --cico-outer-soft: #f8d3d1; --cico-mid: #31ae77; --cico-mid-soft: #d0e7dd; --cico-inner: #2b9edb;
}
[data-theme="dark"] .icr .icr-loader { --cico-outer-soft: rgba(242, 83, 78, 0.22); --cico-mid-soft: rgba(49, 174, 119, 0.22); }
.icr .icr-loader circle { fill: none; stroke-width: 72; transform-box: fill-box; transform-origin: center; }
.icr .icr-loader .bp { stroke: var(--cico-outer-soft); }
.icr .icr-loader .gp { stroke: var(--cico-mid-soft); }
.icr .icr-loader .b { stroke: var(--cico-outer); stroke-linecap: round; stroke-dasharray: 35.3 100; animation: icrSpinL 1.3s linear infinite; }
.icr .icr-loader .g { stroke: var(--cico-mid); stroke-linecap: round; stroke-dasharray: 75.8 100; animation: icrSpinR 2.1s linear infinite; }
.icr .icr-loader .r { stroke: var(--cico-inner); animation: icrBreathe 1.3s ease-in-out infinite; }
@keyframes icrSpinL { from { transform: rotate(117deg); } to { transform: rotate(-243deg); } }
@keyframes icrSpinR { from { transform: rotate(36deg); } to { transform: rotate(396deg); } }
@keyframes icrBreathe { 50% { transform: scale(0.9); } }
@keyframes icrSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .icr .icr-loader .b { animation-duration: 4s; }
    .icr .icr-loader .g { animation-duration: 6s; }
    .icr .icr-loader .r { animation: none; }
}
.icr .icr-loading-title { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--icr-text-1); }
.icr .icr-loading-sub { margin: 0.35rem 0 1.1rem; font-size: 0.88rem; color: var(--icr-muted); min-height: 1.3em; }

/* ---------- single result ---------- */
.icr .icr-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
.icr .icr-preview-col, .icr .icr-settings { min-width: 0; }
.icr .icr-preview {
    display: flex; align-items: center; justify-content: center; height: 320px; padding: 1.25rem;
    border-radius: 14px; border: 1px solid var(--icr-line); overflow: hidden; box-sizing: border-box;
}
.icr .icr-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.icr .icr-facts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.icr .icr-fact {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.28rem 0.62rem; border-radius: 999px;
    background: var(--icr-sunk); border: 1px solid var(--icr-line); font-size: 0.79rem; font-weight: 600; color: var(--icr-text-2);
}
.icr .icr-fact svg { width: 14px; height: 14px; color: var(--icr-accent); }
.icr .icr-source { margin: 0.6rem 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--icr-muted); overflow-wrap: anywhere; }
.icr .icr-source a { color: var(--icr-muted); }

.icr .icr-opt-block {
    background: var(--icr-card); border: 1px solid var(--icr-line); border-radius: var(--radius-md, 12px);
    padding: 1rem 1.1rem; margin-bottom: 0.875rem;
}
.icr .icr-formats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.8rem; }
.icr .icr-format {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: 74px;
    padding: 0.5rem 0.25rem; border-radius: 12px; border: 1.5px solid var(--icr-line); background: var(--icr-card);
    cursor: pointer; color: var(--icr-text-2); text-align: center; min-width: 0;
}
.icr .icr-format svg { width: 20px; height: 20px; color: var(--icr-muted); }
.icr .icr-format strong { font-size: 0.86rem; color: var(--icr-text-1); }
.icr .icr-format small { font-size: 0.68rem; color: var(--icr-muted); line-height: 1.2; }
.icr .icr-format:hover { border-color: var(--icr-accent-line); }
.icr .icr-format.is-active { border-color: var(--icr-accent); background: var(--icr-accent-soft); }
.icr .icr-format.is-active svg { color: var(--icr-accent); }

/* collapsed option rows */
.icr .icr-adv { border: 1px solid var(--icr-line); border-radius: var(--radius-md, 12px); overflow: hidden; background: var(--icr-card); margin-bottom: 0.875rem; }
.icr .icr-adv-row + .icr-adv-row { border-top: 1px solid var(--icr-line); }
.icr .icr-adv-row[hidden] + .icr-adv-row, .icr .icr-adv-row:first-child { border-top: none; }
.icr .icr-adv-head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100% !important; min-height: 52px;
    padding: 0.55rem 1rem; border: none; background: none; cursor: pointer; text-align: left; color: var(--icr-text-1);
}
.icr .icr-adv-left { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.icr .icr-adv-left > svg { width: 18px; height: 18px; color: var(--icr-accent); flex-shrink: 0; }
.icr .icr-adv-text { display: flex; flex-direction: column; min-width: 0; }
.icr .icr-adv-title { font-size: 0.9rem; font-weight: 700; }
.icr .icr-adv-hint { font-size: 0.76rem; color: var(--icr-muted); line-height: 1.35; }
.icr .icr-adv-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.icr .icr-adv-value {
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.2rem 0.55rem; border-radius: 999px;
    background: var(--icr-accent-soft); color: var(--icr-accent-strong); font-size: 0.76rem; font-weight: 700;
}
[data-theme="dark"] .icr .icr-adv-value { color: var(--icr-accent); }
.icr .icr-chevron { width: 17px; height: 17px; color: var(--icr-muted); transition: transform 0.2s; }
.icr .icr-adv-row.open .icr-chevron { transform: rotate(180deg); }
.icr .icr-adv-row.open .icr-adv-head, .icr .icr-adv-row.open .icr-adv-body { background: var(--icr-open); }
.icr .icr-adv-body { padding: 0.2rem 1rem 1rem; }
.icr .icr-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; }
.icr .icr-quick-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.icr .icr-quick-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.icr .icr-chip {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-height: 34px; padding: 0.3rem 0.2rem;
    border-radius: 9px; border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2);
    font-size: 0.8rem; font-weight: 700; cursor: pointer; min-width: 0;
}
.icr .icr-chip:hover { border-color: var(--icr-accent-line); }
.icr .icr-chip.is-active { border-color: var(--icr-accent); background: var(--icr-accent-soft); color: var(--icr-accent-strong); }
[data-theme="dark"] .icr .icr-chip.is-active { color: var(--icr-accent); }
.icr .icr-chip-color input[type="color"] { width: 20px; height: 20px; padding: 0; border: none; border-radius: 5px; background: none; cursor: pointer; }
.icr .icr-custom { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; font-size: 0.82rem; font-weight: 600; color: var(--icr-text-2); }
.icr .icr-name-row { display: flex; align-items: stretch; }
.icr .icr-input {
    flex: 1; min-width: 0; height: 40px; padding: 0 0.7rem; margin: 0; border: 1px solid var(--icr-line); border-radius: 9px;
    background: var(--input-bg, #fff); color: var(--icr-text-1); font-size: 0.9rem; box-sizing: border-box;
}
.icr .icr-name-row .icr-input { border-right: none; border-radius: 9px 0 0 9px; }
.icr .icr-input:focus { outline: none; border-color: var(--icr-accent); }
.icr .icr-num { flex: 0 0 96px; width: 96px; }
.icr .icr-ext {
    display: inline-flex; align-items: center; padding: 0 0.7rem; border-radius: 0 9px 9px 0; border: 1px solid var(--icr-line);
    background: var(--icr-sunk); color: var(--icr-muted); font-size: 0.85rem; font-weight: 600;
}

/* notes + output */
.icr .icr-note {
    display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.9rem; margin-bottom: 0.875rem; border-radius: 12px;
    font-size: 0.83rem; line-height: 1.5; color: var(--icr-text-1); background: rgba(51, 153, 204, 0.08); border: 1px solid rgba(51, 153, 204, 0.3);
}
.icr .icr-note.is-warn { background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.35); }
.icr .icr-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--icr-info); }
.icr .icr-note.is-warn > svg { color: var(--icr-warn); }
.icr .icr-note a { color: var(--icr-accent-strong); font-weight: 600; }
[data-theme="dark"] .icr .icr-note a { color: var(--icr-accent); }
.icr .icr-output {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border-radius: 12px;
    background: var(--icr-sunk); border: 1px solid var(--icr-line);
}
.icr .icr-output-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--icr-accent-soft); color: var(--icr-accent);
}
.icr .icr-output-icon svg { width: 20px; height: 20px; }
.icr .icr-output-text { display: flex; flex-direction: column; min-width: 0; }
.icr .icr-output-text strong { font-size: 0.92rem; color: var(--icr-text-1); }
.icr .icr-output-text span { font-size: 0.8rem; color: var(--icr-muted); }
.icr .icr-output-text .is-good { color: var(--icr-ok); font-weight: 700; }

/* action bar */
.icr .icr-actionbar {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--icr-line);
}
.icr .icr-actionbar .icr-go { margin-left: auto; }
.icr .icr-summary { display: flex; flex-direction: column; min-width: 0; margin-left: auto; text-align: right; font-size: 0.8rem; color: var(--icr-muted); }
.icr .icr-summary + .icr-go { margin-left: 0; }
.icr .icr-summary strong { font-size: 0.9rem; color: var(--icr-text-1); }
.icr .icr-next { margin-top: 1rem; }
.icr .icr-next-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.icr .icr-next-link {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.8rem; border-radius: 999px;
    border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.icr .icr-next-link svg { width: 14px; height: 14px; color: var(--icr-accent); }
.icr .icr-next-link:hover { border-color: var(--icr-accent-line); color: var(--icr-text-1); }

/* ---------- done box: close button + auto-hide ---------- */
.icr .icr-done {
    position: relative; margin-top: 1rem; padding: 0.95rem 1rem 1.1rem; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--icr-ok-line); background: var(--icr-ok-soft); transition: opacity 0.35s ease, transform 0.35s ease;
}
.icr .icr-done.is-leaving { opacity: 0; transform: translateY(-4px); }
.icr .icr-done-head { display: flex; align-items: flex-start; gap: 0.65rem; }
.icr .icr-done-head > svg { width: 22px; height: 22px; color: var(--icr-ok); flex-shrink: 0; margin-top: 1px; }
.icr .icr-done-text { flex: 1; min-width: 0; }
.icr .icr-done-text strong { display: block; font-size: 0.95rem; color: var(--icr-text-1); }
.icr .icr-done-text span { display: block; margin-top: 0.15rem; font-size: 0.83rem; line-height: 1.5; color: var(--icr-text-2); }
.icr .icr-files { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.icr .icr-file {
    display: flex; align-items: center; gap: 0.65rem; padding: 0.45rem 0.5rem 0.45rem 0.7rem; border-radius: 10px;
    background: var(--icr-card); border: 1px solid var(--icr-line);
}
.icr .icr-file > svg { width: 18px; height: 18px; color: var(--icr-accent); flex-shrink: 0; }
.icr .icr-file-name { flex: 1; min-width: 0; font-size: 0.84rem; font-weight: 600; color: var(--icr-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icr .icr-file-size { flex-shrink: 0; font-size: 0.78rem; color: var(--icr-muted); font-variant-numeric: tabular-nums; }
.icr .icr-done-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--icr-ok); opacity: 0.55; transform-origin: left; }
.icr .icr-done-timer.run { animation: icrTimer linear forwards; }
.icr .icr-done:focus-within .icr-done-timer.run { animation-play-state: paused; }
@keyframes icrTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- batch ---------- */
.icr .icr-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.icr .icr-count {
    min-width: 26px; padding: 0.1rem 0.5rem; border-radius: 999px; text-align: center;
    background: var(--icr-accent-soft); color: var(--icr-accent-strong); font-size: 0.8rem;
}
[data-theme="dark"] .icr .icr-count { color: var(--icr-accent); }
.icr .icr-batch-tools { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.icr .icr-bar { position: relative; height: 6px; border-radius: 999px; background: var(--icr-line); overflow: hidden; }
.icr .icr-batch-bar { margin-top: 0.75rem; }
.icr .icr-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--icr-go); border-radius: 999px; transition: width 0.3s; }
.icr .icr-batch-format { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: 1rem; }
.icr .icr-batch-format .icr-caption { margin: 0; }

/* ---------- content ---------- */
.icr .icr-info { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.icr .icr-info > * { min-width: 0; }
.icr .icr-info .info-card {
    background: var(--bg-elevated, #fff); border: 1px solid var(--icr-line); border-radius: var(--radius-md, 12px);
    padding: 1.4rem 1.5rem; box-shadow: none;
}
.icr .icr-info .info-card h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.25rem; color: var(--icr-text-1); }
.icr .icr-info .info-card h2 svg { width: 22px; height: 22px; color: var(--icr-accent); flex-shrink: 0; }
.icr .icr-info .info-card p, .icr .icr-info .info-card li { color: var(--icr-text-2); line-height: 1.65; font-size: 0.97rem; }
.icr .icr-info .info-card p { margin: 0.8rem 0 0; }
.icr .icr-info a { color: var(--icr-accent-strong); font-weight: 500; }
[data-theme="dark"] .icr .icr-info a { color: var(--icr-accent); }
.icr .icr-steps, .icr .icr-list { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.icr .icr-table-wrap { overflow-x: auto; border: 1px solid var(--icr-line); border-radius: 10px; }
.icr .icr-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
.icr .icr-table th, .icr .icr-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--icr-line); color: var(--icr-text-2); vertical-align: top; }
.icr .icr-table th { background: var(--icr-sunk); color: var(--icr-text-1); font-weight: 700; font-size: 0.82rem; }
.icr .icr-table tr:last-child td { border-bottom: none; }
.icr .icr-table td:first-child { font-weight: 700; color: var(--icr-text-1); white-space: nowrap; }
.icr .faq-card .faq-question svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .icr .icr-editor-grid { grid-template-columns: minmax(0, 1fr); }
    .icr .icr-preview { height: 260px; }
}
@media (max-width: 600px) {
    .icr.tool-container { padding: 1.1rem 16px; }
    .icr .tool-title { font-size: 1.6rem; }
    .icr .icr-title-icon { width: 46px; height: 46px; border-radius: 13px; }
    .icr .icr-title-icon svg { width: 25px; height: 25px; }
    .icr .tool-description { font-size: 0.98rem; }
    .icr .icr-card { padding: 1rem; border-radius: 16px; }
    .icr .icr-formats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .icr .icr-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .icr .icr-quick-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .icr .icr-quick-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .icr .icr-actionbar .icr-go { flex: 1 1 100%; margin-left: 0; }
    .icr .icr-actionbar .icr-btn-ghost { flex: 1; }
    .icr .icr-summary { order: -1; width: 100%; text-align: left; margin-left: 0; }
    .icr .icr-info .info-card { padding: 1.1rem; }
}

/* ============================================================
   Shared pieces (drop zone, progress) from the Image Upscaler
   ============================================================ */
.icr .icr-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px;
    background: var(--icr-sunk); border: 1px solid var(--icr-line); font-size: 0.78rem; font-weight: 600; color: var(--icr-text-2);
}
.icr .icr-pill svg { width: 14px; height: 14px; color: var(--icr-accent); }
.icr .icr-under { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; margin-top: 0.85rem; }
.icr .icr-samples { margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.45rem; font-size: 0.82rem; color: var(--icr-muted); }

/* drop zone */
.icr .icr-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; text-align: center;
    min-height: 220px; padding: 1.75rem 1.25rem; border-radius: 16px; border: 2px dashed var(--icr-accent-line);
    background: var(--icr-accent-soft); cursor: pointer; color: var(--icr-muted); font-size: 0.86rem; line-height: 1.5;
    transition: border-color 0.15s, background 0.15s; box-sizing: border-box; margin: 0;
}
.icr .icr-drop:hover, .icr .icr-drop.is-drag { border-color: var(--icr-accent); background: rgba(51, 153, 102, 0.12); }
.icr .icr-drop:focus-within { outline: 3px solid var(--icr-accent-soft); }
.icr .icr-drop strong { font-size: 1.08rem; color: var(--icr-text-1); }
.icr .icr-drop-link { color: var(--icr-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .icr .icr-drop-link { color: var(--icr-accent); }
.icr .icr-drop-icon {
    width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.35rem;
    background: var(--icr-card); color: var(--icr-accent); border: 1px solid var(--icr-line);
}
.icr .icr-drop-icon svg { width: 28px; height: 28px; }

/* progress */
.icr .icr-prog { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--icr-line); background: var(--icr-sunk); }
.icr .icr-prog-top { display: flex; align-items: center; gap: 0.9rem; }
.icr .icr-prog .icr-loader { width: 40px; height: 40px; margin: 0; flex-shrink: 0; }
.icr .icr-prog-top .icr-btn { margin-left: auto; }
.icr .icr-stages { display: flex; align-items: center; flex-wrap: wrap; row-gap: 0.4rem; }
.icr .icr-stage { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; color: var(--icr-muted); }
.icr .icr-stage .dot {
    display: inline-flex; align-items: center; justify-content: center; padding: 6px; border-radius: 50%;
    background: var(--icr-card); border: 1px solid var(--icr-line); color: var(--icr-muted);
}
.icr .icr-stage .dot svg { width: 20px; height: 20px; display: block; }
.icr .icr-stage.active { color: var(--icr-text-1); }
.icr .icr-stage.active .dot { background: var(--icr-go); border-color: var(--icr-go); color: #fff; }
.icr .icr-stage.done .dot { background: #339966; border-color: #339966; color: #fff; }
.icr .icr-stage-line { width: 28px; height: 2px; margin: 0 0.5rem; border-radius: 2px; background: var(--icr-line); flex-shrink: 0; }
.icr .icr-stage-line.done { background: #339966; }
.icr .icr-prog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 0.85rem; }
.icr .icr-prog-text { font-size: 0.86rem; color: var(--icr-text-2); min-width: 0; overflow-wrap: anywhere; }
.icr .icr-prog-pct { font-size: 0.95rem; font-weight: 800; color: var(--icr-text-1); font-variant-numeric: tabular-nums; }
.icr .icr-prog .icr-bar { height: 8px; margin-top: 0.5rem; }
.icr .icr-prog.is-indeterminate .icr-bar-fill { width: 35% !important; animation: icrSlide 1.2s ease-in-out infinite; }
@keyframes icrSlide { from { left: -35%; } to { left: 100%; } }
.icr .icr-prog-foot { margin: 0.55rem 0 0; font-size: 0.76rem; color: var(--icr-muted); }
.icr .icr-bar { position: relative; height: 6px; border-radius: 999px; background: var(--icr-line); overflow: hidden; }
.icr .icr-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--icr-go); border-radius: 999px; transition: width 0.3s; }
.icr .icr-busy .icr-settings, .icr .icr-busy .icr-queue { pointer-events: none; opacity: 0.55; }

@media (max-width: 860px) {
}
@media (max-width: 600px) {
    .icr .icr-drop { min-height: 180px; }
    .icr .icr-samples { margin-left: 0; }
    .icr .icr-pill:nth-of-type(n+3) { display: none; }
    .icr .icr-stage .lbl { display: none; }
    .icr .icr-stage-line { width: 20px; margin: 0 0.3rem; }
}

/* ============================================================
   Image to ICO - shared components
   ============================================================ */
.icr .icr-is-hidden, .icr .icr-adv-row.is-off { display: none; }
.icr .icr-notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-bottom: 0.875rem; }
.icr .icr-notes .icr-note { margin: 0; }
.icr .icr-notes .icr-note p { margin: 0; }
.icr .icr-quick-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.icr .icr-quick-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.icr .icr-caption-gap { margin-top: 0.8rem; }
.icr .icr-check { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 0; font-size: 0.84rem; font-weight: 600; color: var(--icr-text-2); cursor: pointer; }
.icr .icr-check input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--icr-accent); }
.icr .icr-check .icr-input { height: 34px; flex: 0 0 84px; width: 84px; }
.icr .icr-input:disabled { opacity: 0.5; }
.icr .icr-opt-block .icr-h { margin-bottom: 0.1rem; }
.icr .icr-formats { margin-top: 0.7rem; }
.icr .icr-reading { margin-top: 0.85rem; font-size: 0.85rem; font-weight: 600; color: var(--icr-text-2); }
.icr .icr-reading .icr-bar { margin-top: 0.4rem; }
/* ============================================================
   Image to ICO - own components
   ============================================================ */
.icr .icr-reading { display: flex; align-items: center; gap: 0.75rem; }
.icr .icr-reading .icr-loader { width: 32px; height: 32px; margin: 0; flex-shrink: 0; }
.icr .icr-samples { font-size: 0.82rem; color: var(--icr-muted); flex-wrap: wrap; gap: 0.2rem 0.45rem; }
.icr .icr-alt { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0.9rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--icr-muted); }
.icr .icr-alt svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--icr-accent); }

/* strip + mode */
.icr .icr-strip { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; margin: 0 0 0.8rem; scrollbar-width: thin; }
.icr .icr-tab { display: inline-flex; align-items: center; gap: 0.45rem; flex-shrink: 0; max-width: 220px; min-height: 42px; padding: 0.25rem 0.35rem 0.25rem 0.3rem; border-radius: 10px; border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2); font-size: 0.8rem; font-weight: 600; cursor: pointer; text-align: left; }
.icr .icr-tab img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; flex-shrink: 0; background: var(--icr-sunk); }
.icr .icr-tab > span:not(.icr-tab-x) { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.icr .icr-tab > span:not(.icr-tab-x) { white-space: nowrap; text-overflow: ellipsis; }
.icr .icr-tab small { font-weight: 500; color: var(--icr-muted); font-size: 0.7rem; }
.icr .icr-tab.is-active { border-color: var(--icr-accent); background: var(--icr-accent-soft); color: var(--icr-text-1); }
.icr .icr-tab-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; color: var(--icr-muted); flex-shrink: 0; }
.icr .icr-tab-x:hover { background: rgba(230, 78, 78, 0.12); color: #e64e4e; }
.icr .icr-tab-x svg { width: 14px; height: 14px; }
.icr .icr-batchmode { margin-bottom: 0.9rem; }
.icr .icr-segs { display: inline-flex; padding: 0.2rem; gap: 0.2rem; border-radius: 10px; background: var(--icr-sunk); border: 1px solid var(--icr-line); }
.icr .icr-segs button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; flex: 1; min-height: 34px; padding: 0.2rem 0.75rem; border: none; border-radius: 8px; background: none; color: var(--icr-muted); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.icr .icr-segs button svg { width: 15px; height: 15px; }
.icr .icr-segs button:hover { color: var(--icr-text-1); }
.icr .icr-segs button.is-active { background: var(--icr-card); color: var(--icr-accent-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .icr .icr-segs button.is-active { color: var(--icr-accent); background: #26334a; }
.icr .icr-batchmode .icr-segs { display: flex; }
.icr .icr-hint.is-warn { color: var(--icr-warn); }
.icr .icr-filehead { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.icr .icr-filethumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--icr-line); display: flex; align-items: center; justify-content: center; }
.icr .icr-filethumb img { max-width: 100%; max-height: 100%; display: block; }
.icr .icr-filetext { flex: 1; min-width: 0; }
.icr .icr-filetext strong { display: block; font-size: 1rem; color: var(--icr-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icr .icr-filetext span { display: block; font-size: 0.82rem; color: var(--icr-muted); }

/* preview */
.icr .icr-stage { display: flex; align-items: center; justify-content: center; height: 290px; border-radius: 14px; border: 1px solid var(--icr-line); }
.icr .icr-stage canvas { width: 256px; height: 256px; max-width: 90%; }
.icr .icr-pbg-light { background: #f8fafc; }
.icr .icr-pbg-dark { background: #111827; }
.icr .icr-bgs { display: flex; margin-top: 0.6rem; }
.icr .icr-swatch { width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--icr-line); display: inline-block; }
.icr .sw-checker { background: conic-gradient(#cbd5e1 25%, #fff 0 50%, #cbd5e1 0 75%, #fff 0) 0 0 / 7px 7px; }
.icr .sw-light { background: #f8fafc; }
.icr .sw-dark { background: #111827; }
.icr .icr-tiles { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.icr .icr-tile { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.icr .icr-tile-box { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 6px; border-radius: 8px; border: 1px solid var(--icr-line);
    background-color: var(--icr-checker-bg); background-image: linear-gradient(45deg, var(--icr-checker) 25%, transparent 25%), linear-gradient(-45deg, var(--icr-checker) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--icr-checker) 75%), linear-gradient(-45deg, transparent 75%, var(--icr-checker) 75%);
    background-size: 10px 10px; background-position: 0 0, 0 5px, 5px -5px, -5px 0; }
.icr .icr-tiles.is-light .icr-tile-box { background: #f8fafc; }
.icr .icr-tiles.is-dark .icr-tile-box { background: #111827; }
.icr .icr-tile canvas { display: block; }
.icr .icr-tile canvas.is-zoom { image-rendering: pixelated; }
.icr .icr-tile figcaption { font-size: 0.7rem; font-weight: 700; color: var(--icr-muted); font-variant-numeric: tabular-nums; }
.icr .icr-mocks { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 0.85rem; }
.icr .icr-mock { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.6rem; border-radius: 10px; border: 1px solid var(--icr-line); font-size: 0.78rem; }
.icr .icr-mock-tab { background: var(--icr-card); color: var(--icr-text-1); border-radius: 10px 10px 0 0; min-width: 150px; }
.icr .icr-mock-tab span { flex: 1; }
.icr .icr-mock-tab svg { width: 13px; height: 13px; color: var(--icr-muted); }
.icr .icr-mock-tab canvas { width: 16px; height: 16px; }
.icr .icr-mock-bar { background: #1f2937; border-color: #1f2937; gap: 0.6rem; }
.icr .icr-mock-bar canvas { width: 24px; height: 24px; }
.icr .icr-mock-ghost { background: rgba(255, 255, 255, 0.12); border-radius: 6px; }
.icr .icr-mock-desk { flex-direction: column; background: #0f4c75; border-color: #0f4c75; color: #fff; gap: 0.25rem; }
.icr .icr-mock-desk canvas { width: 48px; height: 48px; }

/* settings */
.icr .icr-sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.6rem; }
.icr .icr-size { min-height: 36px; border-radius: 9px; border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2); font-size: 0.82rem; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.icr .icr-size:hover { border-color: var(--icr-accent-line); }
.icr .icr-size.is-active { border-color: var(--icr-accent); background: var(--icr-accent-soft); color: var(--icr-accent-strong); }
[data-theme="dark"] .icr .icr-size.is-active { color: var(--icr-accent); }
.icr .icr-sl { margin: 0.8rem 0 0.2rem; }
.icr .icr-sl-head { display: flex; align-items: center; justify-content: space-between; }
.icr .icr-sl-head label { font-size: 0.84rem; font-weight: 700; color: var(--icr-text-1); }
.icr .icr-sl-val { min-width: 40px; padding: 0.08rem 0.45rem; border-radius: 999px; text-align: center; background: var(--icr-accent-soft); color: var(--icr-accent-strong); font-size: 0.75rem; font-weight: 700; }
[data-theme="dark"] .icr .icr-sl-val { color: var(--icr-accent); }
.icr .icr-range { width: 100%; margin: 0.35rem 0 0; accent-color: var(--icr-accent); }
.icr .icr-chip-color { position: relative; }
.icr .icr-chip-color input[type="color"] { width: 18px; height: 18px; padding: 0; border: none; border-radius: 4px; background: none; cursor: pointer; }
.icr .icr-check input[type="checkbox"]:disabled + span { opacity: 0.5; }
.icr .icr-gap { margin-top: 0.75rem; }

/* done extras */
.icr .icr-layers { margin-top: 0.8rem; }
.icr .icr-layer-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.icr .icr-layer { padding: 0.2rem 0.55rem; border-radius: 8px; background: var(--icr-card); border: 1px solid var(--icr-line); font-size: 0.75rem; color: var(--icr-text-2); }
.icr .icr-layer strong { margin-right: 0.3rem; color: var(--icr-text-1); }
.icr .icr-snippet { margin-top: 0.8rem; }
.icr .icr-snippet-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; }
.icr .icr-snippet-row code { flex: 1; min-width: 0; padding: 0.5rem 0.65rem; border-radius: 8px; background: var(--icr-card); border: 1px solid var(--icr-line); font-size: 0.78rem; overflow-x: auto; white-space: nowrap; }
.icr .icr-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10001; padding: 0.55rem 1rem; border-radius: 10px; background: #1e293b; color: #fff; font-size: 0.86rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); transition: opacity 0.25s; }
[data-theme="dark"] .icr .icr-toast { background: #e2e8f0; color: #0f172a; }
.icr .icr-toast.is-out { opacity: 0; }

@media (max-width: 600px) {
    .icr .icr-sizes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .icr .icr-stage { height: 240px; }
    .icr .icr-stage canvas { width: 200px; height: 200px; }
    .icr .icr-batchmode .icr-segs button { font-size: 0.76rem; padding: 0.2rem 0.4rem; }
    .icr .icr-filebtns { width: 100%; }
    .icr .icr-filebtns .icr-btn { width: 100%; }
}

/* ============================================================
   Image Cropper - own components
   ============================================================ */
.icr .icr-workgrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.icr .icr-cstage { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 12px; border-radius: 14px; border: 1px solid var(--icr-line); user-select: none; }
.icr .icr-cstage-inner { position: relative; line-height: 0; }
.icr .icr-cstage canvas { display: block; width: auto; height: auto; max-width: none; }
.icr .icr-overlay { position: absolute; left: 0; top: 0; touch-action: none; cursor: crosshair; }
.icr .icr-box { position: absolute; box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55); outline: 1px solid rgba(255, 255, 255, 0.9); cursor: move; border-radius: var(--r, 0); }
.icr .icr-box.is-circle { border-radius: 50%; }
.icr .icr-box::before, .icr .icr-box::after { content: ""; position: absolute; pointer-events: none; border: 0 solid rgba(255, 255, 255, 0.45); }
.icr .icr-box::before { left: 33.333%; right: 33.333%; top: 0; bottom: 0; border-left-width: 1px; border-right-width: 1px; }
.icr .icr-box::after { top: 33.333%; bottom: 33.333%; left: 0; right: 0; border-top-width: 1px; border-bottom-width: 1px; }
.icr .icr-box.no-grid::before, .icr .icr-box.no-grid::after { display: none; }
.icr .icr-cstage.is-drag .icr-box::before, .icr .icr-cstage.is-drag .icr-box::after { display: block; }
.icr .icr-hdl { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 4px; background: #fff; border: 2px solid var(--icr-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); z-index: 2; }
.icr .icr-hdl[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.icr .icr-hdl[data-h="n"] { left: 50%; top: 0; cursor: ns-resize; }
.icr .icr-hdl[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.icr .icr-hdl[data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.icr .icr-hdl[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.icr .icr-hdl[data-h="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.icr .icr-hdl[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.icr .icr-hdl[data-h="w"] { left: 0; top: 50%; cursor: ew-resize; }
.icr .icr-box-label { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); padding: 0.1rem 0.45rem; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; font: 600 11px/1.5 system-ui, sans-serif; pointer-events: none; white-space: nowrap; }
.icr .icr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.6rem; }
.icr .icr-tool { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 38px; height: 38px; padding: 0 0.55rem; border-radius: 9px; border: 1px solid var(--icr-line); background: var(--icr-card); color: var(--icr-text-2); font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.icr .icr-tool svg { width: 17px; height: 17px; }
.icr .icr-tool:hover { border-color: var(--icr-accent-line); color: var(--icr-accent-strong); }
.icr .icr-tool-sep { width: 1px; height: 24px; background: var(--icr-line); margin: 0 0.15rem; }
.icr .icr-straighten { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; font-size: 0.8rem; font-weight: 700; color: var(--icr-text-1); }
.icr .icr-straighten .icr-range { flex: 1; margin: 0; }
.icr .icr-straighten output { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--icr-muted); }
.icr .icr-info { margin: 0.45rem 0 0; font-size: 0.8rem; color: var(--icr-muted); font-variant-numeric: tabular-nums; }
.icr .icr-ratios { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; }
.icr .icr-ratios .icr-chip { padding-left: 0.2rem; padding-right: 0.2rem; }
.icr .icr-inline { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.icr .icr-inline .icr-input { flex: 0 0 72px; width: 72px; height: 36px; text-align: center; }
.icr .icr-inline span { font-size: 0.8rem; color: var(--icr-muted); font-weight: 700; }
.icr .icr-select { width: 100%; height: 40px; padding: 0 0.6rem; border-radius: 9px; border: 1px solid var(--icr-line); background: var(--input-bg, #fff); color: var(--icr-text-1); font-size: 0.88rem; margin-top: 0.6rem; }
.icr .icr-xywh { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
.icr .icr-xywh label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.7rem; font-weight: 700; color: var(--icr-muted); }
.icr .icr-xywh .icr-input { width: 100%; height: 36px; text-align: center; flex: none; }
.icr .icr-previewbox { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.9rem; padding: 0.6rem; border-radius: 12px; background: var(--icr-sunk); }
.icr .icr-previewbox canvas { max-width: 110px; max-height: 110px; border-radius: 6px; flex-shrink: 0; }
.icr .icr-previewbox .icr-checker { display: inline-flex; border-radius: 8px; padding: 4px; }
.icr .icr-sumtext { font-size: 0.8rem; color: var(--icr-muted); }
.icr .icr-sumtext strong { display: block; font-size: 0.92rem; color: var(--icr-text-1); }
.icr .icr-meta { margin: 0 0 0.7rem; font-size: 0.8rem; color: var(--icr-muted); }
.icr .icr-kbd { margin-top: 0.5rem; font-size: 0.74rem; color: var(--icr-muted); }
.icr kbd { padding: 0.05rem 0.3rem; border-radius: 4px; border: 1px solid var(--icr-line); background: var(--icr-card); font-size: 0.7rem; }
@media (max-width: 900px) { .icr .icr-workgrid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
    .icr .icr-ratios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .icr .icr-xywh { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .icr .icr-cstage { padding: 8px; min-height: 220px; }
    .icr .icr-hdl { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
}
.icr .icr-quick-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 520px) { .icr .icr-quick-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
