/* 图片裁剪工具样式 — 复用 create.css 设计语言 */
.crop-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 20px;
  overflow: hidden;
}
.crop-frame {
  position: relative;
  margin: 0 auto;
  max-width: 480px;
  user-select: none;
  touch-action: none;
}
.crop-frame img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.crop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  pointer-events: none;
}
.crop-box {
  position: absolute;
  border: 1px solid var(--paper);
  box-shadow: 0 0 0 9999px rgba(17, 17, 17, 0.55);
  cursor: move;
  pointer-events: auto;
}
/* 用 box-shadow 实现遮罩，覆盖 overlay */
.crop-frame .crop-box {
  background: transparent;
}
.crop-box .handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  pointer-events: auto;
}
.crop-box .handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-box .handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-box .handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-box .handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
/* 第三方辅助线 */
.crop-box .grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.crop-box .grid-line.v1 { top: 0; bottom: 0; left: 33.33%; width: 1px; }
.crop-box .grid-line.v2 { top: 0; bottom: 0; left: 66.66%; width: 1px; }
.crop-box .grid-line.h1 { left: 0; right: 0; top: 33.33%; height: 1px; }
.crop-box .grid-line.h2 { left: 0; right: 0; top: 66.66%; height: 1px; }
.crop-hint {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
}
.crop-ratio {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}
.crop-ratio.invalid {
  color: #8b2020;
}
