
    * {
      box-sizing: border-box;
    }

    :root {
      --green-950: #042d1a;
      --green-900: #064627;
      --green-800: #075d35;
      --green-700: #087a44;
      --green-100: #e8f7ee;
      --green-50: #f4fbf6;
      --gold: #d8a83f;
      --ink: #122119;
      --text: #26382e;
      --muted: #68776d;
      --line: rgba(6, 70, 39, 0.13);
      --app-w: 460px;
      --page-pad: clamp(14px, 4vw, 24px);
    }

    html {
      min-height: 100%;
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      min-height: 100svh;
      font-family: "Poppins", sans-serif;
      color: var(--ink);
      background:
        linear-gradient(180deg, rgba(244, 251, 246, 0.95), rgba(232, 247, 238, 0.92)),
        #f7fbf7;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: clamp(12px, 2.2vw, 24px);
      overflow-x: hidden;
      overflow-y: auto;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image:
        linear-gradient(rgba(6, 70, 39, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 70, 39, 0.035) 1px, transparent 1px);
      background-size: 42px 42px;
      mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent 78%);
    }

    .app {
      width: min(100%, var(--app-w));
      min-height: auto;
      background: #f8f7e8;
      border: 1px solid rgba(6, 70, 39, 0.08);
      border-radius: 10px;
      box-shadow: 0 26px 70px rgba(5, 48, 28, 0.18);
      position: relative;
      overflow: visible;
    }

    .step {
      display: none;
      min-height: 0;
    }

    .step.active {
      display: flex;
      flex-direction: column;
    }

    .screen-inner {
      width: 100%;
      min-height: 0;
      display: flex;
      flex-direction: column;
      padding: var(--page-pad);
      overflow: visible;
      overscroll-behavior: contain;
      scrollbar-width: thin;
    }

    /* .landing-inner {
      padding-bottom: 0;
    } */

    .topbar {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }

    .brand {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .brand-mark,
    .icon-logo {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      background: linear-gradient(135deg, var(--green-900), var(--green-700));
      display: grid;
      place-items: center;
      box-shadow: 0 12px 26px rgba(8, 122, 68, .24);
      flex: 0 0 auto;
    }

    .icon-logo {
      margin: 0 auto 12px;
      background: #fff;
      border: 1px solid var(--line);
      box-shadow: 0 10px 24px rgba(7, 93, 53, .08);
    }

    .brand-mark svg,
    .icon-logo svg {
      width: 23px;
      height: 23px;
      fill: #fff;
    }

    .icon-logo svg {
      fill: var(--green-800);
    }

    .brand-title {
      line-height: 1.05;
      font-weight: 900;
      color: var(--green-950);
      font-size: 16px;
      letter-spacing: .2px;
    }

    .brand-title span {
      display: block;
      margin-top: 2px;
      font-size: 8px;
      letter-spacing: 1.9px;
      color: var(--muted);
    }

    h1,
    h2,
    p {
      margin-top: 0;
      text-align: center;
    }

    h1,
    h2 {
      color: var(--green-950);
    }

    h2 {
      font-size: clamp(20px, 5vw, 24px);
      line-height: 1.15;
      margin-bottom: 5px;
      font-weight: 850;
    }

    p {
      color: var(--text);
      line-height: 1.45;
    }

    .small-text {
      color: #223126;
      font-size: 12px;
      margin-bottom: 0;
      font-weight: 700;
    }

    .hero-area {
      text-align: center;
      padding-top: clamp(14px, 2.5svh, 22px);
      flex: 0 0 auto;
    }

    .hero-title {
      font-size: clamp(18px, 4.6vw, 22px);
      margin: 0;
      color: #1b2a20;
      font-weight: 750;
    }

    .hero-green {
      display: block;
      font-size: clamp(28px, 9vw, 39px);
      line-height: .98;
      margin-top: 5px;
      font-weight: 950;
      color: transparent;
      background: linear-gradient(135deg, var(--green-950), var(--green-700));
      -webkit-background-clip: text;
      background-clip: text;
      overflow-wrap: anywhere;
    }

    .hero-sub {
      margin: 10px auto 0;
      max-width: 330px;
      font-size: clamp(12px, 3.1vw, 14px);
      color: #47584d;
    }

    .landing-plant-image-wrap {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      /* margin: clamp(12px, 2.6svh, 20px) auto; */
      flex: 0 0 auto;
    }

    .landing-plant-image {
      width: 100%;
      /* max-height: clamp(190px, 32svh, 285px); */
      object-fit: cover;
      display: block;
      border-radius: 12px;
      background: #eef8ef;
    }

    .details-form {
      width: min(100%, 360px);
      margin: 0 auto;
      display: grid;
      /* gap: 11px; */
      flex: 0 0 auto;
    }

    .field {
      text-align: left;
    }

    .field label {
      display: block;
      /* margin: 0 0 5px 4px; */
      color: var(--green-950);
      font-size: 10px;
      font-weight: 850;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .field input {
      width: 100%;
      height: 42px;
      border: 1px solid rgba(7, 93, 53, .18);
      border-radius: 13px;
      background: #fff;
      padding: 0 14px;
      color: var(--ink);
      font-size: 14px;
      outline: none;
      box-shadow: 0 10px 24px rgba(5, 48, 28, .06);
    }

    .field input:focus {
      border-color: rgba(8, 122, 68, .62);
      box-shadow: 0 0 0 4px rgba(10, 152, 84, .12);
    }

    .form-error {
      /*min-height: 16px;*/
      color: #b3261e;
      font-size: 11px;
      font-weight: 700;
      text-align: center;
      margin: -2px 0 0;
    }

    button,
    .button {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      text-align: center;
      min-height: 44px;
      padding: 10px 16px;
      border: none;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--green-900), var(--green-700));
      color: #fff;
      font-size: 12px;
      font-weight: 850;
      cursor: pointer;
      margin: 0;
      letter-spacing: .2px;
      box-shadow: 0 16px 30px rgba(6, 70, 39, 0.22);
      text-transform: uppercase;
      text-decoration: none;
      transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
    }

    button:hover {
      transform: translateY(-2px);
      filter: saturate(1.05);
    }

    button.light {
      background: #fff;
      color: var(--green-900);
      border: 1px solid rgba(7, 93, 53, .20);
      box-shadow: 0 10px 24px rgba(5, 48, 28, .08);
    }

    button.secondary {
      background: var(--green-50);
      color: var(--green-900);
      border: 1px solid var(--line);
      box-shadow: none;
    }

    button.half {
      width: 100%;
      min-width: 0;
    }

    .btn-icon {
      width: 18px;
      height: 18px;
      fill: currentColor;
      flex: 0 0 auto;
    }

    .row-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 12px;
    }

    .journey {
      /*margin: clamp(16px, 2.5svh, 24px) calc(var(--page-pad) * -1) 0;*/
      padding: 10px var(--page-pad) max(14px, env(safe-area-inset-bottom));
      background: linear-gradient(135deg, var(--green-950), var(--green-800));
      color: white;
      /* border-radius: 20px 20px 0 0; */
      flex: 0 0 auto;
    }

    .journey-title {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-weight: 900;
      font-size: 11px;
      letter-spacing: .8px;
      margin-bottom: 10px;
      text-transform: uppercase;
    }

    .journey-title:before,
    .journey-title:after {
      content: "";
      width: 52px;
      height: 1px;
      background: rgba(255, 255, 255, .35);
    }

    .steps-row {
      display: grid;
      grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
      align-items: start;
      gap: 5px;
    }

    .mini-step {
      min-width: 0;
      text-align: center;
      font-size: 8px;
      line-height: 1.2;
      color: rgba(255, 255, 255, .92);
      font-weight: 650;
    }

    .mini-icon {
      width: 27px;
      height: 27px;
      margin: 0 auto 5px;
      border-radius: 10px;
      background: rgba(255, 255, 255, .12);
      display: grid;
      place-items: center;
    }

    .mini-icon svg {
      width: 15px;
      height: 15px;
      fill: #fff;
    }

    .arrow {
      opacity: .7;
      color: white;
      margin-top: 7px;
      font-size: 13px;
    }

    .upload-zone {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      min-height: 0;
    }

    .upload-card {
      width: min(100%, 360px);
      border: 1.5px dashed rgba(8, 122, 68, .35);
      border-radius: 22px;
      padding: clamp(20px, 5svh, 32px) 14px;
      text-align: center;
      background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(244, 251, 246, .9));
      margin: 0 auto;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 18px 42px rgba(5, 48, 28, .08);
      cursor: pointer;
    }

    .upload-card.drag-over {
      border-color: rgba(8, 122, 68, .75);
      background: #fff;
    }

    .upload-cloud {
      width: 64px;
      height: 64px;
      border-radius: 20px;
      margin: 0 auto 16px;
      background: #fff;
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
    }

    .upload-cloud svg {
      width: 35px;
      height: 35px;
      fill: var(--green-800);
    }

    .divider {
      display: flex;
      align-items: center;
      gap: 14px;
      color: var(--muted);
      margin: 16px 0;
      justify-content: center;
      font-size: 13px;
    }

    .divider:before,
    .divider:after {
      content: "";
      width: 70px;
      height: 1px;
      background: rgba(6, 70, 39, .16);
    }

    input[type="file"] {
      position: absolute;
      left: -9999px;
      opacity: 0;
    }

    .privacy {
      width: min(100%, 360px);
      display: flex;
      align-items: center;
      gap: 13px;
      margin: 0 auto;
      color: #405144;
      font-size: 12px;
      padding: 0 4px;
    }

    .privacy-icon {
      width: 34px;
      height: 34px;
      border-radius: 12px;
      background: #fff;
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .privacy-icon svg {
      width: 18px;
      height: 18px;
      fill: var(--green-800);
    }

    .privacy strong {
      color: var(--green-950);
    }

    .bottom-forest {
      height: 58px;
      margin: 16px calc(var(--page-pad) * -1) calc(var(--page-pad) * -1);
      background: linear-gradient(180deg, transparent 0%, rgba(232, 247, 238, .75) 18%, rgba(7, 93, 53, .18) 100%);
      flex: 0 0 auto;
    }

    .preview-box,
    .certificate-frame,
    .share-card {
      margin: 14px 0;
      /* border: 1px solid rgba(7, 93, 53, .16); */
      /* border-radius: 18px; */
      overflow: hidden;
      /* background: #fff; */
      /* box-shadow: 0 18px 38px rgba(5, 48, 28, .11); */
      flex: 0 0 auto;
    }

    img,
    canvas {
      width: 100%;
      display: block;
      margin: 0;
    }

    #previewImage {
      width: 100%;
      aspect-ratio: 4 / 5;
      max-height: min(430px, 48svh);
      object-fit: contain;
      background: #fff;
    }

    .tip-box {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 15px;
      color: #33443a;
      font-size: 12px;
      margin-bottom: 0;
      box-shadow: 0 10px 24px rgba(5, 48, 28, .06);
      text-align: left;
    }

    .tip-icon {
      width: 32px;
      height: 32px;
      border-radius: 12px;
      background: #fff5d9;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .tip-icon svg {
      width: 18px;
      height: 18px;
      fill: var(--gold);
    }

    .certificate-screen {
      justify-content: space-evenly;
    }

    .success-icon {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      margin: 0 auto 9px;
      background: linear-gradient(135deg, var(--green-900), var(--green-700));
      color: white;
      display: grid;
      place-items: center;
      box-shadow: 0 15px 32px rgba(8, 122, 68, .22);
      flex: 0 0 auto;
    }

    .success-icon svg {
      width: 27px;
      height: 27px;
      fill: white;
    }

    .congrats {
      font-size: clamp(21px, 5vw, 25px);
      margin-bottom: 1px;
    }

    .ribbon {
      width: max-content;
      max-width: 92%;
      margin: 0 auto;
      padding: 9px 28px;
      border-radius: 999px;
      background: linear-gradient(135deg, var(--green-950), var(--green-700));
      color: white;
      font-weight: 900;
      font-size: 15px;
      letter-spacing: .5px;
      text-align: center;
    }

    .certificate-actions {
      width: min(100%, 380px);
      margin: 0 auto;
      display: grid;
      gap: 10px;
      flex: 0 0 auto;
    }

    .certificate-frame canvas,
    .share-card canvas {
      max-height: min(430px, 45svh);
      object-fit: contain;
      /* background: #fbfcf6; */
    }

    .backup-status {
      min-height: 16px;
      margin: 0;
      color: #526056;
      font-size: 11px;
      font-weight: 700;
      text-align: center;
    }

    .back-btn {
      border: 1px solid var(--line);
      background: #fff;
      padding: 0;
      width: 42px;
      height: 42px;
      margin: 0;
      border-radius: 14px;
      color: var(--green-950);
      font-size: 30px;
      cursor: pointer;
      line-height: 1;
      box-shadow: 0 10px 22px rgba(5, 48, 28, .07);
    }

    .share-title {
      margin-top: 12px;
    }

    .grow-box {
      background: linear-gradient(135deg, var(--green-50), #fff);
      border: 1px solid var(--line);
      border-radius: 15px;
      padding: 14px;
      text-align: center;
      color: #405144;
      font-size: 13px;
      margin-top: 16px;
      box-shadow: 0 10px 24px rgba(5, 48, 28, .06);
    }

    .grow-box strong {
      color: var(--green-950);
      display: block;
      margin-bottom: 4px;
    }

    @media (min-width: 576px) {
      .app {
        margin: 0 auto;
      }
    }

    @media (max-width: 575.98px) {
      body {
        padding: 0;
        align-items: stretch;
      }

      .app {
        width: 100%;
        max-width: none;
        min-height: 100svh;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        overflow: hidden;
      }

      .step,
      .screen-inner {
        min-height: 100svh;
      }

      /* .screen-inner {
        padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
      } */

      /* .landing-inner {
        padding-bottom: 0;
      } */

      .hero-area {
        padding-top: 14px;
      }

      .journey {
        margin-left: -16px;
        margin-right: -16px;
      }
    }

    @media (max-height: 720px) {
      :root {
        --page-pad: 14px;
      }

      .brand-mark,
      .icon-logo {
        width: 34px;
        height: 34px;
        border-radius: 12px;
      }

      .brand-mark svg,
      .icon-logo svg {
        width: 20px;
        height: 20px;
      }

      .hero-area {
        padding-top: 10px;
      }

      .hero-green {
               font-size: clamp(20px, 3vw, 34px) !important;
      }

      .hero-sub {
        margin-top: 7px;
      }

      /* .landing-plant-image-wrap {
        margin: 10px auto;
      } */

      .landing-plant-image {
        /* max-height: 205px; */
        /* width: min(90%, 330px); */
      }

      /* .details-form {
        gap: 8px;
      } */

      .field input {
        height: 38px;
      }

      button,
      .button {
        /*min-height: 40px;*/
        /*padding-top: 8px;*/
        /*padding-bottom: 8px;*/
      }

      /* .journey-title {
        display: none;
      } */

      /*.journey {*/
      /*  padding-top: 11px;*/
      /*}*/

      .mini-icon {
        width: 23px;
        height: 23px;
        margin-bottom: 4px;
      }

      .mini-icon svg {
        width: 13px;
        height: 13px;
      }

      .mini-step {
        font-size: 7px;
      }

      /* .upload-card {
        padding: 20px 14px;
        margin: 14px auto;
      } */

      .upload-cloud {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
      }

      .bottom-forest {
        display: none;
      }

      /* #previewImage,
      .certificate-frame canvas,
      .share-card canvas {
        max-height: 38svh;
      } */
    }

    @media (max-height: 620px) {
      .screen-inner {
        justify-content: flex-start;
      }

      .landing-plant-image {
        max-height: 150px;
      }

      .hero-title {
        font-size: 17px;
      }

      .hero-green {
        font-size: 26px;
      }

      .small-text,
      .hero-sub,
      .tip-box,
      .privacy {
        font-size: 11px;
      }
    }


    /* =========================================================
       Final Responsive Flex Fix
       Only layout fitting + center image alignment fixed.
       No HTML/JS changes.
    ========================================================= */
    :root {
      --page-pad: clamp(10px, 1.8svh, 16px);
    }

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    body {
      height: 100svh;
      align-items: center;
      justify-content: center;
      padding: clamp(8px, 1.8svh, 16px);
      overflow: hidden;
    }

    @supports (height: 100dvh) {
      body {
        height: 100dvh;
      }
    }

    .app {
      width: min(100%, var(--app-w));
      /*height: min(840px, calc(100svh - 32px));*/
      /*max-height: calc(100svh - 32px);*/
      overflow: hidden;
      display: block;
    }
    @media(min-width:576px){
          section#uploadPage {
    height: min(840px, calc(100svh - 0px));
}

section#previewPage {
    height: min(840px, calc(100svh - 0px));
}
    }
  
    @supports (height: 100dvh) {
      .app {
        /*height: min(840px, calc(100dvh - 32px));*/
        /*max-height: calc(100dvh - 32px);*/
      }
    }

    .step,
    .step.active {
      height: 100%;
      min-height: 0;
    }

    .step.active {
      display: flex;
      flex-direction: column;
    }

    .screen-inner {
      height: 100%;
      min-height: 0;
      overflow: hidden;
       padding: 15px 20px 5px; 
    }

    button,
    .button {
      /*min-height: clamp(36px, 5.2svh, 44px);*/
      /*padding: 8px 14px;*/
      font-size: clamp(10px, 1.6svh, 12px);
    }

    .brand-mark,
    .icon-logo {
      width: clamp(31px, 5svh, 38px);
      height: clamp(31px, 5svh, 38px);
    }

    .brand-mark svg,
    .icon-logo svg {
      width: clamp(18px, 3svh, 23px);
      height: clamp(18px, 3svh, 23px);
    }

    h2 {
      font-size: clamp(18px, 3.1svh, 24px);
      line-height: 1.12;
      margin-bottom: 4px;
    }

    .small-text {
      font-size: clamp(10px, 1.65svh, 12px);
      line-height: 1.32;
    }

    /* Landing page: flex based, no grid */
    #landingPage .screen-inner {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: space-evenly !important;
      /*gap: clamp(6px, .6svh, 10px) !important;*/
      /* padding-bottom: 0 !important; */
      overflow: hidden !important;
    }

    #landingPage .topbar,
    #landingPage .hero-area,
    #landingPage .details-form,
    #landingPage {
      width: 100%;
      flex: 0 0 auto !important;
      min-height: 0;
    }

    .hero-area {
      padding-top: 0;
    }

    .hero-title {
      font-size: clamp(15px, 2.7svh, 21px);
      line-height: 1.08;
    }

    .hero-green {
      font-size: clamp(23px, 3svh, 38px) !important;
      line-height: .96;
      margin-top: 3px;
    }

    .hero-sub {
      margin-top: clamp(5px, 1svh, 10px) !important;
      font-size: clamp(10px, 1.65svh, 13px);
      line-height: 1.28;
      max-width: 330px;
    }

    .landing-plant-image-wrap {
      width: 100% !important;
      /* flex: 1 1 auto !important; */
      min-height: 118px !important;
      max-height: min(265px, 32svh) !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      margin: 0 auto !important;
      padding: 0 !important;
      overflow: visible !important;
    }

    .landing-plant-image {
      width: min(100%, 390px) !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: 100% !important;
      object-fit: contain !important;
      object-position: center center !important;
      display: block !important;
      margin: 0 auto !important;
      flex: 0 1 auto !important;
       border-radius: 3px; 
    }

    .details-form {
      width: min(100%, 350px);
       gap: clamp(5px, .85svh, 8px); 
    }

    .field label {
      /* margin-bottom: 3px; */
      font-size: clamp(8px, 1.35svh, 10px);
      /* line-height: 1.1; */
    }

    .field input {
      /* height: clamp(32px, 4.9svh, 40px); */
      border-radius: 12px;
      font-size: clamp(12px, 1.85svh, 14px);
    }

    .form-error {
      /*min-height: clamp(12px, 1.7svh, 16px);*/
      font-size: clamp(9px, 1.45svh, 11px);
      line-height: 1.15;
    }

    .journey {
      /*margin: 0 calc(var(--page-pad) * -1) 0;*/
      /* padding: clamp(7px, 1.2svh, 12px) var(--page-pad) max(8px, env(safe-area-inset-bottom)); */
    }

    .journey-title {
      font-size: clamp(8px, 1.5svh, 11px);
      /*margin-bottom: clamp(5px, .8svh, 9px);*/
    }

    .journey-title:before,
    .journey-title:after {
      width: clamp(28px, 9vw, 52px);
    }

    .steps-row {
      gap: 4px;
      align-items: start;
    }

    .mini-step {
      font-size: clamp(6px, 1.28svh, 8px);
      line-height: 1.12;
    }

    .mini-icon {
      width: clamp(20px, 3.8svh, 27px);
      height: clamp(20px, 3.8svh, 27px);
      margin-bottom: 8px;
    }

    .mini-icon svg {
      width: clamp(11px, 2svh, 15px);
      height: clamp(11px, 2svh, 15px);
    }

    .arrow {
      margin-top: clamp(4px, 1svh, 7px);
      font-size: clamp(10px, 1.8svh, 13px);
    }

    /* Other screens remain same, only screen-fit improved */
    #uploadPage .screen-inner,
    .upload-zone {
      justify-content: space-evenly;
    }

    .upload-card {
      /* padding: clamp(14px, 3.1svh, 28px) 14px; */
      /* margin: clamp(10px, 2svh, 16px) auto; */
      border-radius: 20px;
    }

    .upload-cloud {
      width: clamp(48px, 8svh, 64px);
      height: clamp(48px, 8svh, 64px);
      margin-bottom: clamp(8px, 1.6svh, 14px);
    }

    .upload-cloud svg {
      width: clamp(27px, 4.8svh, 35px);
      height: clamp(27px, 4.8svh, 35px);
    }

    .upload-card p,
    .privacy,
    .tip-box,
    .grow-box {
      line-height: 1.32;
    }

    .divider {
      margin: clamp(10px, 1.9svh, 16px) 0;
    }

    .bottom-forest {
      height: clamp(28px, 7svh, 58px);
      margin-top: clamp(8px, 1.4svh, 14px);
    }

    .preview-box,
    .certificate-frame,
    .share-card {
      margin: clamp(8px, 1.4svh, 13px) 0;
    }

    #previewImage {
      max-height: min(390px, 42svh);
    }

    .row-actions {
      margin-top: clamp(8px, 1.5svh, 12px);
    }

    .certificate-screen {
      justify-content:  space-evenly;
    }

    .success-icon {
      width: clamp(38px, 6svh, 46px);
      height: clamp(38px, 6svh, 46px);
      margin-bottom: clamp(5px, 1svh, 9px);
    }

    .congrats {
      font-size: clamp(19px, 3.2svh, 25px);
    }

    .ribbon {
      /* margin: clamp(6px, 1svh, 9px) auto clamp(8px, 1.5svh, 12px); */
      /* padding: clamp(7px, 1.3svh, 9px) clamp(20px, 5vw, 28px); */
      font-size: clamp(12px, 2.1svh, 15px);
    }

    .certificate-frame canvas,
    .share-card canvas {
      max-height: min(370px, 40svh);
    }

    .certificate-actions {
      gap: clamp(7px, 1.25svh, 10px);
    }

    @media (max-width: 575.98px) {
      body {
        padding: 0;
        align-items: stretch;
      }

      .app {
        width: 100%;
        height: 100svh;
        max-height: 100svh;
        border-radius: 0;
      }

      @supports (height: 100dvh) {
        .app {
          height: 100dvh;
          max-height: 100dvh;
        }
      }

      .landing-plant-image-wrap {
        min-height: 105px !important;
        max-height: min(235px, 31svh) !important;
      }

      .landing-plant-image {
        width: min(100%, 360px) !important;
      }
    }

    @media (min-width: 576px) and (max-width: 991.98px) {
      .app {
        width: min(92vw, 460px);
      }

      .landing-plant-image-wrap {
        max-height: min(270px, 32svh) !important;
      }
    }

    @media (max-height: 660px) {
      :root {
        --page-pad: 10px;
      }

      #landingPage .screen-inner {
        gap: 4px !important;
      }

      .hero-sub {
        margin-top: 3px !important;
        line-height: 1.2;
      }

      .landing-plant-image-wrap {
        min-height: 78px !important;
        max-height: min(160px, 25svh) !important;
      }

      .landing-plant-image {
        width: min(92%, 320px) !important;
      }

      /* .details-form {
        gap: 4px;
      } */

      .field input {
        height: 31px;
      }

      /*.journey-title {*/
      /*  display: none;*/
      /*}*/

      /*.journey {*/
      /*  padding-top: 7px;*/
      /*}*/

      .certificate-frame canvas,
      .share-card canvas,
      #previewImage {
        max-height: 35svh;
      }
    }

    @media (max-height: 560px) {
      .hero-sub,
      .small-text.text-capitalize {
        display: none;
      }

      .landing-plant-image-wrap {
        min-height: 58px !important;
        max-height: min(112px, 22svh) !important;
      }

      .landing-plant-image {
        width: min(86%, 270px) !important;
      }

      .mini-step {
        font-size: 6px;
      }

      .mini-icon {
        width: 18px;
        height: 18px;
      }

      /* .upload-card {
        padding: 12px 12px;
      } */

      .bottom-forest {
        display: none;
      }
    }

    /* =========================================================
       Preview Upload Image Fit Fix
       Only preview image area adjusted.
       Image fills the box properly, no left/right white space.
    ========================================================= */
    #previewPage .screen-inner {
      justify-content: space-evenly !important;
      /* gap: clamp(8px, 1.4svh, 12px) !important; */
    }

    #previewPage .icon-logo {
      margin-bottom: clamp(6px, 1svh, 10px) !important;
    }

    #previewPage h2 {
      margin-bottom: 2px !important;
    }

    #previewPage .small-text {
      margin-bottom: clamp(5px, 1svh, 8px) !important;
    }

    #previewPage .preview-box {
      width: min(100%, 350px) !important;
      /* height: clamp(205px, 32svh, 275px) !important; */
      margin: 0 auto !important;
      border-radius: 3px !important;
      overflow: hidden !important;
      background: #fff !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    #previewImage {
      width: 100% !important;
      height: 100% !important;
      /* max-height: none !important; */
      aspect-ratio: auto !important;
      object-fit: cover !important;
      /* object-position: center center !important; */
      background: transparent !important;
      display: block !important;
    }

    #previewPage .tip-box {
      width: min(100%, 350px) !important;
      margin: 0 auto !important;
      padding: clamp(10px, 1.6svh, 12px) 14px !important;
    }

    #previewPage .row-actions {
      width: min(100%, 350px) !important;
      margin: clamp(8px, 1.3svh, 12px) auto 0 !important;
    }

    @media (max-width: 575.98px) {
      #previewPage .preview-box {
        width: min(100%, 340px) !important;
        height: clamp(205px, 31svh, 260px) !important;
      }

      #previewPage .tip-box,
      #previewPage .row-actions {
        width: min(100%, 340px) !important;
      }
    }

    @media (max-height: 660px) {
      #previewPage .preview-box {
        height: clamp(175px, 29svh, 220px) !important;
        width: min(100%, 320px) !important;
      }

      #previewPage .tip-box,
      #previewPage .row-actions {
        width: min(100%, 320px) !important;
      }
    }

    @media (max-height: 560px) {
      #previewPage .preview-box {
        height: clamp(135px, 25svh, 170px) !important;
        width: min(100%, 285px) !important;
      }
    }


