.lcc-root {
  box-sizing: border-box;
  max-width: 360px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

.lcc-root *,
.lcc-root *::before,
.lcc-root *::after {
  box-sizing: inherit;
}

.lcc-stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eaed;
  user-select: none;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lcc-stage img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 正方形选框，尺寸由 JS 按图片缩放设置 */
.lcc-lens {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  border: 2px solid rgba(123, 31, 162, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 2px 10px rgba(123, 31, 162, 0.18);
  pointer-events: none;
}

.lcc-track {
  margin-top: 14px;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: linear-gradient(180deg, #fafbfc 0%, #eef1f4 100%);
  border-radius: 24px;
  border: 1px solid #e2e6ea;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.lcc-slider {
  flex: 1;
  width: 100%;
  height: 40px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.lcc-slider:focus {
  outline: none;
}

.lcc-slider:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
  border-radius: 4px;
}

.lcc-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8f4fd 0%, #c5e3f6 50%, #a8d8f0 100%);
  border: 1px solid rgba(100, 150, 200, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.lcc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 42px;
  height: 42px;
  margin-top: -18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 55%, #e8eaed 100%);
  border: 1px solid #b8bec8;
  box-shadow:
    0 2px 8px rgba(31, 38, 135, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: grab;
}

.lcc-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  background: linear-gradient(180deg, #f8f9fa 0%, #e8eaed 100%);
}

.lcc-slider::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8f4fd 0%, #c5e3f6 50%, #a8d8f0 100%);
  border: 1px solid rgba(100, 150, 200, 0.35);
}

.lcc-slider::-moz-range-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 55%, #e8eaed 100%);
  border: 1px solid #b8bec8;
  box-shadow:
    0 2px 8px rgba(31, 38, 135, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: grab;
}

.lcc-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.lcc-btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  background: #fff;
  cursor: pointer;
}

.lcc-btn-primary {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}

.lcc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lcc-msg {
  margin: 8px 0 0;
  font-size: 13px;
  min-height: 1.2em;
  color: #c62828;
}

.lcc-msg--ok {
  color: #2e7d32;
}
