/* ---------------------------------------
   1) FONT
--------------------------------------- */
@font-face {
  font-family: 'PP Mori';
  src: url('./assets/fonts/PPMori-SemiBold.otf') format('opentype');
}

@font-face {
  font-family: 'Right Grotesk Medium';
  src: url('./assets/fonts/right-grotesk/RightGrotesk-Medium.otf') format('opentype');
}

@font-face {
  font-family: 'Right Grotesk Spatial Black';
  src: url('./assets/fonts/right-grotesk/RightGrotesk-SpatialBlack.otf') format('opentype');
}


/* ---------------------------------------
   2) RESET & BASE
--------------------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;

  font-family: 'PP Mori', sans-serif;

  background: white;
  color: #2a9df4;
  box-sizing: border-box;

  /* background: linear-gradient(to bottom,
      #ffffff 0%,
      #ffffff 75%,
      rgba(244, 182, 61, 0.3) 100%); */
}

/* @-moz-document url-prefix() {
  body {
    transform: scale(1);
    transform-origin: top center;
    width: 100%;
    overflow-x: hidden;
  }
} */

.homepage {
  display: flex;
  flex-direction: column;

  /* justify-content: flex-start; */

  align-items: center;

  min-height: 100vh;

  padding-top: 200px;
}


.wavy-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: url("./assets/wave-home.svg") no-repeat bottom center;
  background-size: 100% auto;
}

.char-page {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* ---------------------------------------
   3) REUSABLE CIRCLE BUTTON
--------------------------------------- */
.circle-button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: none;
  color: white;
  cursor: pointer;
  background-color: ;
  transition: background-color 0.3s ease, border 0.3s ease, color 0.3s ease;
}

.circle-button.extrasmall {
  width: 30px;
  height: 30px;
  font-size: 1.0rem;
}

.circle-button.small {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

.circle-button.medium {
  width: 70px;
  height: 70px;
  font-size: 1.8rem;
}

.circle-button:hover {
  background-color: transparent;
  border: 3px solid currentColor;
  color: currentColor;
}

/* COLOR HELPERS */
.blue-bg {
  background-color: #58aaf7;
  color: white;
}

.orange-bg {
  background-color: #e85e24;
  color: white;
}

.yellow-bg {
  background-color: #f4b63d;
  color: white;
}

.green-bg {
  background-color: #22b573;
  color: white;
}







/* ---------------------------------------
   4) HEADER
--------------------------------------- */
.header {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 120px 60px 120px;
  flex: 1 1 16.666%;

  /* 1/6 */
}

@media (min-width: 768px) {

  .char-page {

    /* HEADER AMENDMENTS  */
    .header-top {
      position: absolute;
      left: 30px;
      top: 50%;
      transform: translateY(-50%);
      padding: 15px 20px 15px 20px;
      background-color: #58aaf7;
      border-radius: 20px;
      /* transform: rotate(2deg) !important; */
    }

    .header-top .text-back {
      background-color: #fff;
      color: #4a90e2;
      font-size: 0.9rem;
    }

    .header-top .header-text {

      display: none;
    }

    .header-top .circle-button {
      background-color: #fff;
      color: #2a9df4;

    }

    .header-top #info-toggle {
      display: none;
      /* background-color: #f4b63d;
  color: #fff; */
    }



    /* HEADER AMENDMENTS  */

    /* TITLE AMENDMENTS  */


    .title-section {
      margin-top: 5px;
      background-color: #f4b63d;
      border-radius: 20px;

      padding: 5px 20px 15px 20px;
      width: 50%;
      transform: rotate(-1deg) !important;
    }

    .title-section h1 {
      font-size: 1.5rem;
      color: #e53935;
      padding: 10px;

    }

    .title-section p {
      font-size: 1rem;
      color: #fff;

    }

    /* .title-section .steps {} */


    .step {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 2px solid #fff;
      margin: 0 8px;
    }

    .step.active {
      background: #fff;
    }

    /* TITLE AMENDMENTS  */


    /* button AMENDMENTS  */


    .next-btn {
      background-color: #2a9df4;

      border: none;
      color: white;
      font-weight: bold;
      font-size: 1.1rem;
      padding: 15px 30px;
      border-radius: 15px;
      cursor: pointer;
      transform: rotate(-8deg) !important;
    }

    .back-btn {
      background-color: #e85e24;
      border: none;
      color: white;
      font-weight: bold;
      font-size: 1.1rem;
      padding: 15px 30px;
      border-radius: 15px;
      cursor: pointer;
      transform: rotate(2deg) !important;
    }





    /* button AMENDMENTS  */

  }

}

.back-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.text-back {
  background: #2a9df4;
  border: none;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
}

.text-back:hover {
  opacity: 0.9;
}


/* ---------------------------------------
   5) HEADER TITLE SECTION
--------------------------------------- */

.title-section {
  text-align: center;
  /* max-width: 600px; */
}

.title-section h1 {
  margin: 0;
  font-size: 1.3rem;

}

.title-section h2 {
  margin: 0;
  padding: 0;
}

.steps {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

/* .step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #2a9df4;
  margin: 0 8px;
}

.step.active {
  background: #2a9df4;
} */

.subtitle {
  margin: 0;
  font-size: 1rem;
}

/* ---------------------------------------
   6.2) BUILDER SECTION (CHARACTER PAGE)
--------------------------------------- */
.builder-section {
  position: relative;
  /* <== important! */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  width: 100%;
  flex: 1 1 66.666%;
  /* 4/6 */
  overflow: hidden;
  /* optional: avoid accidental overflow */
}

#rig {
  border: none;
  /* z-index: 99; */
}

/* .carousel-nav {
  display: none !important;
} */

/* show nav buttons only in stage-1 & stage-2 */
/* body.stage-1 .carousel-nav,
body.stage-2 .carousel-nav {
  display: inline-flex !important;
} */


.rig-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 175px;
  /* adjust width as needed */
  height: 100%;
  /* tall vertical bar */
  background-color: #2a9df4;
  /* your blue */
  z-index: 0;
  /* behind SVG & carousels */
  border-radius: 40px;
  /* optional: rounded edges */
}

/* ensure builder-section is positioned relatively */
.builder-section {
  position: relative;
  flex: 1 1 66.666%;
  overflow: hidden;
}

/* let your SVG fill its parent */
.svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* optional: cursor pointer on paths */
.svg-container svg path {
  cursor: pointer;
}



/* ---------------------------------------
   6.1) BUILDER SECTION (SVG ASSETS)
--------------------------------------- */
/* === Assets Rows === */

.list {
  height: 150px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)
}

.list li {
  list-style-type: none;


  opacity: 1;
  position: absolute;
  left: 50%;

  border-radius: 2px;
  /* background: #9C89B8; */
  transition: transform 1s, opacity 1s;

}


.head {
  transform: translateY(-200px)translateX(-400px);
}

.torso {
  transform: translateY(-120px)translateX(-400px);
}


.legs {
  transform: translateY(40px)translateX(-400px);
}

.shoes {
  transform: translateY(170px)translateX(-400px);
}

/* .head {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.torso {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
} */




.head li {
  width: 130px;
  height: 130px;
  margin-left: -65px;
}

/* .torso li{
width: 250px;
  height: 250px;
  margin-left: -125px;
} */

.torso li {
  width: 240px;
  height: 240px;
  margin-left: -120px;
}

.legs li {

  width: 250px;
  height: 250px;
  margin-left: -125px;
}

/* .legs li{
  width: 180px;
  height: 180px;
  margin-left: -90px;
} */


.shoes li {
  width: 180px;
  height: 180px;
  margin-left: -90px;
}

.head {
  /* position: absolute; */
  z-index: 4;
}

.torso {
  /* position: absolute; */
  z-index: 3;
}

.legs {
  /* position: absolute; */
  z-index: 2;
}

.shoes {
  /* position: absolute; */
  z-index: 1;
}





.list .act {
  opacity: 1;
}

.list .prev,
.list .next {
  cursor: pointer;
}

.list .prev {
  transform: translateX(-220px) scale(.70);
}

.list .next {
  transform: translateX(220px) scale(.70);
}

.list .hide {
  transform: translateX(-420px) scale(.70);
}

.list .new-next {
  transform: translateX(420px) scale(.70);
}

.list .hide,
.list .new-next {
  opacity: 0;
  transition: opacity .5s, transform .5s;
}

/* base state: fully visible */
.list .svg-container {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* when the UL has is-animating, fade out & shrink */
.list.is-animating .svg-container {
  opacity: 0;
  transform: scale(0.95);
}



.swipe {
  width: 270px;
  height: 200px;
  position: absolute;
  background-color: green;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}


.builder-section {
  position: relative;
}

/* Stage-3: hide everything but the head, center & zoom it */
body.stage-3 {
  overflow: hidden;
  /* prevent scrollbars when we blow it up */
}


/* body.stage-3 .torso, */
body.stage-3 .legs,
body.stage-3 .shoes,
body.stage-3 .rig-background {
  /* display: none; */
  opacity: 0;
  /* transition: opacity   0.7s ease; */
}


/* Stage 2: rig background becomes white with blue border */
/* body.stage-2 .rig-background {
  background: white;
  border: 3px solid #2a9df4;
  height: 100%;
  border-radius: 40px;
  opacity: 1;
} */



body.stage-3 main.builder-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  /* fill screen */
}



/* if you still need to fade this zoom like your carousels: */
body.stage-3 .head {
  /* transition: transform 0.3s ease, opacity 0.3s ease; */
}




/* hide every <li> except the .act one in the head carousel */
body.stage-3 .head .list li:not(.act),
body.stage-3 .torso .list li:not(.act) {
  display: none !important;
}

/* hide the swipe area if you like */
body.stage-3 .head .swipe,
body.stage-3 .torso .swipe {
  display: none !important;
}

body.stage-3 .head {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translateX(-50%) scale(3);
  transform-origin: center center;
  /* transition: transform 0.7s ease;  */
  z-index: 1000 !important;
}

body.stage-3 .torso {
  position: fixed !important;
  top: 80% !important;
  left: 50% !important;
  transform: translateX(-50%) scale(3);
  transform-origin: center center;
  /* transition: transform 0.7s ease;  */
  z-index: 0 !important;
}

body.stage-4 .head {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translateX(-50%) scale(1);
  transform-origin: center center;
  /* transition: transform 0.7s ease;  */
  z-index: 1000 !important;
}

body.stage-4 .torso {
  position: fixed !important;
  top: 80% !important;
  left: 50% !important;
  transform: translateX(-50%) scale(1);
  transform-origin: center center;
  /* transition: transform 0.7s ease;  */
  z-index: 0 !important;
}


/* ---------------------------------------
   STAGE-3: FLOAT NEXT/BACK OVER TORSO
--------------------------------------- */


/* keep footer in its normal spot but on top of the torso in stage-3 */
body.stage-3 .footer-section {
  position: relative;
  /* make z-index apply without re-positioning */
  z-index: 1003 !important;
  /* higher than head (1000), canvas (1001), toolbar (1002) */
}


body.stage-3 .footer-section .back-btn,
body.stage-3 .footer-section .next-btn {
  /* ensure they keep their pill shape */
  display: inline-flex;
}

body.stage-3 .draw-toolbar {
  position: fixed !important;

  top: 50%;
  transform: translateY(-50%);

  display: flex;
  flex-direction: row;
  gap: 16px;
  z-index: 10;

  width: 50%;
  height: 20%;
  border-radius: 30px;

}

body.stage-3 .draw-toolbar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 16px;
  background-color: none;
  border-radius: 24px;
  z-index: 10;
}

/* === Radial Fan Layout === */
.color-picker {
  position: relative;
  width: 120px;
  height: 120px;
  margin-right: 20px;
}

/* Position swatches radially */
.color-picker .color-swatch {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* border: 0px solid #2a9df4; */
  border: none;
  /* box-shadow: 0 0 2px rgba(0,0,0,0.3); */
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* Optional: highlight selected */
.color-picker .color-swatch.selected {
  border: 10px solid #f4b63d;
}


.button-row {
  position: relative;
  width: 200px;
  height: 200px;
}

.arc-button {
  position: absolute;
  background: #e85e24;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

#clearBtn {
  border-radius: 999px;
  width: auto;
  padding: 8px 16px;
  margin-left: 20px;
  font-size: 1.5rem;
}

/* ensure each card can position its corner circle */
/* body.stage-3 .draw-toolbar .card-wrapper {
  position: relative;
}

body.stage-3 .draw-toolbar .card-wrapper {
  width: 150px;    
  height: 150px;   
  transform: none; 
} */

/* body.stage-3 .draw-toolbar .card-wrapper .card-bg {
  width: 100%;
  height: 100%;
} */

/* body.stage-3 .draw-toolbar .card-content {
  padding: 8px; 
   }
     /* tighten up text/swatches */

/* optionally shrink the corner icon a bit */
/* body.stage-3 .draw-toolbar .corner-circle {
  transform: scale(0.6);
} */

/*  show carousel arrows in stage-1 & stage-2 */
body:not(.stage-3):not(.stage-4) .carousel-nav {
  display: inline-flex !important;
}






/* override the orange corner (color-picker card) */
body.stage-3 .draw-toolbar .corner-circle.orange-bg {
  top: -15px !important;
  right: -15px !important;
  bottom: auto !important;
  left: auto !important;
}

/* make sure your prev/next buttons are visible in stage-2 */
body.stage-2 .carousel-nav {
  display: inline-flex !important;
  /* or `flex` if you’re using `display: flex` elsewhere */
}


/* ---------------------------------------
   6.3) STAGE 3 TOOLBAR
--------------------------------------- */


#faceCanvas {
  position: fixed;
  z-index: 1001;
  background: tr ansparent;
  touch-action: none;
  cursor: crosshair;
  /* cursor: url('assets/icons/brush.cur') 16 16, auto; */
  transform: none !important;
}




/* only hide carousel arrows (and nothing else) once we’re in stage-3 */
body.stage-3 .carousel-nav {
  display: none !important;
}

/* .color-picker {
  display: grid !important;
  grid-template-columns: repeat(2, auto);
  grid-auto-rows: auto;
  gap: 8px;
  justify-content: center;
} */
/* .color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  cursor: pointer;
} */
/* .color-swatch.selected {
  border: 2px solid #000;
} */

/* body.stage-3 .draw-toolbar #undoBtn,
body.stage-3 .draw-toolbar #redoBtn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: #58aaf7;     
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

body.stage-3 .draw-toolbar #clearBtn {
  background: #fff;
  color: #58aaf7;
  border: 2px solid #58aaf7;
  border-radius: 999px;      
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

 */


/*  ❌ turn off all nav buttons & extra slides */
body.stage-4 .carousel-nav,
body.stage-4 .list .prev,
body.stage-4 .list .next,
body.stage-4 .list .hide,
body.stage-4 .list .new-next {
  display: none !important;
}

/*  ✅ keep only the active <li> visible */
body.stage-4 .list .act {
  opacity: 1 !important;
  transform: none !important;
}

/* body.stage-4 #faceCanvas {
  display: block !important;
  transform: none !important;
} */


body.stage-3 .carousel-nav,
body.stage-4 .carousel-nav,
body.stage-3 .list li:not(.act),
body.stage-4 .list li:not(.act) {
  display: none !important;
}

/* 
.head,
.torso,
.legs,
.shoes,
#faceCanvas {
  transition:
    transform 0.7s ease,
    top       0.7s ease,
    left      0.7s ease,
    width     0.7s ease,
    height    0.7s ease,
    opacity   0.7s ease;  
} */


/* body.stage-4 .legs,
body.stage-4 .shoes,
body.stage-4 .rig-background {
  opacity: 1;
   transition: opacity   0.9s ease;
} */



/* after stage-3 zoom, stage-4 sends everything back to “normal” */
body.stage-4 .head,
body.stage-4 .torso {
  position: absolute !important;
  /* top: 100px   !important;
  left: 50%    !important; */
  transform: translateX(-50%) scale(1) !important;

}

/* if your torso/legs have different top offsets in the default stage, replace `top:100px` with those values */


/* make sure the canvas has no leftover scale */
body.stage-4 #faceCanvas {
  transform: none !important;
}

body.stage-4 .rig-background {
  /* background: linear-gradient(to top, #2a9df4, transparent); */
  opacity: 0;


  /* transition: background 0.7s ease, opacity 0.7s ease, width 0.7s ease; */
}

.rig-background {
  transition: background 0.7s ease, opacity 0.7s ease;
}



/* body.stage-4 main.builder-section {
  
  transform: translateX(-120px);
  transition: transform 0.7s ease;
} */


/* ---------------------------------------
   6.3) INPUT PANEL
--------------------------------------- */



/* base styling, hidden by default */
.left-panel,
.right-panel {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) translateX(100px);
  opacity: 0;
  pointer-events: none;
  width: 280px;
  background: rgba(255, 255, 255, 0.95);
  background: #f4b63d;
  padding: 20px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: opacity 0.7s ease, transform 0.7s ease;
  z-index: 1005;
  /* above everything else */
}

.left-panel {
  left: 200px;
}

.right-panel {
  right: 200px;
}


/* only show & slide in on stage-4 */
body.stage-4 .left-panel,
body.stage-4 .right-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* form groups */
.left-panel .form-group,
.right-panel .form-group {
  margin-bottom: 16px;
}

.left-panel .form-group label,
.right-panel .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #fff;
}

.left-panel .input-field,
.right-panel .input-field {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #58aaf7;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.left-panel .input-field:focus,
.right-panel .input-field:focus {
  border-color: #e85e24;
}

/* traits section */
.left-panel .traits-section p,
.right-panel .traits-section p {
  margin: 0 0 8px;
  font-weight: 600;
  color: #2a9df4;
}

.left-panel .tags,
.right-panel .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.left-panel .tag,
.right-panel .tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: white;
}

.left-panel .tag.pink {
  background: #e91e63;
}

.left-panel .tag.blue {
  background: #1e3a8a;
}

.left-panel .add-tag {
  margin-top: 4px;
}


.card-input {
  position: absolute;
  background: #f4b63d;
  padding: 14px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: white;
  transform: rotate(-5deg);
  z-index: 1000;
  max-width: 200px;
  text-align: left;
}

.card-input input,
.card-input textarea {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.card-input .icon {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #e91e63;
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 1) the wrapper card */
.traits-card {
  /* reuse your .card-input rules (or copy them here) */
  background: none;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
  transform: rotate(6deg);
  position: absolute;
  top: 5vh;
  right: 24vw;
  max-width: 240px;
  text-align: center;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: white;
}

/* 2) optionally style the heading */
.traits-card h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e91e63;
}

/* 3) the inner list flexbox */
.traits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* 4) reset the individual cards so they flow */
.traits-card .trait-card {
  transform: none;
  /* remove the rotate on each trait */
  margin: 0;
  /* cancel any absolute positioning */
  width: auto;
  /* let them size to their text */
  padding: 8px 12px;
  /* tighten them up */
  font-size: 0.8rem;
  line-height: 1.2;
  text-transform: none;
  border-radius: 10px;
}

.trait-card img {
  display: block;
  margin: 0 auto;
  /* remove these if you're setting width/height in JS */
  max-width: 100%;
  height: auto;
}


/* 5) stage-4 only shows the wrapper */
.card-input.traits-card {
  display: none;
}

body.stage-4 .card-input.traits-card {
  display: flex;
}


/* .trait-card {
  font-size: 0.85rem;
  line-height: 1.1;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: bold;
  color: white;
  text-align: center;
  transform: rotate(-10deg);
  width: auto;
  max-width: 160px;
} */

/* .trait-card.blue {
  background: #2a9df4;
}

.trait-card.pink {
  background: #e91e63;
}

.trait-card.green {
  background: #22b573;
}

.trait-card.yellow {
  background: #e85e24;
} */


.info-card {
  background: #f7931e;
  color: #fff;
  border-radius: 20px;
  transform: rotate(3deg);
  position: fixed;
  top: 60px;
  right: 50px;
  padding: 16px;
  text-align: center;
  max-width: 300px;
  z-index: 1000;
}

.info-card #info-close {
  display: none;
}


.info-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.info-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.info-buttons .text-back {
  background-color: white;
  border: 2px solid #e53935;
  border-radius: 20px;
  color: #e85e24;
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
  flex: 1;
}





.card-input {
  display: none;
  /* default hidden */
}

body.stage-4 .card-input {
  display: block;
}


body.stage-4 .name-card {
  top: 5vh;
  /* 5% of viewport height */
  left: 26vw;
  /* 20% of viewport width */
  transform: rotate(-6deg);
  background: #f7931e;
}

body.stage-4 .fav-card {
  top: 22vh;
  left: 24vw;
  transform: rotate(3deg);
  background: #9e005d;
}

/* body.stage-4 .trait-card.blue {
  top: 45vh;
  left: 25vw;
  transform: rotate(-8deg);

}

body.stage-4 .trait-card.pink {
  top: 50vh;
  left: 23vw;
  transform: rotate(3deg);
  
}

body.stage-4 .trait-card.green {
  top: 47vh;
  left: 32vw;
  transform: rotate(3deg);
 
}

body.stage-4 .trait-card.yellow {
  top: 52vh;
  left: 30vw;
  transform: rotate(3deg);
  
} */


.card-input.email-card {
  max-width: 270px;
  width: 80%;
  padding: 20px 25px;
  font-size: 1rem;
  background-color: #22b573;
}

.card-input.email-card input,
.card-input.email-card small {
  font-size: 0.9rem;
  /* adjust input and small text */
}

body.stage-4 .email-card {
  top: 35vh;
  right: 10vw;
  /* instead of 200px */
  transform: translateX(-50%) rotate(-3deg);
}

small {
  font-size: 0.7rem;
}

.checkbox-row {
  /* display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0%; */
  display: flex;
  align-items: center;
}

.checkbox-row input[type="checkbox"] {
  /* stop it from flexing */
  flex: 0 0 auto;
  /* make it big enough without transform */
  width: 1.2em;
  height: 1.2em;
  /* remove the scale-transform (optional) */
  transform: none;
  /* create consistent spacing */
  margin-right: 0.5rem;
  accent-color: #e85e24;
  cursor: pointer;
}

.checkbox-row label {
  /* let the label fill the rest */
  flex: 1 1 auto;
  font-size: 0.7rem;
  line-height: 1.2;
  color: white;
}



.red-bg {
  background-color: #e53935 !important;
  color: white;
}

.red-bg:hover {
  background-color: transparent;
  border: 3px solid #e53935;
  color: #f4b63d;
}

/* place in your styles.css */
.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
}

/* tilt the alert, increase overall font size */
.custom-alert__content {
  background: #fff;
  color: #1e3a8a;
  border-radius: 20px;
  padding: 2rem;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: rotate(3deg);
  font-size: 1.25rem;
}


/* message text */
.custom-alert__content p {
  margin: 0;
  line-height: 1.4;
  white-space: normal;
  /* ensures text wraps */
  word-break: break-word;
  /* breaks long words if needed */
}


/* 
.custom-alert__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}


.custom-alert__buttons button {
  padding: 0.75rem 1rem;
  border: 2px solid;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background: #fff;
} */


/* #custom-alert__gallery {
  border-color: #22b573;
  color: #22b573;
}

#custom-alert__another {
  border-color: #9e005d;
  color: #9e005d;
} */
/* arrange buttons in a 2x2 grid */
.custom-alert__buttons {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* make buttons square */
.custom-alert__buttons button {
  width: 150px;
  height: 150px;
  padding: 0;
  border: 2px solid;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  /* background: #fff; */
  /* display: flex; */
  align-items: start;
  justify-content: left;
  text-align: left;
  padding: 20px;
  line-height: 1.2;
  border: none;
}

/* first button: green outline & text */
#custom-alert__gallery {
  background-color: #22b573;
  color: #fff;
  transform: rotate(2deg);
}

/* second button: magenta outline & text */
#custom-alert__another {
  background-color: #9e005d;
  color: #fff;
  transform: rotate(3deg);
}

/* third button: blue outline & text */
#custom-alert__save {
  background-color: #2a9df4;
  color: #fff;
  transform: rotate(4deg);
}

/* fifth button: purple gradient */
#custom-alert__ar {
  background: linear-gradient(135deg, #6a4aff, #d946ef);
  color: #fff;
  transform: rotate(-2deg);
}

/* fourth button: orange outline & text */
#custom-alert__home {
  background-color: #f7941d;
  color: #fff;
  transform: rotate(-1deg);
  grid-column: 1 / -1;
  justify-self: center;
}



.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10005;
}


.modal-content {
  background: #fff;
  padding: 1.5em;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-top: 0;
}

/* .modal-content button {
  padding: 0.75em 1.5em;
  border: none;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s;
} */

/* .modal-content button:hover {
  background-color: #fff;
} */

#tc-agree {
  padding: 10px 20px 10px 20px;
  font-size: 1.2rem;
  border: none;
  border-radius: 30px;
  transition: background-color 0.3s;
}

#tc-agree:hover {
  background-color: #22b573;
}

.tc-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: white;
  border: none;
  font-size: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 20px;
  text-align: center;
  padding: 0;
  transition: background-color 0.3s;
  transition: color 0.3s;
}

.tc-close:hover {
  background: darkred;
  color: #e53935;
  transition: background-color 0.3s;
  transition: color 0.3s;
}

.modal-content {
  position: relative;
  /* so the button positions relative to this box */
}





/* ---------------------------------------
   6.3) FOOTER
--------------------------------------- */

.footer-section {
  flex: 1 1 16.666%;
  /* 1/6 */
  display: flex;
  align-items: center;
  transition: all .3s ease;
  /* background: linear-gradient(to bottom, transparent 50%, #f4b63d 50%); */
  background: url("./assets/wave.svg") no-repeat bottom center;
  background-position: center calc(100% + 40px);

  /* stretch it edge‑to‑edge */
  background-size: 100% auto;
  /* ← full width, keep aspect ratio */
  position: relative;
}

.footer-section .footer-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.footer-section .footer-buttons button {
  border: 2px solid #fff;
}




/* stage 1: only next button, center it */
.footer-section.stage-1 {
  justify-content: center;
}

.footer-section.stage-1 .back-btn {
  display: none;
}

/* stage 2: two buttons side-by-side, centered */
.footer-section.stage-2 {
  justify-content: center;
  gap: 20px;
  /* space between buttons */
}

.footer-section.stage-2 .back-btn {
  display: inline-block;
  /* make sure it’s visible */
}





/* ---------------------------------------
   7) HOME PAGE CONTAINER & CARDS
--------------------------------------- */
.container {
  text-align: center;
}

.hello {
  color: orange;
  font-size: 1.2rem;
}

.title {
  color: #4a90e2;
  font-size: 2.5rem;
  font-weight: bold;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.card-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.card-wrapper.mobile-only {
  display: none;
}

.card-wrapper:hover {
  transform: scale(1.05);
}

.card-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  top: 0;
  left: 0;
  pointer-events: none;
}

.card-content {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 1;
  color: white;
  font-weight: bold;
  text-align: left;
}

.card-content h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

.card-content p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Reuse circle button for corner circles */
.corner-circle {
  position: absolute;
  z-index: 2;
}

.corner-circle .icon {
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.card-wrapper:hover .corner-circle .icon {
  color: currentColor;
}

/* Specific corner positions */
.corner-circle.blue-bg {
  bottom: 0;
  left: 0;
}

.corner-circle.orange-bg {
  top: 0;
  right: 0;
}

.corner-circle.yellow-bg {
  bottom: 0;
  right: 0;
}

.corner-circle.green-bg {
  top: 0;
  right: 0;
}








/* ---------------------------------------
   8) CHARACTERS (IMAGES)
--------------------------------------- */
.character {
  position: absolute;
  width: 100px;
  z-index: 3;
  pointer-events: none;
}

.character-1 {
  bottom: -50px;
  right: 10px;
}

.character-2 {
  bottom: -60px;
  right: 0;
  transform: rotate(10deg);
}

.character-3 {
  width: 80px;
  top: -60px;
  right: -40px;
  transform: rotate(-15deg);
}

.character-4 {
  bottom: -60px;
  right: 0;
  transform: rotate(10deg);
}

.card-wrapper:hover .character {
  animation: wiggle 0.4s ease-in-out;
}





/* ---------------------------------------
   9) ANIMATIONS
--------------------------------------- */
@keyframes wiggle {
  0% {
    transform: rotate(0turn);
  }

  25% {
    transform: rotate(-0.05turn);
  }

  75% {
    transform: rotate(0.05turn);
  }

  100% {
    transform: rotate(0turn);
  }
}

.footer-section .back-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.footer-section .back-btn.active {
  opacity: 1;
  pointer-events: auto;
}



.character-grid {
  position: relative;
  width: 100%;
  height: calc(100vh - 160px);
  overflow: hidden;
}

.character-svg {
  position: absolute;
  width: 120px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 1;
}

.character-svg:hover {
  transform: scale(1.05);
  z-index: 3;
}

.tooltip {
  position: fixed;
  background: #2a9df4;
  color: white;
  padding: 12px;
  border-radius: 12px;
  max-width: 180px;
  font-size: 0.85rem;
  z-index: 9999;
  /* ✨ ensures it's on top of everything */
  display: none;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip .tag {
  display: inline-block;
  background-color: #eabec5;
  border-radius: 10px;
  padding: 2px 8px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: white;
}




.character-svg {
  width: 150px;
  height: auto;
  cursor: pointer;
  z-index: 1;
}


/* 1) Make arrows visible by default as a flexed button */
.carousel-nav {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* 2) Hide them again in stage-3 & stage-4 */
body.stage-3 .carousel-nav,
body.stage-4 .carousel-nav {
  display: none !important;
}


/* add to your styles.css or <style> */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #2a9df4;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
  margin-top: 50px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



/* ---------------------------------------
   10) RESPONSIVE
--------------------------------------- */
@media (max-width: 768px) {

  html,
  body {
    width: 100vw;
    height: 100vh;
    touch-action: manipulation;
    /* disables pinch-zoom but keeps scrolling */
    -ms-touch-action: manipulation;
    overflow-x: hidden;
  }


  /* ---------------------------------------
   1) FONT
--------------------------------------- */
  @font-face {
    font-family: 'PP Mori';
    src: url('./assets/fonts/PPMori-SemiBold.otf') format('opentype');
  }

  @font-face {
    font-family: 'Right Grotesk Medium';
    src: url('./assets/fonts/right-grotesk/RightGrotesk-Medium.otf') format('opentype');
  }

  @font-face {
    font-family: 'Right Grotesk Spatial Black';
    src: url('./assets/fonts/right-grotesk/RightGrotesk-SpatialBlack.otf') format('opentype');
  }


  /* ---------------------------------------
   2) RESET & BASE
--------------------------------------- */
  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;

    font-family: 'PP Mori', sans-serif;

    background: white;
    color: #2a9df4;
    box-sizing: border-box;

    /* background: linear-gradient(to bottom,
      #ffffff 0%,
      #ffffff 75%,
      rgba(244, 182, 61, 0.3) 100%); */
  }

  /* @-moz-document url-prefix() {
  body {
    transform: scale(1);
    transform-origin: top center;
    width: 100%;
    overflow-x: hidden;
  }
} */

  .homepage {
    display: flex;
    flex-direction: column;

    /* justify-content: flex-start; */

    align-items: center;

    min-height: 100vh;

    padding-top: 200px;
  }


  .wavy-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: url("./assets/wave-home.svg") no-repeat bottom center;
    background-size: 100% auto;
  }

  .char-page {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
  }

  *,
  *:before,
  *:after {
    box-sizing: inherit;
  }

  /* ---------------------------------------
   3) REUSABLE CIRCLE BUTTON
--------------------------------------- */
  .circle-button {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    background-color: ;
    transition: background-color 0.3s ease, border 0.3s ease, color 0.3s ease;
  }

  .circle-button.extrasmall {
    width: 30px;
    height: 30px;
    font-size: 1.0rem;
  }

  .circle-button.small {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .circle-button.medium {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }

  .circle-button:hover {
    background-color: transparent;
    border: 3px solid currentColor;
    color: currentColor;
  }

  /* COLOR HELPERS */
  .blue-bg {
    background-color: #58aaf7;
    color: white;
  }

  .orange-bg {
    background-color: #e85e24;
    color: white;
  }

  .yellow-bg {
    background-color: #f4b63d;
    color: white;
  }

  .green-bg {
    background-color: #22b573;
    color: white;
  }







  /* ---------------------------------------
   4) HEADER
--------------------------------------- */
  .header {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 120px 60px 120px;
    flex: 1 1 16.666%;

    /* 1/6 */
  }

  @media (min-width: 768px) {

    .char-page {

      /* HEADER AMENDMENTS  */
      .header-top {
        position: absolute;
        left: 30px;
        top: 50%;
        transform: translateY(-50%);
        padding: 15px 20px 15px 20px;
        background-color: #58aaf7;
        border-radius: 20px;
        /* transform: rotate(2deg) !important; */
      }

      .header-top .text-back {
        background-color: #fff;
        color: #4a90e2;
        font-size: 0.9rem;
      }

      .header-top .header-text {

        display: none;
      }

      .header-top .circle-button {
        background-color: #fff;
        color: #2a9df4;

      }

      .header-top #info-toggle {
        display: none;
        /* background-color: #f4b63d;
  color: #fff; */
      }



      /* HEADER AMENDMENTS  */

      /* TITLE AMENDMENTS  */


      .title-section {
        margin-top: 5px;
        background-color: #f4b63d;
        border-radius: 20px;

        padding: 5px 20px 15px 20px;
        width: 50%;
        transform: rotate(-1deg) !important;
      }

      .title-section h1 {
        font-size: 1.5rem;
        color: #e53935;
        padding: 10px;

      }

      .title-section p {
        font-size: 1rem;
        color: #fff;

      }

      /* .title-section .steps {} */


      .step {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #fff;
        margin: 0 8px;
      }

      .step.active {
        background: #fff;
      }

      /* TITLE AMENDMENTS  */


      /* button AMENDMENTS  */


      .next-btn {
        background-color: #2a9df4;

        border: none;
        color: white;
        font-weight: bold;
        font-size: 1.1rem;
        padding: 15px 30px;
        border-radius: 15px;
        cursor: pointer;
        transform: rotate(-8deg) !important;
      }

      .back-btn {
        background-color: #e85e24;
        border: none;
        color: white;
        font-weight: bold;
        font-size: 1.1rem;
        padding: 15px 30px;
        border-radius: 15px;
        cursor: pointer;
        transform: rotate(2deg) !important;
      }





      /* button AMENDMENTS  */

    }

  }

  .back-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .text-back {
    background: #2a9df4;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
  }

  .text-back:hover {
    opacity: 0.9;
  }


  /* ---------------------------------------
   5) HEADER TITLE SECTION
--------------------------------------- */

  .title-section {
    text-align: center;
    /* max-width: 600px; */
  }

  .title-section h1 {
    margin: 0;
    font-size: 1.3rem;

  }

  .title-section h2 {
    margin: 0;
    padding: 0;
  }

  .steps {
    display: flex;
    justify-content: center;
    margin: 10px 0;
  }

  /* .step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #2a9df4;
  margin: 0 8px;
}

.step.active {
  background: #2a9df4;
} */

  .subtitle {
    margin: 0;
    font-size: 1rem;
  }

  /* ---------------------------------------
   6.2) BUILDER SECTION (CHARACTER PAGE)
--------------------------------------- */
  .builder-section {
    position: relative;
    /* <== important! */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    width: 100%;
    flex: 1 1 66.666%;
    /* 4/6 */
    overflow: hidden;
    /* optional: avoid accidental overflow */
  }

  #rig {
    border: none;
    /* z-index: 99; */
  }

  /* .carousel-nav {
  display: none !important;
} */

  /* show nav buttons only in stage-1 & stage-2 */
  /* body.stage-1 .carousel-nav,
body.stage-2 .carousel-nav {
  display: inline-flex !important;
} */


  .rig-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 175px;
    /* adjust width as needed */
    height: 100%;
    /* tall vertical bar */
    background-color: #2a9df4;
    /* your blue */
    z-index: 0;
    /* behind SVG & carousels */
    border-radius: 40px;
    /* optional: rounded edges */
  }

  /* ensure builder-section is positioned relatively */
  .builder-section {
    position: relative;
    flex: 1 1 66.666%;
    overflow: hidden;
  }

  /* let your SVG fill its parent */
  .svg-container svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* optional: cursor pointer on paths */
  .svg-container svg path {
    cursor: pointer;
  }



  /* ---------------------------------------
   6.1) BUILDER SECTION (SVG ASSETS)
--------------------------------------- */
  /* === Assets Rows === */

  .list {
    height: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
  }

  .list li {
    list-style-type: none;


    opacity: 1;
    position: absolute;
    left: 50%;

    border-radius: 2px;
    /* background: #9C89B8; */
    transition: transform 1s, opacity 1s;

  }


  .head {
    transform: translateY(-200px)translateX(-400px);
  }

  .torso {
    transform: translateY(-120px)translateX(-400px);
  }


  .legs {
    transform: translateY(40px)translateX(-400px);
  }

  .shoes {
    transform: translateY(170px)translateX(-400px);
  }

  /* .head {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.torso {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
} */




  .head li {
    width: 130px;
    height: 130px;
    margin-left: -65px;
  }

  /* .torso li{
width: 250px;
  height: 250px;
  margin-left: -125px;
} */

  .torso li {
    width: 240px;
    height: 240px;
    margin-left: -120px;
  }

  .legs li {

    width: 250px;
    height: 250px;
    margin-left: -125px;
  }

  /* .legs li{
  width: 180px;
  height: 180px;
  margin-left: -90px;
} */


  .shoes li {
    width: 180px;
    height: 180px;
    margin-left: -90px;
  }

  .head {
    /* position: absolute; */
    z-index: 4;
  }

  .torso {
    /* position: absolute; */
    z-index: 3;
  }

  .legs {
    /* position: absolute; */
    z-index: 2;
  }

  .shoes {
    /* position: absolute; */
    z-index: 1;
  }





  .list .act {
    opacity: 1;
  }

  .list .prev,
  .list .next {
    cursor: pointer;
  }

  .list .prev {
    transform: translateX(-220px) scale(.70);
  }

  .list .next {
    transform: translateX(220px) scale(.70);
  }

  .list .hide {
    transform: translateX(-420px) scale(.70);
  }

  .list .new-next {
    transform: translateX(420px) scale(.70);
  }

  .list .hide,
  .list .new-next {
    opacity: 0;
    transition: opacity .5s, transform .5s;
  }

  /* base state: fully visible */
  .list .svg-container {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* when the UL has is-animating, fade out & shrink */
  .list.is-animating .svg-container {
    opacity: 0;
    transform: scale(0.95);
  }



  .swipe {
    width: 270px;
    height: 200px;
    position: absolute;
    background-color: green;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
  }


  .builder-section {
    position: relative;
  }

  /* Stage-3: hide everything but the head, center & zoom it */
  body.stage-3 {
    overflow: hidden;
    /* prevent scrollbars when we blow it up */
  }


  /* body.stage-3 .torso, */
  body.stage-3 .legs,
  body.stage-3 .shoes,
  body.stage-3 .rig-background {
    /* display: none; */
    opacity: 0;
    /* transition: opacity   0.7s ease; */
  }


  /* Stage 2: rig background becomes white with blue border */
  /* body.stage-2 .rig-background {
  background: white;
  border: 3px solid #2a9df4;
  height: 100%;
  border-radius: 40px;
  opacity: 1;
} */



  body.stage-3 main.builder-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* fill screen */
  }



  /* if you still need to fade this zoom like your carousels: */
  body.stage-3 .head {
    /* transition: transform 0.3s ease, opacity 0.3s ease; */
  }




  /* hide every <li> except the .act one in the head carousel */
  body.stage-3 .head .list li:not(.act),
  body.stage-3 .torso .list li:not(.act) {
    display: none !important;
  }

  /* hide the swipe area if you like */
  body.stage-3 .head .swipe,
  body.stage-3 .torso .swipe {
    display: none !important;
  }

  body.stage-3 .head {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translateX(-50%) scale(3);
    transform-origin: center center;
    /* transition: transform 0.7s ease;  */
    z-index: 1000 !important;
  }

  body.stage-3 .torso {
    position: fixed !important;
    top: 80% !important;
    left: 50% !important;
    transform: translateX(-50%) scale(3);
    transform-origin: center center;
    /* transition: transform 0.7s ease;  */
    z-index: 0 !important;
  }

  body.stage-4 .head {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translateX(-50%) scale(1);
    transform-origin: center center;
    /* transition: transform 0.7s ease;  */
    z-index: 1000 !important;
  }

  body.stage-4 .torso {
    position: fixed !important;
    top: 80% !important;
    left: 50% !important;
    transform: translateX(-50%) scale(1);
    transform-origin: center center;
    /* transition: transform 0.7s ease;  */
    z-index: 0 !important;
  }


  /* ---------------------------------------
   STAGE-3: FLOAT NEXT/BACK OVER TORSO
--------------------------------------- */


  /* keep footer in its normal spot but on top of the torso in stage-3 */
  body.stage-3 .footer-section {
    position: relative;
    /* make z-index apply without re-positioning */
    z-index: 1003 !important;
    /* higher than head (1000), canvas (1001), toolbar (1002) */
  }


  body.stage-3 .footer-section .back-btn,
  body.stage-3 .footer-section .next-btn {
    /* ensure they keep their pill shape */
    display: inline-flex;
  }

  body.stage-3 .draw-toolbar {
    position: fixed !important;

    top: 50%;
    transform: translateY(-50%);

    display: flex;
    flex-direction: row;
    gap: 16px;
    z-index: 10;

    width: 50%;
    height: 20%;
    border-radius: 30px;

  }

  body.stage-3 .draw-toolbar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 16px;
    background-color: none;
    border-radius: 24px;
    z-index: 10;
  }

  /* === Radial Fan Layout === */
  .color-picker {
    position: relative;
    width: 120px;
    height: 120px;
    margin-right: 20px;
  }

  /* Position swatches radially */
  .color-picker .color-swatch {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* border: 0px solid #2a9df4; */
    border: none;
    /* box-shadow: 0 0 2px rgba(0,0,0,0.3); */
    cursor: pointer;
    transform: translate(-50%, -50%);
  }

  /* Optional: highlight selected */
  .color-picker .color-swatch.selected {
    border: 10px solid #f4b63d;
  }


  .button-row {
    position: relative;
    width: 200px;
    height: 200px;
  }

  .arc-button {
    position: absolute;
    background: #e85e24;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transform: translate(-50%, -50%);
  }

  #clearBtn {
    border-radius: 999px;
    width: auto;
    padding: 8px 16px;
    margin-left: 20px;
    font-size: 1.5rem;
  }

  /* ensure each card can position its corner circle */
  /* body.stage-3 .draw-toolbar .card-wrapper {
  position: relative;
}

body.stage-3 .draw-toolbar .card-wrapper {
  width: 150px;    
  height: 150px;   
  transform: none; 
} */

  /* body.stage-3 .draw-toolbar .card-wrapper .card-bg {
  width: 100%;
  height: 100%;
} */

  /* body.stage-3 .draw-toolbar .card-content {
  padding: 8px; 
   }
     /* tighten up text/swatches */

  /* optionally shrink the corner icon a bit */
  /* body.stage-3 .draw-toolbar .corner-circle {
  transform: scale(0.6);
} */

  /*  show carousel arrows in stage-1 & stage-2 */
  body:not(.stage-3):not(.stage-4) .carousel-nav {
    display: inline-flex !important;
  }






  /* override the orange corner (color-picker card) */
  body.stage-3 .draw-toolbar .corner-circle.orange-bg {
    top: -15px !important;
    right: -15px !important;
    bottom: auto !important;
    left: auto !important;
  }

  /* make sure your prev/next buttons are visible in stage-2 */
  body.stage-2 .carousel-nav {
    display: inline-flex !important;
    /* or `flex` if you’re using `display: flex` elsewhere */
  }


  /* ---------------------------------------
   6.3) STAGE 3 TOOLBAR
--------------------------------------- */


  #faceCanvas {
    position: fixed;
    z-index: 1001;
    background: tr ansparent;
    touch-action: none;
    cursor: crosshair;
    /* cursor: url('assets/icons/brush.cur') 16 16, auto; */
    transform: none !important;
  }




  /* only hide carousel arrows (and nothing else) once we’re in stage-3 */
  body.stage-3 .carousel-nav {
    display: none !important;
  }

  /* .color-picker {
  display: grid !important;
  grid-template-columns: repeat(2, auto);
  grid-auto-rows: auto;
  gap: 8px;
  justify-content: center;
} */
  /* .color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  cursor: pointer;
} */
  /* .color-swatch.selected {
  border: 2px solid #000;
} */

  /* body.stage-3 .draw-toolbar #undoBtn,
body.stage-3 .draw-toolbar #redoBtn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: #58aaf7;     
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

body.stage-3 .draw-toolbar #clearBtn {
  background: #fff;
  color: #58aaf7;
  border: 2px solid #58aaf7;
  border-radius: 999px;      
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

 */


  /*  ❌ turn off all nav buttons & extra slides */
  body.stage-4 .carousel-nav,
  body.stage-4 .list .prev,
  body.stage-4 .list .next,
  body.stage-4 .list .hide,
  body.stage-4 .list .new-next {
    display: none !important;
  }

  /*  ✅ keep only the active <li> visible */
  body.stage-4 .list .act {
    opacity: 1 !important;
    transform: none !important;
  }

  /* body.stage-4 #faceCanvas {
  display: block !important;
  transform: none !important;
} */


  body.stage-3 .carousel-nav,
  body.stage-4 .carousel-nav,
  body.stage-3 .list li:not(.act),
  body.stage-4 .list li:not(.act) {
    display: none !important;
  }

  /* 
.head,
.torso,
.legs,
.shoes,
#faceCanvas {
  transition:
    transform 0.7s ease,
    top       0.7s ease,
    left      0.7s ease,
    width     0.7s ease,
    height    0.7s ease,
    opacity   0.7s ease;  
} */


  /* body.stage-4 .legs,
body.stage-4 .shoes,
body.stage-4 .rig-background {
  opacity: 1;
   transition: opacity   0.9s ease;
} */



  /* after stage-3 zoom, stage-4 sends everything back to “normal” */
  body.stage-4 .head,
  body.stage-4 .torso {
    position: absolute !important;
    /* top: 100px   !important;
  left: 50%    !important; */
    transform: translateX(-50%) scale(1) !important;

  }

  /* if your torso/legs have different top offsets in the default stage, replace `top:100px` with those values */


  /* make sure the canvas has no leftover scale */
  body.stage-4 #faceCanvas {
    transform: none !important;
  }

  body.stage-4 .rig-background {
    /* background: linear-gradient(to top, #2a9df4, transparent); */
    opacity: 0;


    /* transition: background 0.7s ease, opacity 0.7s ease, width 0.7s ease; */
  }

  .rig-background {
    transition: background 0.7s ease, opacity 0.7s ease;
  }



  /* body.stage-4 main.builder-section {
  
  transform: translateX(-120px);
  transition: transform 0.7s ease;
} */


  /* ---------------------------------------
   6.3) INPUT PANEL
--------------------------------------- */



  /* base styling, hidden by default */
  .left-panel,
  .right-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%) translateX(100px);
    opacity: 0;
    pointer-events: none;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    background: #f4b63d;
    padding: 20px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: opacity 0.7s ease, transform 0.7s ease;
    z-index: 1005;
    /* above everything else */
  }

  .left-panel {
    left: 200px;
  }

  .right-panel {
    right: 200px;
  }


  /* only show & slide in on stage-4 */
  body.stage-4 .left-panel,
  body.stage-4 .right-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
  }

  /* form groups */
  .left-panel .form-group,
  .right-panel .form-group {
    margin-bottom: 16px;
  }

  .left-panel .form-group label,
  .right-panel .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
  }

  .left-panel .input-field,
  .right-panel .input-field {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #58aaf7;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
  }

  .left-panel .input-field:focus,
  .right-panel .input-field:focus {
    border-color: #e85e24;
  }

  /* traits section */
  .left-panel .traits-section p,
  .right-panel .traits-section p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #2a9df4;
  }

  .left-panel .tags,
  .right-panel .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .left-panel .tag,
  .right-panel .tag {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: white;
  }

  .left-panel .tag.pink {
    background: #e91e63;
  }

  .left-panel .tag.blue {
    background: #1e3a8a;
  }

  .left-panel .add-tag {
    margin-top: 4px;
  }


  .card-input {
    position: absolute;
    background: #f4b63d;
    padding: 14px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    color: white;
    transform: rotate(-5deg);
    z-index: 1000;
    max-width: 200px;
    text-align: left;
  }

  .card-input input,
  .card-input textarea {
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
  }

  .card-input .icon {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #e91e63;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 1) the wrapper card */
  .traits-card {
    /* reuse your .card-input rules (or copy them here) */
    background: none;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
    transform: rotate(6deg);
    position: absolute;
    top: 5vh;
    right: 24vw;
    max-width: 240px;
    text-align: center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: white;
  }

  /* 2) optionally style the heading */
  .traits-card h3 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e91e63;
  }

  /* 3) the inner list flexbox */
  .traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  /* 4) reset the individual cards so they flow */
  .traits-card .trait-card {
    transform: none;
    /* remove the rotate on each trait */
    margin: 0;
    /* cancel any absolute positioning */
    width: auto;
    /* let them size to their text */
    padding: 8px 12px;
    /* tighten them up */
    font-size: 0.8rem;
    line-height: 1.2;
    text-transform: none;
    border-radius: 10px;
  }

  .trait-card img {
    display: block;
    margin: 0 auto;
    /* remove these if you're setting width/height in JS */
    max-width: 100%;
    height: auto;
  }


  /* 5) stage-4 only shows the wrapper */
  .card-input.traits-card {
    display: none;
  }

  body.stage-4 .card-input.traits-card {
    display: flex;
  }


  /* .trait-card {
  font-size: 0.85rem;
  line-height: 1.1;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: bold;
  color: white;
  text-align: center;
  transform: rotate(-10deg);
  width: auto;
  max-width: 160px;
} */

  /* .trait-card.blue {
  background: #2a9df4;
}

.trait-card.pink {
  background: #e91e63;
}

.trait-card.green {
  background: #22b573;
}

.trait-card.yellow {
  background: #e85e24;
} */


  .info-card {
    background: #f7931e;
    color: #fff;
    border-radius: 20px;
    transform: rotate(3deg);
    position: fixed;
    top: 60px;
    right: 50px;
    padding: 16px;
    text-align: center;
    max-width: 300px;
    z-index: 1000;
  }

  .info-card #info-close {
    display: none;
  }


  .info-card h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .info-card p {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .info-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
  }

  .info-buttons .text-back {
    background-color: white;
    border: 2px solid #e53935;
    border-radius: 20px;
    color: #e85e24;
    text-decoration: none;
    display: inline-block;
    padding: 8px 16px;
    flex: 1;
  }





  .card-input {
    display: none;
    /* default hidden */
  }

  body.stage-4 .card-input {
    display: block;
  }


  body.stage-4 .name-card {
    top: 5vh;
    /* 5% of viewport height */
    left: 26vw;
    /* 20% of viewport width */
    transform: rotate(-6deg);
    background: #f7931e;
  }

  body.stage-4 .fav-card {
    top: 22vh;
    left: 24vw;
    transform: rotate(3deg);
    background: #9e005d;
  }

  /* body.stage-4 .trait-card.blue {
  top: 45vh;
  left: 25vw;
  transform: rotate(-8deg);

}

body.stage-4 .trait-card.pink {
  top: 50vh;
  left: 23vw;
  transform: rotate(3deg);
  
}

body.stage-4 .trait-card.green {
  top: 47vh;
  left: 32vw;
  transform: rotate(3deg);
 
}

body.stage-4 .trait-card.yellow {
  top: 52vh;
  left: 30vw;
  transform: rotate(3deg);
  
} */


  .card-input.email-card {
    max-width: 270px;
    width: 80%;
    padding: 20px 25px;
    font-size: 1rem;
    background-color: #22b573;
  }

  .card-input.email-card input,
  .card-input.email-card small {
    font-size: 0.9rem;
    /* adjust input and small text */
  }

  body.stage-4 .email-card {
    top: 35vh;
    right: 10vw;
    /* instead of 200px */
    transform: translateX(-50%) rotate(-3deg);
  }

  small {
    font-size: 0.7rem;
  }

  .checkbox-row {
    /* display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0%; */
    display: flex;
    align-items: center;
  }

  .checkbox-row input[type="checkbox"] {
    /* stop it from flexing */
    flex: 0 0 auto;
    /* make it big enough without transform */
    width: 1.2em;
    height: 1.2em;
    /* remove the scale-transform (optional) */
    transform: none;
    /* create consistent spacing */
    margin-right: 0.5rem;
    accent-color: #e85e24;
    cursor: pointer;
  }

  .checkbox-row label {
    /* let the label fill the rest */
    flex: 1 1 auto;
    font-size: 0.7rem;
    line-height: 1.2;
    color: white;
  }



  .red-bg {
    background-color: #e53935 !important;
    color: white;
  }

  .red-bg:hover {
    background-color: transparent;
    border: 3px solid #e53935;
    color: #f4b63d;
  }

  /* place in your styles.css */
  .custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
  }

  /* tilt the alert, increase overall font size */
  .custom-alert__content {
    background: #fff;
    color: #1e3a8a;
    border-radius: 20px;
    padding: 2rem;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
    font-size: 1.25rem;
  }


  /* message text */
  .custom-alert__content p {
    margin: 0;
    line-height: 1.4;
    white-space: normal;
    /* ensures text wraps */
    word-break: break-word;
    /* breaks long words if needed */
  }


  /* 
.custom-alert__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}


.custom-alert__buttons button {
  padding: 0.75rem 1rem;
  border: 2px solid;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background: #fff;
} */


  /* #custom-alert__gallery {
  border-color: #22b573;
  color: #22b573;
}

#custom-alert__another {
  border-color: #9e005d;
  color: #9e005d;
} */
  /* arrange buttons in a 2x2 grid */
  .custom-alert__buttons {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
  }

  /* make buttons square */
  .custom-alert__buttons button {
    width: 150px;
    height: 150px;
    padding: 0;
    border: 2px solid;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    /* background: #fff; */
    /* display: flex; */
    align-items: start;
    justify-content: left;
    text-align: left;
    padding: 20px;
    line-height: 1.2;
    border: none;
  }

  /* first button: green outline & text */
  #custom-alert__gallery {
    background-color: #22b573;
    color: #fff;
    transform: rotate(2deg);
  }

  /* second button: magenta outline & text */
  #custom-alert__another {
    background-color: #9e005d;
    color: #fff;
    transform: rotate(3deg);
  }

  /* third button: blue outline & text */
  #custom-alert__save {
    background-color: #2a9df4;
    color: #fff;
    transform: rotate(4deg);
  }

  /* fourth button: orange outline & text */
  #custom-alert__home {
    background-color: #f7941d;
    color: #fff;
    transform: rotate(-1deg);
  }



  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10005;
  }


  .modal-content {
    background: #fff;
    padding: 1.5em;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .modal-content h2 {
    margin-top: 0;
  }

  /* .modal-content button {
  padding: 0.75em 1.5em;
  border: none;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s;
} */

  /* .modal-content button:hover {
  background-color: #fff;
} */

  #tc-agree {
    padding: 10px 20px 10px 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 30px;
    transition: background-color 0.3s;
  }

  #tc-agree:hover {
    background-color: #22b573;
  }

  .tc-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    border: none;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
    transition: background-color 0.3s;
    transition: color 0.3s;
  }

  .tc-close:hover {
    background: darkred;
    color: #e53935;
    transition: background-color 0.3s;
    transition: color 0.3s;
  }

  .modal-content {
    position: relative;
    /* so the button positions relative to this box */
  }





  /* ---------------------------------------
   6.3) FOOTER
--------------------------------------- */

  .footer-section {
    flex: 1 1 16.666%;
    /* 1/6 */
    display: flex;
    align-items: center;
    transition: all .3s ease;
    /* background: linear-gradient(to bottom, transparent 50%, #f4b63d 50%); */
    background: url("./assets/wave.svg") no-repeat bottom center;
    background-position: center calc(100% + 40px);

    /* stretch it edge‑to‑edge */
    background-size: 100% auto;
    /* ← full width, keep aspect ratio */
    position: relative;
  }

  .footer-section .footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }

  .footer-section .footer-buttons button {
    border: 2px solid #fff;
  }




  /* stage 1: only next button, center it */
  .footer-section.stage-1 {
    justify-content: center;
  }

  .footer-section.stage-1 .back-btn {
    display: none;
  }

  /* stage 2: two buttons side-by-side, centered */
  .footer-section.stage-2 {
    justify-content: center;
    gap: 20px;
    /* space between buttons */
  }

  .footer-section.stage-2 .back-btn {
    display: inline-block;
    /* make sure it’s visible */
  }





  /* ---------------------------------------
   7) HOME PAGE CONTAINER & CARDS
--------------------------------------- */
  .container {
    text-align: center;
  }

  .hello {
    color: orange;
    font-size: 1.2rem;
  }

  .title {
    color: #4a90e2;
    font-size: 2.5rem;
    font-weight: bold;
  }

  .cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
  }

  .card-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .card-wrapper.mobile-only {
    display: none;
  }

  .card-wrapper:hover {
    transform: scale(1.05);
  }

  .card-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  .card-content {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 1;
    color: white;
    font-weight: bold;
    text-align: left;
  }

  .card-content h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
  }

  .card-content p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
  }

  /* Reuse circle button for corner circles */
  .corner-circle {
    position: absolute;
    z-index: 2;
  }

  .corner-circle .icon {
    font-size: 1.5rem;
    transition: color 0.3s ease;
  }

  .card-wrapper:hover .corner-circle .icon {
    color: currentColor;
  }

  /* Specific corner positions */
  .corner-circle.blue-bg {
    bottom: 0;
    left: 0;
  }

  .corner-circle.orange-bg {
    top: 0;
    right: 0;
  }

  .corner-circle.yellow-bg {
    bottom: 0;
    right: 0;
  }

  .corner-circle.green-bg {
    top: 0;
    right: 0;
  }








  /* ---------------------------------------
   8) CHARACTERS (IMAGES)
--------------------------------------- */
  .character {
    position: absolute;
    width: 100px;
    z-index: 3;
    pointer-events: none;
  }

  .character-1 {
    bottom: -50px;
    right: 10px;
  }

  .character-2 {
    bottom: -60px;
    right: 0;
    transform: rotate(10deg);
  }

  .character-3 {
    width: 80px;
    top: -60px;
    right: -40px;
    transform: rotate(-15deg);
  }

  .card-wrapper:hover .character {
    animation: wiggle 0.4s ease-in-out;
  }





  /* ---------------------------------------
   9) ANIMATIONS
--------------------------------------- */
  @keyframes wiggle {
    0% {
      transform: rotate(0turn);
    }

    25% {
      transform: rotate(-0.05turn);
    }

    75% {
      transform: rotate(0.05turn);
    }

    100% {
      transform: rotate(0turn);
    }
  }

  .footer-section .back-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .footer-section .back-btn.active {
    opacity: 1;
    pointer-events: auto;
  }



  .character-grid {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    overflow: hidden;
  }

  .character-svg {
    position: absolute;
    width: 120px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 1;
  }

  .character-svg:hover {
    transform: scale(1.05);
    z-index: 3;
  }

  .tooltip {
    position: fixed;
    background: #2a9df4;
    color: white;
    padding: 12px;
    border-radius: 12px;
    max-width: 180px;
    font-size: 0.85rem;
    z-index: 9999;
    /* ✨ ensures it's on top of everything */
    display: none;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .tooltip .tag {
    display: inline-block;
    background-color: #eabec5;
    border-radius: 10px;
    padding: 2px 8px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: white;
  }




  .character-svg {
    width: 150px;
    height: auto;
    cursor: pointer;
    z-index: 1;
  }


  /* 1) Make arrows visible by default as a flexed button */
  .carousel-nav {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* 2) Hide them again in stage-3 & stage-4 */
  body.stage-3 .carousel-nav,
  body.stage-4 .carousel-nav {
    display: none !important;
  }


  /* add to your styles.css or <style> */
  .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #2a9df4;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    margin-top: 50px;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }



  /* ---------------------------------------
   10) RESPONSIVE
--------------------------------------- */
  @media (max-width: 768px) {

    html,
    body {
      width: 100vw;
      height: 100vh;
      touch-action: manipulation;
      /* disables pinch-zoom but keeps scrolling */
      -ms-touch-action: manipulation;
      overflow-x: hidden;
    }



    .homepage {
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      /* min-height: 100vh;   */
      padding: 40px 20px;
      /* safe space top/bottom */
    }

    .char-page {
      overflow: hidden;
      overscroll-behavior: none;
    }

    .card-wrapper {
      position: relative;
      width: 170px;
      height: 170px;
      cursor: pointer;
      transition: transform 0.3s ease;

    }

    .card-wrapper:active {
      transform: scale(0.98);
    }

    .card-wrapper.mobile-only {
      display: block;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 20px;
      width: min(420px, 100%);
      justify-items: center;
    }

    .title {
      font-size: 2rem;
    }

    .hello {
      font-size: 1.2rem;
    }

    .wavy-footer {
      display: none;
    }

    .card-content h3 {
      font-size: 0.8rem;
      line-height: 1.1;
    }

    .character {
      width: 70px;
    }

    .character-1 {
      bottom: -20px;
      right: -70px;
    }

    .character-2 {
      bottom: -10px;
      right: 140px;
      transform: rotate(-10deg);
    }

    .character-3 {
      top: -30px;
      right: -40px;
      transform: rotate(15deg);
    }

    .circle-button.extrasmall {
      width: 20px;
      height: 20px;
      font-size: 0.8rem;
    }

    .circle-button.small {
      width: 40px;
      height: 40px;
      font-size: 1.2rem;
    }

    .circle-button.medium {
      width: 50px;
      height: 50px;
      font-size: 1.5rem;
    }

    .text-back {
      font-size: 0.9rem;
      padding: 10px 20px;
    }

    .header {
      flex-direction: column;
      align-items: flex-start;
      padding: 30px 20px;
    }

    .header-top {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: static;
      transform: none;
    }

    .back-buttons {
      width: 100%;
      /* optional: make it span full width */
      display: flex;
      justify-content: center;
      gap: 10px;
      /* keep your spacing */
    }

    /* steps now inline with back buttons on mobile */
    .title-section {
      width: 100%;
      text-align: center;
      margin-top: 20px;
    }

    .title-section h1 {
      font-size: 1.5em;
    }

    .subtitle {
      font-size: 0.8rem;
    }

    builder-section {
      max-width: 100vw;
      padding: 0px;
      margin: 0px;
      overflow: hidden;
    }

    /* make the svg rig scale to viewport */
    #rig {
      width: 90vw;
      height: auto;
      max-width: 100vw;
    }

    #blob-canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      /* ✅ behind carousels but above blue bar */
      pointer-events: none;
      /* so it doesn't block clicks */
    }





    .list {
      height: 150px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%)
    }

    .list li {
      list-style-type: none;

      /* width: 100px;
    height: 100px; */
      opacity: 1;
      position: absolute;
      left: 50%;
      /* margin-left: -50px; */
      border-radius: 2px;
      /* background: #9C89B8; */
      transition: transform 1s, opacity 1s;
    }

    .head li {
      width: 90px;
      height: 90px;
      margin-left: -45px;
    }

    .torso li {
      width: 170px;
      height: 170px;
      margin-left: -85px;
    }

    .legs li {
      width: 170px;
      height: 170px;
      margin-left: -85px;
    }

    .shoes li {
      width: 120px;
      height: 120px;
      margin-left: -60px;
    }

    .list .hide {
      transform: translateX(-420px) scale(.75);
    }

    .list .new-next {
      transform: translateX(420px) scale(.75);
    }

    .list li.act {
      transform: scale(1) !important;
    }

    .list .prev {
      transform: translateX(-100px) scale(.4) !important;
    }

    .list .next {
      transform: translateX(100px) scale(.4) !important;
    }


    .head {
      transform: translateY(-140px) translateX(-150px);
    }

    .torso {
      transform: translateY(-80px) translateX(-150px);
    }


    .legs {
      transform: translateY(40px) translateX(-150px);
    }

    .shoes {
      transform: translateY(150px) translateX(-150px);
    }




    /* 3.1 header-top flex layout & info button */
    .header-top {
      display: flex !important;
      justify-content: space-between;
      align-items: center;
      left: 0 !important;
      top: 0 !important;
      transform: none !important;
      padding: 12px 16px;
    }

    .header-top .back-buttons {
      order: 1;
    }

    .header-top h1 {
      order: 2;
      flex: 1;
      text-align: center;
      margin: 0;
      font-size: 1.2rem;
    }

    #info-toggle {
      order: 3;
    }

    /* 3.2 info‑drawer off‑canvas */
    .info-card {
      position: fixed;
      top: 0;
      right: 0;
      width: 100vw;
      height: 100vh;
      transform: translateX(100%);
      transition: transform 0.3s ease-in-out;
      z-index: 2000;
      padding-top: 70px;
    }

    body.info-open .info-card {
      transform: translateX(0);
    }


    .info-card #info-close {
      display: block;
      position: absolute;
      top: 16px;
      left: 16px;
    }

    /* 3.3 hide info‑card on load (for smaller screens) */
    @media (max-width: 768px) {
      .info-card {
        display: block;
      }

      /* ensure it’s present for slide-in */
    }

    /* 3.4 preserve existing stage‑visibility */
    body.stage-2 .info-card,
    body.stage-3 .info-card,
    body.stage-4 .info-card {
      /* your existing rules still apply */
    }

    /* 3.5 carousel & rig scaling */
    #rig {
      width: 90vw;
      height: auto;
    }



    /* 3.6 toolbar above head */
    /* body.stage-3 .draw-toolbar {
    top: auto !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translate(-50%, -120%) !important;

  } */

    body.stage-3 .head {
      /* instead of scale(3), use scale(2) or whatever fits */
      transform: translateX(-50%) translateY(-0%) scale(3) !important;
      top: 65% !important;
      /* nudge up/down */
    }

    body.stage-3 .torso {
      /* instead of scale(3), use scale(2) or whatever fits */
      transform: translateX(-50%) scale(3) !important;
      top: 85% !important;
      /* nudge up/down */
    }

    /* reposition & resize the draw toolbar */
    body.stage-3 .draw-toolbar {
      width: 80vw !important;
      /* wider or narrower */
      height: auto !important;
      bottom: 100px !important;
      /* move toolbar up from bottom */
      top: 10% !important;
      left: 50% !important;
      transform: translateX(-95%) translateY(45%) !important;
      /* transform: translateX(-80%) translateY(50%) !important;
    transform-origin: center center !important; */
      /* transform: rotate(10deg) !important; */


    }

    body.stage-3 .button-row {
      position: relative;
      /* ensure children stay in this box */
      /* transform: rotate(90deg); */
      /* spin the arc 90° */
      transform-origin: center center;
      transform: translateX(-58%) translateY(-50%) !important;
      /* transform: translateX(-95%) translateY(45%) !important; */
      /* pivot around its own center */
      width: 100vw;
      /* you may need to swap dimensions */
      height: auto;
      margin: 0 auto;
      /* center it horizontally */
    }

    /* if you need to tweak individual buttons */
    body.stage-3 #undoBtn,
    body.stage-3 #redoBtn {
      margin: 0 10px !important;
      /* horizontal spacing */
      font-size: 1.2rem !important;
      /* bigger/smaller icons */
      display: none;
    }

    body.stage-3 #clearBtn {
      margin: 0 10px !important;
      padding: 10px 20px !important;
      font-size: 1rem !important;
    }




    /* STAGE 1 CSS MOBILE */

    .char-page .rig-background {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 120px;
      /* adjust width as needed */
      height: 80%;
      /* tall vertical bar */
      background-color: #2a9df4;
      /* your blue */
      z-index: 0;
      /* behind SVG & carousels */
      border-radius: 30px;
      /* optional: rounded edges */
    }

    .char-page .header-top {
      /* position: absolute; */
      /* transform: rotate(-2deg) !important; */

    }


    .char-page .header-top .text-back {
      /* display: none; */
      font-size: 0.9rem;
    }

    .char-page .header-top .header-text {
      color: #fff;
    }

    .char-page .header-top .circle-button {
      color: #fff;
      background-color: #2a9df4;
    }

    .char-page .header-top #info-toggle {
      background-color: #f4b63d;
      color: #fff;
      display: none;
    }

    .char-page .header-top {
      background-color: none;
      border-radius: 20px;
      padding: 0%;
      padding-bottom: 5px;
      margin: 0%;
    }



    .char-page .title-section {
      margin-top: 5px;
      background-color: #f7931e;
      border-radius: 20px;
      padding: 5px 10px 15px 10px;
      transform: rotate(3deg) !important;
    }

    .char-page .title-section h1 {
      font-size: 0.9rem;
      color: #c13a00;
    }


    .char-page .title-section .subtitle {
      font-size: 0.7rem;
      padding-top: 3px;
      color: #fff;
    }



    /* .title-section .steps {} */


    .char-page .step {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 2px solid #fff;
      margin: 0 8px;
    }

    .char-page .step.active {
      background: #fff;
    }

    .char-page .footer-section {
      background: linear-gradient(to bottom, transparent 50%, #f4b63d 50%);
    }

    .char-page .next-btn {
      background-color: #2a9df4;
      border: 2px solid #fff;
      color: white;
      font-weight: bold;
      font-size: 1rem;
      padding: 15px 30px;
      border-radius: 15px;
      cursor: pointer;
      transform: rotate(-8deg) !important;
    }

    .char-page .back-btn {
      background-color: #e85e24;
      border: 2px solid #fff;
      color: white;
      font-weight: bold;
      font-size: 1.1rem;
      padding: 15px 30px;
      border-radius: 15px;
      cursor: pointer;
      transform: rotate(2deg) !important;
    }

    .char-page #info-toggle {
      aspect-ratio: 1 / 1 !important;
      width: 40px !important;
      border-radius: 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 0 !important;
      font-size: 1.2rem !important;
      line-height: 1 !important;
    }

  }

  @media (min-width: 769px) {
    .char-page .footer-section .footer-buttons {
      position: absolute;
      bottom: 90px;
      left: 50%;
      transform: translateX(-50%);
      width: auto;
      z-index: 1004;
    }

    .char-page .footer-section .footer-buttons button {
      border: 2px solid #fff;
    }
  }

  /* spinner circle */
  .spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top-color: #22b573;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  /* re-use your modal‐overlay to center it */
  #loading-overlay .spinner {
    margin: auto;
  }

  /* spin keyframes */
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }


  /* === 3480 × 2160 Ultra-Wide (16:9 or 16:10) === */
  /* @media screen and (width: 3480px) and (height: 2160px) {
  .char-page {
    transform: scale(0.65);
    transform-origin: top center;
  }

  .builder-section {
    max-width: 3000px;
    margin: 0 auto;
  }

  .draw-toolbar {
    transform: scale(0.8);
    bottom: 60px;
  }

  .title-section h1 {
    font-size: 2.5rem;
  }
} */

  /* === 2160 × 1620 High-Res 4:3 Display === */
  /* @media screen and (width: 2160px) and (height: 1620px) {
  .char-page {
    transform: scale(0.75);
    transform-origin: top center;
  }

  .builder-section {
    max-width: 1800px;
    margin: 0 auto;
  }

  .draw-toolbar {
    transform: scale(0.85);
    bottom: 50px;
  }

  .title-section h1 {
    font-size: 2rem;
  }
} */

  /* @media (min-width: 2160px) {
  html {
   
    transform: scale(1);
    transform-origin: top left;
    
    width: 1920px;
  }
} */

  @media (max-width: 768px) {

    /* root viewport sizing */
    :root {
      --header-h: 0px;
      --footer-h: 0px;
    }

    /* make the whole app fit the *visible* viewport height */
    html,
    body,
    .char-page {
      height: 100svh;
      /* <— instead of 100vh */
      overflow: hidden;
      /* no page scroll between stages */
    }

    /* keep NEXT/BACK always on screen */
    .footer-section {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      /* give it breathing room on iOS home indicator */
      padding-bottom: max(12px, env(safe-area-inset-bottom));
      background-size: 100% auto;
      background-position: center 110%;
      z-index: 2000;
    }


    /* fills exactly the space between header and fixed footer */
    .builder-section {
      height: calc(100svh - var(--header-h) - var(--footer-h));
      overflow: hidden;
    }

  }

  @media (max-width: 768px) {
    .header {
      padding: 16px 16px;
      /* a bit tighter to avoid pushing content */
    }

    /* the big head/torso zoom can push below the footer; keep inside builder */
    body.stage-3 .head,
    body.stage-3 .torso {
      will-change: transform;
      max-width: 100%;
    }
  }

  /* --- index.html mobile fixes --- */
  @media (max-width: 768px) {

    /* allow vertical scroll and keep extra space for the footer art */
    .homepage {
      min-height: 100svh;
      /* visible viewport height */
      overflow-y: auto;
      /* enable scrolling */
      overflow-x: hidden;
      padding-bottom: 220px;
      /* make room for .wavy-footer (>= its height) */
    }

    /* the wave is just decoration: don't block clicks, keep it behind content */
    .wavy-footer {
      pointer-events: none;
      /* taps go through */
      z-index: 0;
    }

    /* ensure cards sit above the wave */
    .container,
    .cards,
    .card-wrapper {
      position: relative;
      z-index: 1;
    }
  }


  @media (max-width: 768px) {

    /* stage-3: toolbar is placed by JS relative to the head */
    body.stage-3 .draw-toolbar {
      position: fixed !important;
      left: 0 !important;
      top: 0 !important;
      transform: none !important;
      background: transparent;
      z-index: 1002;
      pointer-events: auto;
    }

    /* optional: keep a tight natural width so centering looks right */
    body.stage-3 .draw-toolbar .color-picker,
    body.stage-3 .draw-toolbar .button-row {
      display: inline-block;
    }

  }


  /* FINAL authority: mobile stage-3 toolbar placement is controlled by JS */
  @media (max-width: 768px) {
    body.stage-3 .draw-toolbar {
      position: fixed !important;
      left: auto !important;
      top: auto !important;
      right: auto !important;
      bottom: auto !important;
      transform: translateX(-100%) !important;
      width: auto !important;
      height: auto !important;
      padding: 8px 12px !important;
      background: transparent !important;
      z-index: 1002 !important;
      pointer-events: auto !important;
    }
  }

  /* MOBILE: show only UNDO; hide CLEAR & REDO; stop arc/transform fights */
  @media (max-width: 768px) {

    /* hide these entirely on mobile */
    #clearBtn,
    #redoBtn {
      display: none !important;
    }

    /* keep Undo visible and let JS place it precisely */
    #undoBtn {
      display: inline-flex !important;
      position: fixed !important;
      /* we’ll set left/top via JS */
      transform: translateX(0%) !important;
      z-index: 1003;
      /* above the canvas */
      width: 50px;
      height: 50px;
      font-size: 1.2rem;
    }

    /* don’t let the old arc layout yank buttons around on mobile */
    .button-row {
      width: auto !important;
      height: auto !important;
      transform: none !important;
    }
  }

  /* MOBILE: Only Undo visible, force it on top & visible */
  @media (max-width: 768px) {

    #clearBtn,
    #redoBtn {
      display: none !important;
    }


    #undoBtn {
      display: inline-flex !important;
      position: fixed !important;
      /* absolute to the viewport */
      inset: auto auto auto auto !important;
      transform: translateX(150%) translateY(-50%) !important;

      z-index: 10050 !important;
      /* above canvas & toolbars */
      width: 52px;
      height: 52px;
      font-size: 1.2rem;
      align-items: center;
      justify-content: center;
    }
  }

  /* === Stage-4 MOBILE layout overrides === */
  @media (max-width: 768px) {

    /* Make the content scrollable in stage-4 only */
    body.stage-4 .builder-section {
      display: block !important;
      height: 100svh;
      /* use the visible viewport */
      overflow-y: auto !important;
      /* allow scrolling */
      -webkit-overflow-scrolling: touch;
      padding: 16px 16px 120px;
      /* bottom pad so last input isn’t hidden */
    }

    /* Hide the footer (submit area) by default in stage-4 mobile */
    body.stage-4 .footer-section {
      display: none !important;
      transition: opacity .35s ease, transform .35s ease;
    }

    /* Reveal footer only when JS says we’re at the bottom */
    body.stage-4.show-submit .footer-section {
      display: flex !important;
      transition: opacity .35s ease, transform .35s ease;
    }

    /* Avatar (final SVG) should be centered and responsive */
    body.stage-4 #rig {
      display: block !important;
      width: 100% !important;
      max-width: 520px;
      /* tweak as you like */
      height: auto !important;
      margin: 10px auto 16px auto !important;
      padding-top: 20px;
      padding-bottom: 20px;
    }

    /* Ensure any positional hacks from earlier stages don’t interfere */
    body.stage-4 .head,
    body.stage-4 .torso {
      position: static !important;
      transform: none !important;
      top: auto !important;
      left: auto !important;
      z-index: auto !important;
    }

    /* Traits row: become a normal block under the avatar */
    body.stage-4 .card-input.traits-card {
      position: static !important;
      display: flex !important;
      transform: none !important;
      margin: 8px auto 16px auto !important;
      max-width: 90vw !important;
      background: transparent !important;
      box-shadow: none !important;
    }

    body.stage-4 .traits-card h3 {
      text-align: center;
      margin-bottom: 6px;
    }

    body.stage-4 .traits-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
    }

    /* Form cards: stack in flow, full width */
    body.stage-4 .card-input {
      position: static !important;
      transform: none !important;
      display: block !important;
      max-width: 70vw !important;
      width: 100% !important;
      margin: 12px auto !important;
    }

    body.stage-4 .name-card {
      background: #f7931e !important;
      transform: rotate(-5deg) !important;
    }

    body.stage-4 .fav-card {
      background: #9e005d !important;
      transform: rotate(3deg) !important;
    }

    body.stage-4 .email-card {
      background: #22b573 !important;
    }

    /* Keep carousel/nav clutter hidden in stage-4 */
    body.stage-4 .carousel-nav,
    body.stage-4 .list li:not(.act),
    body.stage-4 .rig-background {
      display: none !important;
    }

    /* MOBILE + DESKTOP: hide scooter button entirely */
    body.stage-4 .icon {
      display: none !important;
    }

    /* make rig parts bigger without changing their anchors */
    body.stage-4 .head li svg,
    body.stage-4 .torso li svg,
    body.stage-4 .legs li svg,
    body.stage-4 .shoes li svg {
      transform: scale(1.2);
      /* 1.2 = 20% larger, tweak to taste */
      transform-origin: center center;
    }

    body.stage-4 .final-img {
      transform: scale(1.2);
      transform-origin: center center;
    }

    .head li img,
    .torso li img,
    .legs li img,
    .shoes li img {
      transform: scale(1.2);
      transform-origin: center center;
    }



  }


  .homepage {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* min-height: 100vh;   */
    padding: 40px 20px;
    /* safe space top/bottom */
  }

  .char-page {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .card-wrapper {
    position: relative;
    width: 170px;
    height: 170px;
    cursor: pointer;
    transition: transform 0.3s ease;

  }

  .card-wrapper:active {
    transform: scale(0.98);
  }

  .card-wrapper.mobile-only {
    display: block;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: min(420px, 100%);
    justify-items: center;
  }

  .title {
    font-size: 2rem;
  }

  .hello {
    font-size: 1.2rem;
  }

  .wavy-footer {
    display: none;
  }

  .card-content h3 {
    font-size: 0.8rem;
    line-height: 1.1;
  }

  .character {
    width: 70px;
  }

  .character-1 {
    bottom: -20px;
    right: -70px;
  }

  .character-2 {
    bottom: -10px;
    right: 140px;
    transform: rotate(-10deg);
  }

  .character-3 {
    top: -30px;
    right: -40px;
    transform: rotate(15deg);
  }

  .circle-button.extrasmall {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

  .circle-button.small {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .circle-button.medium {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .text-back {
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
  }

  .header-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: static;
    transform: none;
  }

  .back-buttons {
    width: 100%;
    /* optional: make it span full width */
    display: flex;
    justify-content: center;
    gap: 10px;
    /* keep your spacing */
  }

  /* steps now inline with back buttons on mobile */
  .title-section {
    width: 100%;
    text-align: center;
    margin-top: 20px;
  }

  .title-section h1 {
    font-size: 1.5em;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  builder-section {
    max-width: 100vw;
    padding: 0px;
    margin: 0px;
    overflow: hidden;
  }

  /* make the svg rig scale to viewport */
  #rig {
    width: 90vw;
    height: auto;
    max-width: 100vw;
  }

  #blob-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* ✅ behind carousels but above blue bar */
    pointer-events: none;
    /* so it doesn't block clicks */
  }





  .list {
    height: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
  }

  .list li {
    list-style-type: none;

    /* width: 100px;
    height: 100px; */
    opacity: 1;
    position: absolute;
    left: 50%;
    /* margin-left: -50px; */
    border-radius: 2px;
    /* background: #9C89B8; */
    transition: transform 1s, opacity 1s;
  }

  .head li {
    width: 90px;
    height: 90px;
    margin-left: -45px;
  }

  .torso li {
    width: 170px;
    height: 170px;
    margin-left: -85px;
  }

  .legs li {
    width: 170px;
    height: 170px;
    margin-left: -85px;
  }

  .shoes li {
    width: 120px;
    height: 120px;
    margin-left: -60px;
  }

  .list .hide {
    transform: translateX(-420px) scale(.75);
  }

  .list .new-next {
    transform: translateX(420px) scale(.75);
  }

  .list li.act {
    transform: scale(1) !important;
  }

  .list .prev {
    transform: translateX(-100px) scale(.4) !important;
  }

  .list .next {
    transform: translateX(100px) scale(.4) !important;
  }


  .head {
    transform: translateY(-140px) translateX(-150px);
  }

  .torso {
    transform: translateY(-80px) translateX(-150px);
  }


  .legs {
    transform: translateY(40px) translateX(-150px);
  }

  .shoes {
    transform: translateY(150px) translateX(-150px);
  }




  /* 3.1 header-top flex layout & info button */
  .header-top {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    padding: 12px 16px;
  }

  .header-top .back-buttons {
    order: 1;
  }

  .header-top h1 {
    order: 2;
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1.2rem;
  }

  #info-toggle {
    order: 3;
  }

  /* 3.2 info‑drawer off‑canvas */
  .info-card {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2000;
    padding-top: 70px;
  }

  body.info-open .info-card {
    transform: translateX(0);
  }


  .info-card #info-close {
    display: block;
    position: absolute;
    top: 16px;
    left: 16px;
  }

  /* 3.3 hide info‑card on load (for smaller screens) */
  @media (max-width: 768px) {
    .info-card {
      display: block;
    }

    /* ensure it’s present for slide-in */
  }

  /* 3.4 preserve existing stage‑visibility */
  body.stage-2 .info-card,
  body.stage-3 .info-card,
  body.stage-4 .info-card {
    /* your existing rules still apply */
  }

  /* 3.5 carousel & rig scaling */
  #rig {
    width: 90vw;
    height: auto;
  }



  /* 3.6 toolbar above head */
  /* body.stage-3 .draw-toolbar {
    top: auto !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translate(-50%, -120%) !important;

  } */

  body.stage-3 .head {
    /* instead of scale(3), use scale(2) or whatever fits */
    transform: translateX(-50%) translateY(-0%) scale(3) !important;
    top: 65% !important;
    /* nudge up/down */
  }

  body.stage-3 .torso {
    /* instead of scale(3), use scale(2) or whatever fits */
    transform: translateX(-50%) scale(3) !important;
    top: 85% !important;
    /* nudge up/down */
  }

  /* reposition & resize the draw toolbar */
  body.stage-3 .draw-toolbar {
    width: 80vw !important;
    /* wider or narrower */
    height: auto !important;
    bottom: 100px !important;
    /* move toolbar up from bottom */
    top: 10% !important;
    left: 50% !important;
    transform: translateX(-95%) translateY(45%) !important;
    /* transform: translateX(-80%) translateY(50%) !important;
    transform-origin: center center !important; */
    /* transform: rotate(10deg) !important; */


  }

  body.stage-3 .button-row {
    position: relative;
    /* ensure children stay in this box */
    /* transform: rotate(90deg); */
    /* spin the arc 90° */
    transform-origin: center center;
    transform: translateX(-58%) translateY(-50%) !important;
    /* transform: translateX(-95%) translateY(45%) !important; */
    /* pivot around its own center */
    width: 100vw;
    /* you may need to swap dimensions */
    height: auto;
    margin: 0 auto;
    /* center it horizontally */
  }

  /* if you need to tweak individual buttons */
  body.stage-3 #undoBtn,
  body.stage-3 #redoBtn {
    margin: 0 10px !important;
    /* horizontal spacing */
    font-size: 1.2rem !important;
    /* bigger/smaller icons */
    display: none;
  }

  body.stage-3 #clearBtn {
    margin: 0 10px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
  }




  /* STAGE 1 CSS MOBILE */

  .char-page .rig-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    /* adjust width as needed */
    height: 80%;
    /* tall vertical bar */
    background-color: #2a9df4;
    /* your blue */
    z-index: 0;
    /* behind SVG & carousels */
    border-radius: 30px;
    /* optional: rounded edges */
  }

  .char-page .header-top {
    /* position: absolute; */
    /* transform: rotate(-2deg) !important; */

  }


  .char-page .header-top .text-back {
    /* display: none; */
    font-size: 0.9rem;
  }

  .char-page .header-top .header-text {
    color: #fff;
  }

  .char-page .header-top .circle-button {
    color: #fff;
    background-color: #2a9df4;
  }

  .char-page .header-top #info-toggle {
    background-color: #f4b63d;
    color: #fff;
    display: none;
  }

  .char-page .header-top {
    background-color: none;
    border-radius: 20px;
    padding: 0%;
    padding-bottom: 5px;
    margin: 0%;
  }



  .char-page .title-section {
    margin-top: 5px;
    background-color: #f7931e;
    border-radius: 20px;
    padding: 5px 10px 15px 10px;
    transform: rotate(3deg) !important;
  }

  .char-page .title-section h1 {
    font-size: 0.9rem;
    color: #c13a00;
  }


  .char-page .title-section .subtitle {
    font-size: 0.7rem;
    padding-top: 3px;
    color: #fff;
  }



  /* .title-section .steps {} */


  .char-page .step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin: 0 8px;
  }

  .char-page .step.active {
    background: #fff;
  }

  .char-page .footer-section {
    background: linear-gradient(to bottom, transparent 50%, #f4b63d 50%);
  }

  .char-page .next-btn {
    background-color: #2a9df4;
    border: 2px solid #fff;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transform: rotate(-8deg) !important;
  }

  .char-page .back-btn {
    background-color: #e85e24;
    border: 2px solid #fff;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transform: rotate(2deg) !important;
  }

  .char-page #info-toggle {
    aspect-ratio: 1 / 1 !important;
    width: 40px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
  }

}

@media (min-width: 769px) {
  .char-page .footer-section .footer-buttons {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1004;
  }

  .char-page .footer-section .footer-buttons button {
    border: 2px solid #fff;
  }
}

/* spinner circle */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(0, 0, 0, 0.1);
  border-top-color: #22b573;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* re-use your modal‐overlay to center it */
#loading-overlay .spinner {
  margin: auto;
}

/* spin keyframes */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* === 3480 × 2160 Ultra-Wide (16:9 or 16:10) === */
/* @media screen and (width: 3480px) and (height: 2160px) {
  .char-page {
    transform: scale(0.65);
    transform-origin: top center;
  }

  .builder-section {
    max-width: 3000px;
    margin: 0 auto;
  }

  .draw-toolbar {
    transform: scale(0.8);
    bottom: 60px;
  }

  .title-section h1 {
    font-size: 2.5rem;
  }
} */

/* === 2160 × 1620 High-Res 4:3 Display === */
/* @media screen and (width: 2160px) and (height: 1620px) {
  .char-page {
    transform: scale(0.75);
    transform-origin: top center;
  }

  .builder-section {
    max-width: 1800px;
    margin: 0 auto;
  }

  .draw-toolbar {
    transform: scale(0.85);
    bottom: 50px;
  }

  .title-section h1 {
    font-size: 2rem;
  }
} */

/* @media (min-width: 2160px) {
  html {
   
    transform: scale(1);
    transform-origin: top left;
    
    width: 1920px;
  }
} */

@media (max-width: 768px) {

  /* root viewport sizing */
  :root {
    --header-h: 0px;
    --footer-h: 0px;
  }

  /* make the whole app fit the *visible* viewport height */
  html,
  body,
  .char-page {
    height: 100svh;
    /* <— instead of 100vh */
    overflow: hidden;
    /* no page scroll between stages */
  }

  /* keep NEXT/BACK always on screen */
  .footer-section {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* give it breathing room on iOS home indicator */
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background-size: 100% auto;
    background-position: center 110%;
    z-index: 2000;
  }


  /* fills exactly the space between header and fixed footer */
  .builder-section {
    height: calc(100svh - var(--header-h) - var(--footer-h));
    overflow: hidden;
  }

}

@media (max-width: 768px) {
  .header {
    padding: 16px 16px;
    /* a bit tighter to avoid pushing content */
  }

  /* the big head/torso zoom can push below the footer; keep inside builder */
  body.stage-3 .head,
  body.stage-3 .torso {
    will-change: transform;
    max-width: 100%;
  }
}

/* --- index.html mobile fixes --- */
@media (max-width: 768px) {

  /* allow vertical scroll and keep extra space for the footer art */
  .homepage {
    min-height: 100svh;
    /* visible viewport height */
    overflow-y: auto;
    /* enable scrolling */
    overflow-x: hidden;
    padding-bottom: 220px;
    /* make room for .wavy-footer (>= its height) */
  }

  /* the wave is just decoration: don't block clicks, keep it behind content */
  .wavy-footer {
    pointer-events: none;
    /* taps go through */
    z-index: 0;
  }

  /* ensure cards sit above the wave */
  .container,
  .cards,
  .card-wrapper {
    position: relative;
    z-index: 1;
  }

  .character:not(.character-4) {
    display: none;
  }

  .card-content {
    top: 10px;
    left: 10px;
    padding: 4px;
  }

  .card-content h3,
  .card-content p {
    line-height: 1.2;
  }
}

.mobile-break {
  display: none;
}

@media (max-width: 768px) {
  .mobile-break {
    display: block;
  }
}


@media (max-width: 768px) {

  /* stage-3: toolbar is placed by JS relative to the head */
  body.stage-3 .draw-toolbar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    background: transparent;
    z-index: 1002;
    pointer-events: auto;
  }

  /* optional: keep a tight natural width so centering looks right */
  body.stage-3 .draw-toolbar .color-picker,
  body.stage-3 .draw-toolbar .button-row {
    display: inline-block;
  }

}


/* FINAL authority: mobile stage-3 toolbar placement is controlled by JS */
@media (max-width: 768px) {
  body.stage-3 .draw-toolbar {
    position: fixed !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-100%) !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 12px !important;
    background: transparent !important;
    z-index: 1002 !important;
    pointer-events: auto !important;
  }
}

/* MOBILE: show only UNDO; hide CLEAR & REDO; stop arc/transform fights */
@media (max-width: 768px) {

  /* hide these entirely on mobile */
  #clearBtn,
  #redoBtn {
    display: none !important;
  }

  /* keep Undo visible and let JS place it precisely */
  #undoBtn {
    display: inline-flex !important;
    position: fixed !important;
    /* we’ll set left/top via JS */
    transform: translateX(0%) !important;
    z-index: 1003;
    /* above the canvas */
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  /* don’t let the old arc layout yank buttons around on mobile */
  .button-row {
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }
}

/* MOBILE: Only Undo visible, force it on top & visible */
@media (max-width: 768px) {

  #clearBtn,
  #redoBtn {
    display: none !important;
  }


  #undoBtn {
    display: inline-flex !important;
    position: fixed !important;
    /* absolute to the viewport */
    inset: auto auto auto auto !important;
    transform: translateX(150%) translateY(-50%) !important;

    z-index: 10050 !important;
    /* above canvas & toolbars */
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
  }
}

/* === Stage-4 MOBILE layout overrides === */
@media (max-width: 768px) {

  /* Make the content scrollable in stage-4 only */
  body.stage-4 .builder-section {
    display: block !important;
    height: 100svh;
    /* use the visible viewport */
    overflow-y: auto !important;
    /* allow scrolling */
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 120px;
    /* bottom pad so last input isn’t hidden */
  }

  /* Hide the footer (submit area) by default in stage-4 mobile */
  body.stage-4 .footer-section {
    display: none !important;
    transition: opacity .35s ease, transform .35s ease;
  }

  /* Reveal footer only when JS says we’re at the bottom */
  body.stage-4.show-submit .footer-section {
    display: flex !important;
    transition: opacity .35s ease, transform .35s ease;
  }

  /* Avatar (final SVG) should be centered and responsive */
  body.stage-4 #rig {
    display: block !important;
    width: 100% !important;
    max-width: 520px;
    /* tweak as you like */
    height: auto !important;
    margin: 10px auto 16px auto !important;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  /* Ensure any positional hacks from earlier stages don’t interfere */
  body.stage-4 .head,
  body.stage-4 .torso {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    z-index: auto !important;
  }

  /* Traits row: become a normal block under the avatar */
  body.stage-4 .card-input.traits-card {
    position: static !important;
    display: flex !important;
    transform: none !important;
    margin: 8px auto 16px auto !important;
    max-width: 90vw !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.stage-4 .traits-card h3 {
    text-align: center;
    margin-bottom: 6px;
  }

  body.stage-4 .traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  /* Form cards: stack in flow, full width */
  body.stage-4 .card-input {
    position: static !important;
    transform: none !important;
    display: block !important;
    max-width: 70vw !important;
    width: 100% !important;
    margin: 12px auto !important;
  }

  body.stage-4 .name-card {
    background: #f7931e !important;
    transform: rotate(-5deg) !important;
  }

  body.stage-4 .fav-card {
    background: #9e005d !important;
    transform: rotate(3deg) !important;
  }

  body.stage-4 .email-card {
    background: #22b573 !important;
  }

  /* Keep carousel/nav clutter hidden in stage-4 */
  body.stage-4 .carousel-nav,
  body.stage-4 .list li:not(.act),
  body.stage-4 .rig-background {
    display: none !important;
  }

  /* MOBILE + DESKTOP: hide scooter button entirely */
  body.stage-4 .icon {
    display: none !important;
  }

  /* make rig parts bigger without changing their anchors */
  body.stage-4 .head li svg,
  body.stage-4 .torso li svg,
  body.stage-4 .legs li svg,
  body.stage-4 .shoes li svg {
    transform: scale(1.2);
    /* 1.2 = 20% larger, tweak to taste */
    transform-origin: center center;
  }

  body.stage-4 .final-img {
    transform: scale(1.2);
    transform-origin: center center;
  }

  .head li img,
  .torso li img,
  .legs li img,
  .shoes li img {
    transform: scale(1.2);
    transform-origin: center center;
  }



}
