#ciTool .upload-zone.ci-compact { padding: 1.1rem 1rem; }
#ciTool .upload-zone.ci-compact svg { width: 26px; height: 26px; margin-bottom: .35rem; }
.ci-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.ci-list:empty { display: none; }
.ci-item { position: relative; width: 112px; background: var(--bg-light); border: 1.5px solid var(--border); border-radius: 10px; padding: 5px; cursor: grab; }
.ci-item img { display: block; width: 100%; height: 72px; object-fit: cover; border-radius: 6px; pointer-events: none; }
.ci-item.ci-over { border-color: var(--tool-from); box-shadow: 0 0 0 3px var(--tool-ring); }
.ci-item.ci-dragging { opacity: .45; }
.ci-cap { display: block; font-size: .72rem; color: var(--text-muted); margin: .3rem 0 .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-bar { display: flex; gap: 4px; }
.ci-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 30px; border: 1px solid var(--border-dark); background: var(--bg); color: var(--text); border-radius: 6px; cursor: pointer; padding: 0; }
.ci-btn svg { width: 15px; height: 15px; }
.ci-btn:hover:not(:disabled) { border-color: var(--tool-from); color: var(--tool-from); }
.ci-btn:disabled { opacity: .35; cursor: default; }
.ci-work { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 960px) { .ci-work { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.ci-stage { min-width: 0; }
.ci-frame { background: var(--bg-gray); border: 1px solid var(--border); border-radius: 12px; padding: .75rem; display: flex; align-items: center; justify-content: center; min-height: 180px; }
.ci-frame canvas { display: block; max-width: 100%; max-height: 560px; width: auto; height: auto; box-shadow: var(--shadow-sm); }
.ci-checker { background-color: #fff; background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.ci-meta { font-size: .85rem; color: var(--text-muted); margin: .6rem 0 .75rem; font-variant-numeric: tabular-nums; }
.ci-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.ci-actions .btn-primary { flex: 1 1 200px; }
.ci-panel { display: flex; flex-direction: column; gap: .9rem; }
.ci-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg-gray); border-radius: 10px; padding: 4px; }
.ci-seg button { border: 0; background: transparent; padding: .55rem .25rem; border-radius: 7px; font: inherit; font-size: .84rem; font-weight: 600; color: var(--text-muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ci-seg button svg { width: 22px; height: 22px; }
.ci-seg button[aria-pressed="true"] { background: var(--bg); color: var(--tool-from); box-shadow: var(--shadow-sm); }
.ci-panel .control-row { grid-template-columns: 1fr 1fr; gap: .75rem; }
.ci-panel .control-group label { font-size: .82rem; }
.ci-panel .control-group select, .ci-panel .control-group input[type="number"] { padding: .5rem .65rem; font-size: .9rem; }
.ci-panel input[type="range"] { width: 100%; accent-color: var(--primary); padding: 0; border: 0; }
.ci-panel input[type="color"] { height: 38px; padding: 2px; cursor: pointer; }
.ci-check { display: flex !important; flex-direction: row !important; align-items: center; gap: .45rem; font-weight: 600; font-size: .82rem; margin-top: 1.55rem; }
.ci-check input { width: auto !important; }
.ci-muted { opacity: .45; }
#ciTool .alert { margin-top: 1rem; }
@media (max-width: 480px) {
  .ci-item { width: calc(33.333% - .4rem); }
  .ci-item img { height: 60px; }
}
.ci-figure { margin: 0; }
.ci-figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; }
.ci-figure figcaption { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; text-align: center; }
.ci-pair { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: 1000px; margin: 1.5rem auto 0; }
@media (min-width: 760px) { .ci-pair { grid-template-columns: 1fr 1fr; } }
.ci-uses { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 1000px; margin: 1.5rem auto 0; }
@media (min-width: 700px) { .ci-uses { grid-template-columns: 1fr 1fr; } }
.ci-use { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.2rem; }
.ci-use h3 { font-size: 1rem; margin: 0 0 .35rem; }
.ci-use p { margin: 0; font-size: .92rem; color: var(--text-muted); }
.ci-table-wrap { max-width: 1000px; margin: 1.5rem auto 0; overflow-x: auto; }
#ciTool .upload-zone.ci-compact p { display: none; }
#ciTool .ci-list, #ciTool .ci-work { text-align: left; }
