.u-wrap {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.u-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.u-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a6abb7;
  margin-bottom: 8px;
}
.u-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.u-mode-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2e323d;
  background: #1a1c23;
  color: #e4e6eb;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.u-mode-btn strong { display: block; font-size: 13px; line-height: 1.3; }
.u-mode-btn span { display: block; font-size: 11px; color: #9aa0ae; margin-top: 2px; }
.u-mode-btn.is-active {
  border-color: #2aa390;
  background: #122925;
  color: #fff;
}
.u-mode-btn.is-active span { color: #b5e1d9; }

.u-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.u-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.u-pill {
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #2e323d;
  background: #1a1c23;
  color: #d6dae3;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.u-pill.is-active {
  border-color: #2aa390;
  background: #0e5a4f;
  color: #fff;
}

.u-dropzone {
  border: 1.5px dashed #3d4352;
  border-radius: 10px;
  background: #171920;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.u-dropzone.is-drag { border-color: #2aa390; background: #132522; }
.u-drop-title { font-size: 14px; font-weight: 700; color: #f4f3ef; margin: 0 0 4px; }
.u-drop-sub { font-size: 12px; color: #9aa0ae; margin: 0; }
.u-file-info {
  margin-top: 8px;
  font-size: 12px;
  color: #8fd8ca;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.u-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #b7bcc8;
  cursor: pointer;
  min-height: 44px;
}
.u-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #0e5a4f;
}
.u-consent.is-invalid { color: #fca5a5; }

.u-actions { display: flex; flex-direction: column; gap: 10px; }
.u-run-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  border: none;
  background: #0e5a4f;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.u-run-btn:hover { background: #0a463d; }
.u-run-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.u-notice {
  background: #1c1f28;
  border: 1px solid #343947;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: #f4f3ef;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.u-notice.is-error { border-color: #9f3a38; background: #261619; color: #fecaca; }

.u-status {
  font-size: 13px;
  color: #8fd8ca;
  font-weight: 600;
  margin: 0;
}
.u-result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.u-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #c45d2c;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.u-dl-btn:hover { background: #a84d23; color: #fff; text-decoration: none; }
.u-reset-btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #343947;
  background: transparent;
  color: #d6dae3;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.u-stage-col { display: flex; flex-direction: column; gap: 10px; }
.u-stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #b7bcc8;
  font-variant-numeric: tabular-nums;
}
.u-loupe-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #343947;
  background: #1a1c23;
  color: #f4f3ef;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.u-loupe-btn.is-active { background: #0e5a4f; border-color: #2aa390; }

.u-viewer {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0b0e;
  aspect-ratio: 4 / 3;
  user-select: none;
}
.u-viewer.is-zoomed img {
  transform: scale(1.85);
  transform-origin: center center;
}
.u-viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 180ms ease;
}
.u-before-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  pointer-events: none;
}
.u-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
  z-index: 4;
}
.u-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}
.u-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  color: #141518;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}
.u-badge {
  position: absolute;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(12, 13, 16, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  pointer-events: none;
}
.u-badge-left { left: 10px; }
.u-badge-right { right: 10px; }
.u-retention-note {
  font-size: 12px;
  color: #9aa0ae;
  margin: 0;
}

@media (max-width: 900px) {
  .u-wrap { grid-template-columns: 1fr; gap: 12px; }
  .u-stage-col { order: -1; gap: 6px; }
}
@media (max-width: 640px) {
  .u-stage-bar { font-size: 12px; gap: 6px; }
  .u-loupe-btn { min-height: 28px; padding: 3px 8px; font-size: 11px; }
  .u-modes { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .u-mode-btn { padding: 8px 9px; }
  .u-mode-btn strong { font-size: 12px; }
  .u-mode-btn span { font-size: 10.5px; }
  .u-row-split, .u-result-actions { grid-template-columns: 1fr; }
}