body {
  overflow: hidden !important;
  width: 100%;
  /* height: 100%; */
  margin: -1px 0px 0px 0px !important;
  padding: 0;
  font-family: 'Hiragino Sans', 'Noto Sans JP', メイリオ, Meiryo, 'ＭＳ Ｐゴシック', 'MS PGothic',
    sans-serif;
  position: relative;
  height: 100svh !important;
}
#loadImageContainer .poweredby-img {
  /* This changes the image from white to black */
  filter: invert(1) !important;
}
#requestingCameraPermissions {
  display: none;
}
#loadBackground {
  background-color: #f7b5cd;
}
#cameraPermissionsErrorApple,
#cameraPermissionsErrorAndroid,
#userPromptError,
#motionPermissionsErrorApple {
  /* background-color: rgba(255, 248, 172, 1);
  background: linear-gradient(
    0deg,
    rgba(255, 248, 172, 1),
    rgba(255, 208, 190, 1) 50%,
    rgba(255, 171, 203, 1)
  ); */
  background-color: #f7b5cd;
  color: black;
  overflow: scroll;
}
#cameraPermissionsErrorAppleMessage p,
#cameraPermissionsErrorAndroid .loading-error-header p,
#userPromptError p,
#motionPermissionsErrorApple p {
  padding: 0 24px;
  text-align: left;
  color: black;
}
#cameraPermissionsErrorAndroid,
#userPromptError,
#motionPermissionsErrorApple {
  padding-top: 64px;
}
#cameraPermissionsErrorAppleMessage,
#cameraPermissionsErrorAndroid .loading-error-header,
#cameraPermissionsErrorAndroid .loading-error-footer,
#userPromptError,
#motionPermissionsErrorApple {
  font-size: 1.2em;
  text-align: center;
  line-height: normal;
}
#cameraPermissionsErrorApple .bottom-message {
  display: none;
}
.permissionIconIos img {
  max-height: 10vh;
}
#cameraPermissionsErrorAndroid .loading-error-instructions {
  display: none;
}
.camera-permissions-reload-button {
  display: inline-block;
  padding: 8px;
  background-color: white;
  color: black;
  border: 4px solid black;
  border-radius: 40px;
  width: 75%;
  max-width: 300px;
  font-size: 18px !important;
}
.prompt-box-8w {
  background-color: white !important;
  color: #000 !important;
}
.prompt-button-8w {
  background-color: #999 !important;
}
.button-primary-8w {
  background-color: #ac4fff !important;
}
#userPromptError {
  background-color: #f7b9db !important;
  color: #000 !important;
}
#motionPermissionsErrorApple {
  background-color: #f7b9db !important;
  color: #000 !important;
}


/* 
  
*/
#content {
  width: 100%;
  height: 100%;
  padding-top: 44px;
  font-family: sans-serif;
}
#content,
#content * {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}
#content img {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}

/* 
  
*/
.modal,
#detection-ui,
#selection-smoke {
  display: none;
  width: 100%;
  height: calc(100% - 44px);
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
}
.modal {
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.6);
  /* padding: 60px 0 24px; */
  grid-auto-rows: auto;
  /* gap: 20px; */
  align-items: center;
  align-content: center;
  justify-content: center;
}
.modal.active {
  display: grid;
}
@media (orientation: landscape) {
  .modal.active {
    display: none;
  }
}
.modal-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
#landscape {
  display: block;
  background-color: #fff;
  text-align: center;
  z-index: 12;
}
@media (orientation: portrait) {
  #landscape {
    display: none;
  }
}
#detection-ui {
  justify-content: center;
  align-items: center;
  z-index: 9;
}
.frame_text {
  margin-bottom: 35px;
}
.frame_note {
  margin-top: 8vw;
}
/* 
  
*/
#failure {
}
#failure .failure_img {
  width: 100%;
  max-width: 600px;
  max-height: none;
  padding-left: 40px;
  padding-right: 40px;
}

/* 
  selection
*/
#selection {
}
.selection-options {
  text-align: center;
  min-width: 0;
}
#selection .title {
  max-width: 85vw !important;
}
.selection-options .title {
  position: relative;
  z-index: 1;
}
#selection .modal-bg {
  height: auto;
  max-height: none;
}
#selection .title:nth-of-type(1) {
  margin: 0 0 3vw;
}
#selection .title:nth-of-type(2) {
  margin: 0 0 6vw;
}
.selection-options .selection-container {
  max-width: 85vw;
  margin: 0 auto;
}
.selection-grid {
}
.selection-container {
  position: relative;
  /* padding: 30px 0 20px; */
  padding: 7.5vw 0 5vw;
}
.selection-container + .selection-container {
  margin-top: 2vw
}
.selection-container-inner {
  width: 78vw;
  margin: 0 auto;
  justify-content: center;
  position: relative;
  z-index: 1;
  display: flex;
}
#selection .selection-container-inner + .selection-container-inner {
  width: 18.5vw;
  margin-top: 1vw;
}
#detected-selection-1,
#detected-selection-2 {
  padding-left: 20px; 
  padding-right: 20px; 
}
#detected-selection-1 .selection-container,
#detected-selection-2 .selection-container {
  max-width: 88vw;
  min-height: 400px;
  padding: 30px 0 25px;
}
#detected-selection-1 .selection-container-inner,
#detected-selection-2 .selection-container-inner {
  margin: 20px auto 0;
  display: grid;
  gap: 4vw 1vw;
  justify-content: space-between;
  grid-template-rows: 31vw 31vw;
}
#detected-selection-1 .selection-container-inner {
  max-width: 62.5%;
  grid-template-columns: minmax(0, auto) minmax(0, auto); /* ios対策 */
}
#detected-selection-2 .selection-container-inner {
  width: 92%;
  grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, auto);
}
#detected-selection-1 .selection-photo,
#detected-selection-2 .selection-photo {
  text-align: center;
}
#detected-selection-1 .selection-photo img,
#detected-selection-2 .selection-photo img {
  display: inline-block !important;
  height: 100%;
  width: auto;
  max-width: none !important;
}

#content .selection-photo img {
  display: block;
  box-sizing: content-box;
  object-fit: contain;
}
.selection-photo {
  position: relative;
}
.selection-photo img.toy_selected {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  opacity: 0;
}
.selection-photo.active img {
  opacity: 0.5;
}
.selection-photo img.toy_selected {
  opacity: 0;
}
#selection-smoke {
  z-index: 11;
}
#selection-smoke img {
  display: none;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
}
#selection-start,
#selection-play,
.retry-button {
  width: 64% !important;
}
#selection-play {
  opacity: 0.4;
}
#show-selection {
  display: none;
  width: 87% !important;
}
.buttons {
  margin: auto;
  text-align: center;
}
.buttons .button {
  margin-top: 20px;
  width: 100%;
}
/* .buttons .button + .button {
} */


.select-button {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  width: 73% !important;
}
#content .detection-ui_inner {
  position: relative;
  width: 77%;
  /* max-height: 90%; */
}
#example {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}
.example_img {
  position: absolute;
  top: 50%;
  left: 0;
  visibility: hidden;
  opacity: 0.5;
  translate: 0 -50%;
}
.example_img.active {
  visibility: visible;
}
#flash-overlay {
  position: fixed;
  z-index: 10;
  width: 100%;
  height: 100%;
}

.is-disabled {
  pointer-events: none;
}
.is-hide {
  height: 0 !important;
  visibility: hidden;
  opacity: 0;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

#flash-overlay {
  translate: 100vw -100vh;
  pointer-events: none;
}
.star-cover {
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 200%;
  opacity: 0;
}
.star-container[data-phase="1"] .star-cover {
  background-color: #f4b4d0;
}
.star-container[data-phase="2"] .star-cover {
  background-color: #7ecef4;
}
.star {
  position: absolute;
  bottom: var(--bottom);
  left: var(--left);
  width: var(--size);
}
.star img {
  width: 100%;
  /* translate: 100% -100%; */
}

#flash-overlay.active {
  animation: star-overlay-move 3s linear both;
}
#flash-overlay.active .star-cover {
  animation: star-cover 0.2s linear 2.8s both;
}
#flash-overlay.active .star {
  animation: star-move calc(3s * var(--speed)) linear both;
}
#flash-overlay.active [data-phase="1"] .star img {
  animation: 
    star-scale calc(3s * var(--speed)) linear both,
    star-rotate 2.2s linear infinite;
}

@keyframes star-overlay-move {
  0% {
    translate: 100vw -100vh;
  }
  100% {
    translate: 0vw 0vh;
  }
}
@keyframes star-move {
  0% {
    /* translate: 40vw -40vh; */
    translate: 0vw 0vh;
  }
  100% {
    translate: -100vw 100vh;
  }
}
@keyframes star-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes star-scale {
  0% {
    scale: 0.2;
  }
  100% {
    scale: 1.2;
  }
}
@keyframes star-cover {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#camerafeed {
  position: absolute;
  top: 0;
  object-fit: cover;
}

#debug {
  width: 94%;
  text-align: center;
  position: absolute;
  top: 20%;
  left: 3%;
  z-index: 20;
  color: #ffffff;
  font-family: 'Nunito', monospace;
  font-size: 40px;
  font-weight: bold;
  text-shadow: 0px 0px 5px black;
  pointer-events: none;
}


/* debug */
/* canvas {
  width: 90vw !important;
  height: 80vw !important;
  border: blue solid 3px;
}
video {
  display: block !important;
  width: 90vw !important;
  height: 30% !important;
  border: red solid 3px;
  position: static !important;
  opacity: 1 !important;
} */

