
  * { margin: 0; padding: 0; box-sizing: border-box; }

    #container {
      position: relative;
      display: inline-block;
      user-select: none;
      border-radius: 12px;
      overflow: hidden;
      max-width: 100%;
    }
    #img-before {
      display: block;
      max-width: 100%;
      height: auto;
      visibility: hidden;
      
    }
    #img-after {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: left top;
      clip-path: inset(0 0 0 50%);
      
    }
    #divider {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 3px;
      background: #fff;
      cursor: ew-resize;
      z-index: 10;
      box-shadow: 0 0 6px rgba(0,0,0,0.5);
    }
    #handle {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 42px;
      height: 42px;
      background: #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 10px rgba(0,0,0,0.35);
      cursor: ew-resize;
    }
    .label {
      position: absolute;
      top: 14px;
      background: rgba(0,0,0,0.6);
      color: #fff;
      font-size: 13px;
      font-weight: 500;
      font-family: sans-serif;
      padding: 5px 14px;
      border-radius: 20px;
      pointer-events: none;
      z-index: 5;
    }
    #label-before { left: 14px; }
    #label-after  { right: 14px; }
