html {
  overflow-y: overlay;
}

main {
  font-size: 10pt;
  height: 75vh;
  scrollbar-width: none;
}

ul {
  width: 100%;
  margin-bottom: 1.5rem;
}

li {
  word-wrap: break-word;
}

h2 {
  margin-top: 0;
  text-transform: uppercase !important;
}

h5 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  text-transform: uppercase !important;
  font-weight: bold;
}

h6{
  margin-bottom: 0.1em;
  font-weight: bold;
}

body {
  font-family: "Comic Sans MS", Arial, cursive, sans-serif;
  background-color: whitesmoke;
  margin: auto;
}

.hide {
  display: none !important;
  pointer-events: none !important;
}
.hide * {
  display: none !important;
  pointer-events: none !important;
}

/* ::-webkit-scrollbar { 
  width: 0;
  height: 0;
  background: transparent;
} */

.frame {
  position: absolute;
  top: 0;
  pointer-events: none;
}

.border-box, .grid-item {
  border: #0d1b1e 2px solid;
  box-sizing: border-box;
  overflow: hidden;
  /* gap: 10px; */
  background-color: white;
  border-radius: 15px;
}

.selected{
  border-color: yellow !important;
  box-shadow: 0 0 20px yellow;
  animation: anim-pulse 1s ease-in-out infinite alternate;
}

.row {
  flex-direction: row;
  justify-content: center;
  width: 100%;
  display: flex;
  /* margin-bottom: 1em; */
  flex-wrap: wrap;
}

.center-align {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#pop-up-container{
  top: 0;
  position: fixed;
  height: 100%;
  width: 100%;
  z-index: 1000;
}

#pop-up-background{
  position: absolute;
  background: aliceblue;
  opacity: 0.5;
  height: 100%;
  width: 100%;
}

#pop-up-content-container{
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 520px;
  height: 90%;
  box-shadow: 0 0 5em black;
  border-radius: 38px;
  background: aliceblue;
}

#pop-up-close{
  position: absolute;
  margin: 0.5em;
  z-index: 200;
  width: 48px;
  height: 48px;
  top: 0;
  right: 0;
}

#pop-up-gradient{
  pointer-events: none;
  position: absolute;
  background: linear-gradient(transparent, white);
  height: 200px;
  width: 200%;
  bottom: 0;
  z-index: 0;
}

#pop-up-close > img {
  height: 100%;
}

#pop-up-photo{
  aspect-ratio: 1;
}

#pop-up-inner-content-container{
  position: relative;
  width: calc(100% - 64px);
  height: calc(100% - 64px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1.2fr 0.8fr;
  grid-row-gap: 5px;
}

.pop-up-1{
  grid-area: 1 / 1 / 2 / 3;
  display: block;
  object-fit: scale-down;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: center;
  background-repeat: no-repeat;
  background-size: contain;
  margin: auto;
}
.pop-up-2{
  grid-area: 2 / 1 / 3 / 3;
  padding: 1rem;
  align-items: start;
  overflow-y: scroll;
  padding-bottom: 6.5em;
  /* scrollbar-width: 4px; */
  
}

.pop-up-3{
  height: 78px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  z-index: 3;
}

.pop-up-frame{
  border-style: solid;
  border-width: 32px;
  border-image-source: url(../img/site-style/generate_frame.png);
  border-image-slice: 50;
  width: calc(100% - 64px);
  height: calc(100% - 64px);
  z-index: 100;
}

.fade-in{
  animation: anim-fade-in 0.5s ease-in-out;
}

#main-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* grid-auto-rows: minmax(100px, auto); */

  /* display: flex;
  flex-direction: row; */
  align-items: start;
  justify-content: center;
  
  padding-top: 1em;
  margin: auto;
  width: 90%;
  max-width: 1200px;
  gap: 5px;
}

.cool-font-shadow{
  color: white;
  text-shadow: -2px 0 #0d1b1e, 0 -2px #0d1b1e, 2px 0 #0d1b1e, 0 2px #0d1b1e, 2px 2px #0d1b1e, -2px -2px #0d1b1e, -2px 2px #0d1b1e, 2px -2px #0d1b1e, 4px 4px #FE79FA;
}

#marquee-text{
  position: absolute;
  z-index: 101;
  top: calc(50% - 72px);
  animation: anim-float 2s ease-in-out infinite alternate;
  color: white;
  font-size: 32px;
  font-weight: bold;
  /* text-shadow: 3px 3px 20px #ff99cc, -2px 1px 30px #ff99cc; */
  /* -webkit-text-stroke: 1px black; */
}

#marquee-image{
  transform: translateY(-50%);
  position: absolute;
  width: 50%;
  height: 50%;
  bottom: -5%;
  right: -5%;
  animation: anim-float 2s ease-in-out infinite alternate-reverse;
}
#marquee-image > img {
  height: 100%;
}

#main-canvas-container{
  max-width: 600px;
  position: relative;
  background-color: transparent;
}

.canvas-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/preview_frame_sized.png);
  border-image-slice: 3%;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

#main-canvas{
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: scale-down;
  background-color: rgba(255,255,255,0.75);
  /* display: none; */
  /* border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/preview_frame_sized.png);
  border-image-slice: 3%; */
}
#main-canvas-output{
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  width: 600px;
  object-fit: scale-down;
  display: none;
  aspect-ratio: 1;
  /* border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/preview_frame_sized.png);
  border-image-slice: 3%; */
}

#right-side-container{
  grid-template-rows: calc(100% - 78px) 78px;
  display: grid;
  height: 585px;
  gap: 5px;
}

#user-interface-container{
  height: 100%;
  max-width: 600px;
  display: grid;
  /* grid-template-columns: repeat(2, 1fr); */
  grid-template-columns: 15% calc(85% - 5px);
  gap: 0px 5px;
}

#misc-container{
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px
}

.misc-button{
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  height: calc(100% - 5px);
  padding: 0;
  border-radius: 20px;
}

#misc-button-random{
  position: relative;
  background-image: url('../img/site-style/button1_bg.png');
}

#misc-button-random > img {
  width: 100%;
}

.misc-button-random-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/button1_f.png);
  border-image-slice: 15;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

#misc-button-generate{
  position: relative;
  background-image: url('../img/site-style/button2_bg.png');
}

#misc-button-generate > img {
  top: 3px;
  width: 100%;
}

.misc-button-generate-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/button2_f.png);
  border-image-slice: 15;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

#misc-button-download{
  position: relative;
  background-image: url('../img/site-style/button4_bg.png');
}

#misc-button-download > img {
  width: 100%;
}

.misc-button-download-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/button4_f.png);
  border-image-slice: 15;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

#misc-button-credits{
  height: 100%;
  position: relative;
  background-image: url('../img/site-style/button5_bg.png');
}

#misc-button-credits > img {
  width: 100%;
}

.misc-button-credits-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url(../img/site-style/button5_f.png);
  border-image-slice: 15;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

#category-container{
  overflow-y: hidden;
  overflow-x: hidden;

  background-image: url('../img/site-style/background2.png');
  background-size: inherit;
  background-repeat: no-repeat;
  background-position: center center;

  width: 100%;
  position: relative;
  
}

#category-inner-container{
  width: 100%;
  height: calc(100% - 96px);
  overflow-y: scroll;
  overflow-x: scroll;
  scrollbar-width: none;
}
#category-inner-container::-webkit-scrollbar { 
  width: 0;
  height: 0;
  background: transparent;
}

#category-inner-inner-container{
  width: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  gap: 5%;
  padding: 5%;
  padding-top: 15%;
  padding-bottom: 15%;
  box-sizing: border-box;
  scrollbar-width: none;
}
#category-inner-inner-container::-webkit-scrollbar { 
  width: 0;
  height: 0;
  background: transparent;
}

.category-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url('../img/site-style/tab_frame_sized.png');
  border-image-slice: 15;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  z-index: 100;
}

.category-button{
  display: block;
  border-style: solid;
  /* border-width: 12px;
  border-image-source: url('../img/site-style/category_frame_sized.png');
  border-image-slice: 20%; */

  font-size: 0;
  aspect-ratio: 1;
  width: 80%;
  height: 80%;
  position: relative;
  padding: 0;
  box-sizing: border-box;
}

.category-number{
  /* animation: anim-float 2s ease-in-out infinite alternate; */
  transform: rotate(15deg);
  position: absolute;
  width: 30%;
  height: 30%;
  bottom: 5%;
  right: 5%;
  font-size: 1.3rem;
  color: red;
  z-index: 100;
  line-height: 1rem;
  opacity: 0.75;
}

#options-container{
  background-image: url('../img/site-style/background1.png');
  background-size: inherit;
  background-repeat: no-repeat;
  background-position: center center;
  position: relative;
  overflow-y: hidden;
}

#options-inner-container{
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scrollbar-width: none;
}
#options-inner-container::-webkit-scrollbar { 
  width: 0;
  height: 0;
  background: transparent;
}

.options-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url('../img/site-style/part_select_frame_sized.png');
  border-image-slice: 15;
  width: calc(100% - 22px);
  height:calc(100% - 22px);
  z-index: 500;
}

.option-container {
  /* display: grid;
  grid-template-columns: repeat(5, 1fr); */
  /* width: 600px; */
  width: 100%;
  padding: 5%;
  gap: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* grid-template-rows: repeat(4, 1fr); */
  align-items: start;
  /* grid-auto-rows: minmax(100px, auto); */
}

.option-button {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  aspect-ratio: 1;

  /* border-style: solid;
  border-width: 12px;
  border-image-source: url('../img/site-style/part_frame_sized.png');
  border-image-slice: 20%; */
}

.option-frame{
  border-style: solid;
  border-width: 12px;
  border-image-source: url('../img/site-style/part_frame_sized.png');
  border-image-slice: 20%;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
}

.option-icon {
  top: 0;
  right: 0;
  position: absolute;
  width: 100%;
  height: auto;
}

.mouth > .option-icon {
  left: -5%;
  top: 17%;
  transform: scale(8);
}

.mouth.real > .option-icon {
  left: 0%;
  top: 100%;
  transform: scale(8);
}

.eyes > .option-icon {
  top: 20%;
  transform: scale(2);
}

.eyes.real > .option-icon {
  top: 70%;
  transform: scale(4);
}

.eyebrows > .option-icon {
  top: 45%;
  transform: scale(3);
}

.eyebrows.real > .option-icon {
  top: 100%;
  transform: scale(5);
}

.hair-front > .option-icon {
  top: 15%;
  transform: scale(1.2);
}

.hair-back > .option-icon {
  top: 15%;
  transform: scale(1.2);
}

.hair-extra > .option-icon {
  top: 30%;
  transform: scale(1.2);
}

.hair-ahoge > .option-icon {
  transform: scale(3);
  top: 120%;
}

.hair-ahoge.real > .option-icon {
  transform: scale(5);
  top: 155%;
}

.clothes-inner > .option-icon,.clothes-inner-2 > .option-icon  {
  top: -30%;
  transform: scale(1.5)
}

.clothes-outer > .option-icon {
  top: -30%;
  transform: scale(1.5)
}

.accessories-hair > .option-icon, .accessories-hair-2 > .option-icon, .accessories-hair-3 > .option-icon {
  top: 50%;
  transform: scale(1.5);
}

.accessories-hair.real > .option-icon,.accessories-hair-2.real > .option-icon,.accessories-hair-3.real > .option-icon {
  top: 50%;
  transform: scale(2);
}

.class-18-hair_ornament-VOLDOX > .option-icon{
  top: 20%;
  transform: scale(1.5);
}

.accessories-face > .option-icon,.accessories-face-2 > .option-icon,.accessories-face-3 > .option-icon {
  top: 20%;
  transform: scale(2);
}

.accessories-face.real > .option-icon,.accessories-face-2.real > .option-icon,.accessories-face-3.real > .option-icon {
  top: 30%;
  transform: scale(2);
}

.accessories-body > .option-icon,.accessories-body-2 > .option-icon,.accessories-body-3 > .option-icon  {
  top: 20%;
  transform: scale(1);
}

.accessories-body.real > .option-icon,.accessories-body-2.real > .option-icon,.accessories-body-3.real > .option-icon {
  top: 0%;
  transform: scale(2);
}

.class-outer_chibicensorbar > .option-icon {
  top: -10% !important;
  transform: scale(1) !important;
}

.class-5-outer_layer_clothing-otto--2 > .option-icon {
  top: -10% !important;
}

.class-289-additional_hair-UTAH--3-behind-backhair > .option-icon {
  top: -10% !important;
  transform: scale(1) !important;
}

.class-301-background-cheese > .option-icon {
  top: 0% !important;
  transform: scale(1) !important;
}

.class-292-accessories-Kal_Illustration--3-behind-body > .option-icon {
  top: 0% !important; 
  transform: scale(0.75) !important;
}

.class-87-accessories-sumitsuki--2-for-TS > .option-icon {
  top: 0% !important; 
  transform: scale(0.75) !important;
}

.class-86-outer_layer_clothing-hokke > .option-icon {
  top: 0% !important; 
  transform: scale(1.55) !important;
}

.class-115-accessories-TNTR > .option-icon {
  top: -40% !important;
}

.class-ahoge-hokke > .option-icon {
  top: 90%;
}

.class-51-additional_hair-ICGJ--2 > .option-icon, .class-52-additional_hair-ICGJ--1 > .option-icon{
  top: 10%;
  transform: scale(1);
}

.none-icon{
  left: 0 !important;
  top: 0 !important;
  height: 100% !important;
  width: 100% !important;
  transform: scale(0.5) !important;
}

.footer {
  margin-top: calc(2* 1em);
}

.no-wrap {
  flex-wrap: nowrap;
}

.button-disabled{
  pointer-events: none;
  opacity: 0.3;
}

.button-arrow-up{
  background-image: url(../img/site-style/button_arrow.png);
  background-size: inherit;
  background-repeat: no-repeat;
  background-position: center center;
  aspect-ratio: 54 / 38;
  top: 0;
  position: absolute;
  width: 100%;
  transform: rotate(180deg);
}

.button-arrow-down{
  background-image: url(../img/site-style/button_arrow.png);
  background-size: inherit;
  background-repeat: no-repeat;
  background-position: center center;
  aspect-ratio: 54 / 38;
  bottom: 0;
  position: absolute;
  width: 100%;
}

.buttons, .dropdowns, .inputs {
  background: #ff935f;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  text-align: center;
  height: 38px;
  line-height: 38px;
  font-weight: bold;
  border-radius: 4px;
  border: 2px solid black;
  width: calc(520px/3);
}

.inputs {
  border-radius: 0px;
  height: 48px !important;
  line-height: 48px !important;
}

.scrolling-bg {
  overflow: hidden;
  overflow-y: hidden;
  opacity: 0.3;
  z-index: -100;
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("../img/site-style/tiled_5.png");
  background-color: #c3d2f1;
  animation: anim-scroll 16s linear infinite;
}

@keyframes anim-shake {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: -16px -16px;
  }
  10%, 90% {
    transform: translate3d(-3px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(3px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-6px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(6px, 0, 0);
  }
}
@keyframes anim-scroll {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: -320px -320px;
  }
}
@keyframes anim-float {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(3deg);
  }
}

@keyframes anim-pulse {
  from {
    box-shadow: 0 0 20px yellow;
  }
  to {
    box-shadow: 0 0 10px yellow;
  }
}

@keyframes anim-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 100%;
  }
}

@media only all and (max-width: 1000px) {
  #main-container {
    grid-template-columns: repeat(1, 1fr);
    max-width: 600px;
  }
  #user-interface-container{
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: 25% calc(75% - 5px);
    gap: 5px 5px;
  }

  #category-inner-container{

    height: 100%;
    width: calc(100% - 96px);
    overflow-x: scroll;
    overflow-y: hidden;
  }

  #category-inner-inner-container{
    overflow-x: scroll;
    overflow-y: hidden;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0;
    padding-top: 0;
    padding-bottom: 0;
    justify-content: flex-start;
    padding-left: 1em;
    padding-right: 1em;
  }

  .category-button{
    min-width: 6vh;
    margin: 0;
  }

  .button-arrow-up{
    top: auto;
    left: 0;
    position: absolute;
    width: auto;
    height: 100%;
    transform: rotate(90deg);
    aspect-ratio: 38 / 52;
  }
  
  .button-arrow-down{
    bottom: auto;
    right: 0;
    position: absolute;
    width: auto;
    height: 100%;
    transform: rotate(-90deg);
    aspect-ratio: 38 / 52;
  }

}