body {
      font-family: Arial, sans-serif;
      padding: 20px;
      margin: 0;
      background: #f0f0f0;
      box-sizing: border-box;
    }

  
      /* Hide the real file input everywhere (desktop + mobile) */
      #uploadImage {
        display: none;
      }

      /* Default (desktop) style for the custom upload button */
      #uploadLabel {
        display: inline-block;
        padding: 8px 16px;
        font-size: 14px;
        border: 1px solid #666;
        border-radius: 6px;
        background: #ffffff;
        cursor: pointer;
      }

    #layoutGrid {
      display: grid;
      grid-template-columns: auto auto auto;
      grid-template-rows: auto auto auto auto auto;
      gap: 10px;
      justify-content: center;
      align-items: center;
      margin-top: 20px;
    }

    .full-width {
      grid-column: 1 / span 3;
      display: flex;
      justify-content: center;
    }

    #uploadRow {
      grid-row: 1;
      margin-bottom: 10px;
    }

    #moveUpBtn {
      grid-column: 2;
      grid-row: 2;
    background: linear-gradient(
    to bottom,
    #c5e3f7,   /* light green */
    #5d6cc0    /* slightly darker green */
  );
    }

    #moveLeftBtn {
      grid-column: 1;
      grid-row: 3;
      align-self: stretch; 
    background: linear-gradient(
    to right,
    #c5e3f7,   /* light green */
    #5d6cc0    /* slightly darker green */
  );
    }

    #moveRightBtn {
      grid-column: 3;
      grid-row: 3;
      align-self: stretch; 
    background: linear-gradient(
    to left,
    #c5e3f7,   /* light green */
    #5d6cc0);    /* slightly darker green */
    }

    #moveDownBtn {
      grid-column: 2;
      grid-row: 4;
        background: linear-gradient(
    to top,
    #c5e3f7,   /* light green */
    #5d6cc0);    /* slightly darker green */
    }

    #canvasContainer {
      position: relative;
      grid-column: 2;
      grid-row: 3;
      width: 100%;
      max-width: 600px;
      aspect-ratio: 1 / 1;
    }

    #photoCanvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    #templateOverlay {
      position: absolute;
      top: 0;
      left: 0;
      pointer-events: none;
      width: 100%;
      height: 100%;
      z-index: 10;
      user-select: none;
    }

    .controls {
      grid-row: 5;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      margin-top: 10px;
    }

    .controls button {
      padding: 8px 16px;
      font-size: 14px;
      cursor: pointer;
    }

.arrow-btn {

  border-radius: 12px;
  border: 1px solid #846fbf;       /* light green border */
  color: #000000;                  /* dark green arrow */
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow: 0 3px 6px rgba(0,0,0,0.20);
  transition: 0.1s ease;

}

.arrow-btn:hover {
  filter: brightness(1.1);
}

.arrow-btn:active {
  box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset;
  transform: translateY(1px);
}

#siteFooter {
  margin-top: 30px;
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: #333;
}

#siteFooter a {
  text-decoration: none;
  color: #1a6e1a; /* green link */
  font-weight: bold;
}

#siteFooter a:hover {
  text-decoration: underline;
}

#termsPage {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 40px auto;
  line-height: 1.7;
  padding: 0 20px;
  color: #222;
}

#termsPage h1,
#termsPage h2 {
  color: #115511;
}

#termsPage hr {
  margin: 30px 0;
}

#termsPage ul {
  margin-left: 20px;
}

#termsPage strong {
  font-weight: bold;
}


/* Mobile devices: MASSIVE 4× larger Zoom/Reset/Download buttons — now 40% wider */
@media (max-device-width: 480px) {
  #controlButtons {
    display: grid;                           /* override desktop flex */
    grid-template-columns: repeat(2, 1fr);    /* 2×2 layout */
    gap: 30px;
    width: 100%;
    max-width: 640px;                         /* <-- 40% wider than before */
    margin: 0 auto;
  }

  #controlButtons button {
    width: 100%;
    padding: 42px 18px;                       /* large 4× padding */
    font-size: 34px;                          /* huge text */
    border-radius: 18px;
    font-weight: bold;
  }

/* Custom big upload button for iPhone */
#uploadLabel {
  display: block;
  width: 100%;
  max-width: 640px;              /* same width as your 4× buttons */
  padding: 42px 20px;            /* huge tap target */
  font-size: 34px;               /* <-- 4× larger text */
  font-weight: bold;
  text-align: center;
  background: #ffffff;
  border: 2px solid #666;
  border-radius: 20px;
  margin: 0 auto 20px;
  cursor: pointer;
}

  /* Left / Right arrow buttons: double WIDTH (thicker vertically) */
  #moveLeftBtn,
  #moveRightBtn {
    width: 80px !important;        /* originally ~40px → now 2× thicker */
    font-size: 34px !important;    /* larger arrow symbol for consistency */
  }

  /* Up / Down arrow buttons: double HEIGHT (thicker horizontally) */
  #moveUpBtn,
  #moveDownBtn {
    height: 80px !important;       /* originally ~40px → now 2× thicker */
    font-size: 34px !important;
  }

}

#tipBox {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 10px;
}

#tipLink {
  display: inline-block;
  background: #ffd43b;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: 0.2s ease;
}

#tipLink:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

#tipNote {
  margin-top: 8px;
  color: #555;
  font-size: 13px;
}

@media (max-device-width: 480px) {
  #tipLink {
    font-size: 28px;
    padding: 32px 26px;
  }

  #tipNote {
    font-size: 30px;
  }
}

/* Extra-tight desktop spacing and smaller tip button */
@media (min-device-width: 481px) {

  /* Pull control buttons closer to canvas */
  #controlButtons {
    margin-top: 0px !important;
  }

  /* MUCH smaller tip button + very tight spacing */
  #tipBox {
    margin-top: 8px !important;
    margin-bottom: 4px;
  }

  #tipLink {
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
  }

  #tipNote {
    font-size: 15px !important;
    margin-top: 4px !important;
  }

  /* Slightly tighten overall layout grid gaps */
  #layoutGrid {
    gap: 4px !important;   /* previously 10, then 6 */
  }
}
