.dropzone {
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
  outline: none;
  margin-bottom: 22px;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--bg-elev-2); }
.dropzone.is-dragover { border-color: var(--accent); background: rgba(124, 92, 255, 0.08); transform: scale(1.005); }
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dropzone-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(34, 211, 238, 0.15));
  color: #cdd3ff; border: 1px solid rgba(124, 92, 255, 0.3);
}
.dropzone-icon svg { width: 24px; height: 24px; }
.dropzone-text { color: var(--text); font-size: 15px; }
.dropzone-hint { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.pill.is-active {
  background: var(--accent-grad);
  color: white;
  border-color: transparent;
}

.ic-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.ic-stage {
  background: #0a0c11;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 360px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-wrap {
  position: relative;
  display: inline-block;
  user-select: none;
  max-width: 100%;
}

#srcImg {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  user-select: none;
  pointer-events: none;
}

.ic-cropbox {
  position: absolute;
  border: 1.5px solid white;
  box-shadow: 0 0 0 9999px rgba(11, 13, 18, 0.55);
  cursor: move;
  box-sizing: border-box;
}
.ic-cropbox::before,
.ic-cropbox::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ic-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.25) 1px, transparent 1px),
    linear-gradient(to right,  rgba(255,255,255,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.25) 1px, transparent 1px);
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px;
  background-repeat: no-repeat;
  background-position: 33.333% 0, 66.666% 0, 0 33.333%, 0 66.666%;
}

.ic-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  z-index: 2;
}
.ic-handle[data-h="nw"] { top:-7px; left:-7px;   cursor: nwse-resize; }
.ic-handle[data-h="n"]  { top:-7px; left:50%; transform:translateX(-50%); cursor: ns-resize; }
.ic-handle[data-h="ne"] { top:-7px; right:-7px;  cursor: nesw-resize; }
.ic-handle[data-h="e"]  { top:50%; right:-7px; transform:translateY(-50%); cursor: ew-resize; }
.ic-handle[data-h="se"] { bottom:-7px; right:-7px; cursor: nwse-resize; }
.ic-handle[data-h="s"]  { bottom:-7px; left:50%; transform:translateX(-50%); cursor: ns-resize; }
.ic-handle[data-h="sw"] { bottom:-7px; left:-7px;  cursor: nesw-resize; }
.ic-handle[data-h="w"]  { top:50%; left:-7px; transform:translateY(-50%); cursor: ew-resize; }

.ic-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.ic-meta strong { color: var(--text); font-weight: 600; }
