@charset "UTF-8";
#virtual {
  background: #303a46;
}

#virtual.show .virtual {
  pointer-events: none;
}

.virtual-body, .visual {
  height: 100%;
}

.visual {
  position: relative;
  padding: 20px;
}

/* 정리하기: 낙하 1회 후에만 표시 */
.virtual-button {
  display: none;
}

.virtual-button.show {
  display: block;
}

.virtual-button .btn-arrange {
  top: 75%;
}

/* 처음 화면: 공·높이박스·속력박스·계산기 숨김 (가이드/실험 공통, JS에서 개별 제거) */
#ball.initially-hidden,
.height-box-wrap.initially-hidden,
.calculator-body.initially-hidden {
  visibility: hidden;
  pointer-events: none;
}

#ball.initially-hidden {
  opacity: 0;
}

/* 속력 박스: 낙하 전까지 완전 숨김 (다른 스타일 덮어쓰기 방지) */
.speed-value-box.initially-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* 가이드 중: virtual-body 내 클릭 차단, 건너뛰기만 가능 */
.virtual-body.guide-blocked {
  pointer-events: none;
}

.virtual-body.guide-blocked .skip {
  pointer-events: auto;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: auto;
}

button {
  transition: none;
}

.guide-info {
  z-index: 3;
  top: 33px;
  right: 17px;
}

.guide-info .char {
  right: 6px;
}

.guide-hand {
  display: none;
  position: absolute;
  z-index: 1000;
}

.guide-hand.show {
  display: block;
}

.guide-hand .hand {
  position: absolute;
  z-index: 3;
  left: 15px;
  top: -103px;
  background: url(../img/m_s3_3_423/guide-hand.png) no-repeat 0 0/100% auto;
}

/* 가이드 손 위치 (필요 시 left/top 값만 조절) */
/* hand-step1: 깜박임 → (시차) → 아래로 이동 (두 번째 애니메이션 delay로 시차 조절) */
#hand-step1 {
  left: 1020px;
  top: 195px;
  animation: handup-tool1-blink 3s 1 forwards, handup-tool1-move 2.6s 2s 1 forwards;
  /* 2s 뒤에 이동 시작, 시차 변경 시 두 번째 숫자만 수정 */
}

/* 손 위치는 JS setHandStep2Position(높이)로 공과 동기화. blink만 CSS */
#hand-step2 {
  left: 675px;
  top: 598px;
  animation: handup-tool2-blink 1.8s 1 forwards;
}

#hand-step3 {
  left: 630px;
  top: 598px;
  animation: handup-tool1-blink 1.8s 1 forwards;
}

#hand-step4 {
  left: 630px;
  top: 598px;
  animation: handup-tool1-blink 1.8s 1 forwards;
}

#hand-step5 {
  left: 487px;
  top: 420px;
}

/* 1단계: 깜박임만 (opacity) */
@keyframes handup-tool1-blink {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  75% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes handup-tool2-blink {
  0% {
    opacity: 1;
  }
  10% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  50% {
    opacity: 0;
    transform: translate(0px, 0px);
  }
  100% {
    opacity: 1;
    transform: translate(-45px, 0px);
  }
}

/* 2단계: 아래로 이동 (시차 후 실행, transform) */
@keyframes handup-tool1-move {
  0% {
    opacity: 1;
    transform: translate(0px, 0px);
  }
  20% {
    opacity: 1;
    transform: translate(0px, 50px);
  }
  40% {
    opacity: 1;
    transform: translate(0px, 90px);
  }
  60% {
    opacity: 1;
    transform: translate(0px, 130px);
  }
  80% {
    opacity: 1;
    transform: translate(0px, 170px);
  }
  95% {
    opacity: 1;
    transform: translate(0px, 210px);
  }
  100% {
    opacity: 0;
    transform: translate(0px, 210px);
  }
}

@keyframes handup-tool2-move {
  0% {
    transform: translate(-45px, 0px);
  }
  33% {
    transform: translate(-45px, -83px);
  }
  66% {
    transform: translate(-45px, -166px);
  }
  99% {
    opacity: 1;
    transform: translate(-45px, -249px);
  }
  100% {
    opacity: 0;
    transform: translate(-45px, -249px);
  }
}

@keyframes handup-tool3 {
  0%, 20% {
    transform: rotate(-22deg) scaleX(-1) translate(-10px, 270px);
  }
  /* 시작 좌표 (x, y) */
  80%, 100% {
    transform: rotate(-22deg) scaleX(-1) translate(-10px, 60px);
  }
  /* 끝 좌표 (x, y) */
}

@keyframes handup-tool5 {
  0%, 20% {
    transform: rotate(-76deg) scaleX(-1) translate(35px, 760px);
  }
  /* 시작 좌표 (x, y) */
  80%, 100% {
    transform: rotate(-76deg) scaleX(-1) translate(35px, 100px);
  }
  /* 끝 좌표 (x, y) */
}

#virtual1-guide, #virtual2-guide, #virtual3-guide, #virtual4-guide, #virtual5-guide {
  top: 155px;
}

/* 가이드 손모양: 2번 깜박임(사라지지 않음) */
.guide-hand.blink-2 .hand,
.guide-hand.blink-2 .circle {
  animation-iteration-count: 2;
}

/* 건너뛰기 */
.skip {
  position: absolute;
  bottom: 30px;
  left: 36px;
}

.skip.hide {
  display: none;
}

.btn-skip {
  background: url(../common/img/btn-skip.png) no-repeat center/contain;
  width: 124px;
  height: 54px;
  color: white;
  font-size: 17px;
  font-weight: 500;
  opacity: 1;
}

#virtual1-guide.hide {
  display: block !important;
  animation: fadeOut 0.5s ease-out forwards;
}

/* ========== 자유 낙하 실험 (m_s3_3_423) ========== */
.free-fall-wrap {
  display: block;
  width: 974px;
  height: 538px;
  position: relative;
  margin: 0 auto;
  background: url(../img/m_s3_3_423/board.png) no-repeat center/contain;
  overflow: hidden;
}

.calculator-body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.formula-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.formula-section.hide {
  display: none !important;
}

.calculator-content {
  width: 400px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 25px;
  background-color: #3572bc;
  line-height: 50px;
  font-weight: normal;
}

.calculator-content.drop-result {
  background-color: #64a175;
}

.calculator-content .label {
  padding-top: 3px;
}

.calculator-result {
  width: 100px;
  height: 30px;
  font-size: 22px;
  font-weight: bold;
  color: #000;
  border-style: solid;
  border-width: 2px;
  border-color: #b8c1d4;
  border-radius: 15px;
  background-color: #e8edf7;
  box-shadow: inset 0px 10px 18px 0px rgba(96, 99, 105, 0.3);
  text-align: center;
  line-height: 30px;
  font-weight: normal;
}

.calculator-result .calculator-result-value {
  font-weight: bold;
}

.value-meter {
  width: 181px;
  height: 55px;
  display: flex;
  position: absolute;
  left: 105px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: solid 1px rgba(64, 70, 79, 0.39);
  border-radius: 13px;
  background-image: -moz-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  background-image: -webkit-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  background-image: -ms-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  box-shadow: 6.536px 10.064px 61px 0px rgba(29, 36, 46, 0.25);
}

/* 점선: 선 길이·간격 조절 가능 (dash 길이 + gap = 한 칸 반복) */
.value-meter:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 180px;
  transform: translateY(-50%);
  width: 174px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #9e9e9e 0px, #9e9e9e 8px, transparent 8px, transparent 14px);
}

.value-meter.height-box-wrap {
  bottom: 0;
  /* JS로 높이에 따라 변경됨 */
}

/* 0.0m일 때 높이 박스 숨김 (보정: left는 JS HEIGHT_BOX_OFFSET_LEFT_PX로 조절) */
.value-meter.height-box-wrap.at-zero {
  visibility: hidden;
}

.value-meter.height-box-wrap:after {
  width: 182px;
}

.value-meter-content {
  display: flex;
  align-items: center;
  gap: 5px;
}

.value-meter-content label {
  margin-bottom: 0;
  margin-top: 3px;
  font-size: 16px;
  color: #000;
}

.value-meter-content .value-meter-value {
  border: solid 2px #b8c1d4;
  padding: 3px 10px 0;
  border-radius: 13px;
  text-align: center;
  background-color: #e8edf7;
  box-shadow: inset 0px 10px 18px 0px rgba(96, 99, 105, 0.3);
  min-width: 100px;
  font-size: 18px;
  font-weight: 400;
  color: #000;
}

.value-meter-content .value-meter-value span {
  font-weight: 700;
}

/* 질량 드롭박스: 전체 래퍼 (배경/크기) */
.value-meter.mass-select-wrap {
  width: 181px;
  height: 55px;
  display: flex;
  position: absolute;
  right: 50px;
  top: 50px;
  left: auto;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: solid 1px rgba(64, 70, 79, 0.39);
  border-radius: 13px;
  background-image: -moz-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  background-image: -webkit-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  background-image: -ms-linear-gradient(90deg, #ccd4e8 0%, #d4dbe9 48%, #dce2ea 100%);
  box-shadow: 6.536px 10.064px 61px 0px rgba(29, 36, 46, 0.25);
}

.value-meter.mass-select-wrap:after {
  content: none;
}

/* 질량 셀렉트 컨테이너 (화살표 회전용) */
.mass-select-wrap .mass-select-container {
  position: relative;
  display: inline-block;
}

/* 질량 라벨("질량" 글자) */
.mass-select-wrap .mass-label {
  font-size: 16px;
  margin-bottom: 0;
  color: #000;
}

/* 질량 커스텀 드롭다운: 트리거 버튼 (기존 select와 동일한 스타일) */
.mass-select-wrap .mass-select-trigger {
  width: 95px;
  padding: 3px 28px 0px 15px;
  font-size: 16px;
  color: #000;
  border: solid 2px #b8c1d4;
  background-color: #e8edf7;
  box-shadow: inset 0px 10px 18px 0px rgba(96, 99, 105, 0.3);
  border-radius: 15px;
  cursor: pointer;
  text-align: left;
}

.mass-select-wrap .mass-select-trigger:focus {
  outline: none;
}

.mass-select-wrap .mass-select-trigger .mass-select-value {
  display: block;
  font-size: 18px;
}

/* 커스텀 화살표 (JS로 open 시 180deg 회전) */
.mass-select-wrap .mass-select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background: url(../img/m_s3_3_423/select-arrow.png) no-repeat center/contain;
  pointer-events: none;
}

.mass-select-wrap .mass-select-container.open .mass-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* ===== 커스텀 옵션 박스 (드롭다운 리스트) - 자유롭게 스타일 수정 가능 ===== */
.mass-select-wrap .mass-select-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 6px 0;
  min-width: 100%;
  list-style: none;
  border: solid 2px #b0b7c5;
  border-radius: 12px;
  background-color: #e8edf7;
  box-shadow: 1.089px 1.677px 24px 0px rgba(29, 36, 46, 0.33);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.mass-select-wrap .mass-select-container.open .mass-select-dropdown {
  display: block;
}

.mass-select-wrap .mass-select-dropdown li {
  padding: 8px 15px;
  font-size: 18px;
  color: #000;
  cursor: pointer;
  opacity: 0.3;
}

.mass-select-wrap .mass-select-dropdown li:hover,
.mass-select-wrap .mass-select-dropdown li.hover {
  opacity: 1;
}

.mass-select-wrap .mass-select-dropdown li.selected {
  opacity: 1;
}

.ruler-area {
  background-image: url(../img/m_s3_3_423/height_info.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 420px;
  width: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ruler-area .track {
  position: relative;
  width: 100%;
  height: 420px;
}

.ruler-area .track-value {
  position: absolute;
  left: -35px;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #000;
}

/* 공: 기본은 ball.png, z-index는 측정기(stand) 뒤. 보정: JS BALL_OFFSET_* 로 조절 */
.ball {
  background-image: url(../img/m_s3_3_423/ball.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 45px;
  height: 45px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  opacity: 1;
  z-index: 2;
}

/* 낙하 전·시작 위치: ball-start.png, 측정기보다 앞에 표시(드래그 가능) */
.ball.start {
  background-image: url(../img/m_s3_3_423/ball-start.png);
  z-index: 10;
  cursor: grab;
}

.ball.start:active,
.ball.dragging {
  cursor: grabbing;
  z-index: 10;
}

.stand {
  background-image: url(../img/m_s3_3_423/speed_meter.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 252px;
  height: 273px;
  position: absolute;
  bottom: -50px;
  left: -8px;
  z-index: 5;
}

.modal-arrange .modal-content {
  padding: 100px 50px 30px 105px;
}

.virtual-button .btn-replay {
  position: absolute;
  right: 33px;
  top: 88%;
  width: 42px;
  height: 42px;
  background: url(../img/m_s3_3_423/replay.png) no-repeat center/contain;
  display: none;
}

.virtual-button .btn-replay.show {
  display: block;
}
