
    .upload-container {
      display: inline-block;
      position: relative;
    }

    #photoUpload {
      opacity: 0;
      width: 0.1px;
      height: 0.1px;
      position: absolute;
    }

    /* Common button styles */
    .upload-label,
    .webcam-button,
    .capture-button {
      /*display: inline-flex;*/
      align-items: center;
      padding: 10px 20px;
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-radius: 4px;
      cursor: pointer;
      font-family: Arial, sans-serif;
      font-size: .9em;
      transition: background-color 0.3s;
      width: 226px;
    }

    .upload-label:hover,
    .webcam-button:hover,
    .capture-button:hover:not(:disabled) {
      background-color: #e0e0e0;
    }

    .upload-label i,
    .webcam-button i,
    .capture-button i {
      margin-right: 8px;
    }

    .capture-button i {
      color: #ff0000;
    }

    .capture-button:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    body {
      font-family: Arial, sans-serif;
      margin: 20px;
      text-align: center;
    }

/* The three main try-on states live in the same box. 
 * JS controls the internal pixel dimensions (3:4 on phones, 4:3 on larger),
 * CSS just makes them fill the container and stay aligned.
 */
#tryon-intro,
#webcam,
#userCanvas {
  width: 100%;          /* follow the width of the parent (.tryon-box) */
  max-width: 100%;
  height: auto;         /* let aspect be driven by canvas/video pixels */
  margin: 20px auto;
  border: 1px solid #ccc;
  background: #f0f0f0;
  position: relative;
  display: none;        /* hidden by default except #tryon-intro */
}

/* Show intro by default */
#tryon-intro {
  display: block;
}

/* No fixed px width/height in mobile media query anymore.
   If you keep a media query, only tweak margins/fonts, not w/h. */


    .button-row {
      margin: 10px 0;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
    }

    .tryon-canvas {
      display: block;
      width: 100%;            /* fill its container */
      height: auto;           /* preserve aspect ratio */
      max-width: 359px;       /* don’t grow beyond original */
    }