/* index.css */
@font-face {
  font-family: "HancomMalangMalang-Regular";
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2406-1@1.0/HancomMalangMalang-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

*:not(i) {
  font-family: "HancomMalangMalang-Regular" !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  color: inherit;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: transparent;
  color: #e5e7eb;
}

#wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0; /* 바닥 정렬 */
  display: flex;
  justify-content: center; /* 가로 중앙 */
  align-items: flex-end; /* 세로 바닥 */
  pointer-events: none; /* 필요 시 해제 */
}

#safe-bg {
  position: relative;
  width: min(95vmin, 1200px);
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#safe-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
}

/* 다이얼 */
#dial-wrap {
  position: absolute;
  width: 19%;
  aspect-ratio: 1/1;
  left: 40%;
  top: 35%;
}
#dial {
  position: absolute;
  inset: 0;
  background: url("./assist/img/dial.svg") center/cover no-repeat;
  border-radius: 50%;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
  transform-origin: 50% 50%;
}
#dial-marker {
  position: absolute;
  left: 50%;
  top: -15px;
}
#dial-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #111;
}
#dial-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 2px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
}

/* 스테소/손잡이 */
#knob-wrap {
  position: absolute;
  width: 15%;
  aspect-ratio: 1/1;
  right: 17%;
  top: 55%;
}
#knob {
  position: absolute;
  inset: 0;
  background: url("./assist/img/stethoscope_head_hd.svg") center/cover no-repeat;
  border-radius: 50%;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.4));
}

#stetho {
  position: absolute;
  inset: 0;
  background: url("./assist/img/stethoscope_probe_hd.png") center/cover no-repeat;
}

#handle-wrap {
  position: absolute;
  left: 120px;
  top: 0; /* 오타 수정(0x → 0px) */
  width: 60px;
  height: 260px;
  pointer-events: none;
}
#handle-img {
  width: 100%;
  height: 100%;
}

#top-hint {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 200px; /* ← width 제거 */
  text-align: center;
  z-index: 100;
  pointer-events: none; /* ← 조작 간섭 방지 */
}

#key-helper {
  padding: 6px 10px;

  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  font-weight: 700;
  letter-spacing: 0.04em;
}

#key-helper .key {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin: 0 2px;
}

/* 상단 미터 */
#top-meter {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 200px;
  z-index: 100;
}
#meter-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
#meter-bar {
  width: 220px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}
#meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #95c7ff, #c6e1ff);
  transition: width 0.06s linear;
}
#meter-db {
  display: flex;
  gap: 6px;
  align-items: center;
  opacity: 0.9;
  font-size: 13px;
}

/* 슬롯 */
#slots {
  position: absolute;
  left: 50%;
  top: 75%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 100;
}
#slots .slot {
  width: 82px;
  height: 60px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
#slots .slot .ok {
  display: none;
  color: #85ffb3;
  font-style: normal;
  font-weight: 800;
}
#slots .slot.locked {
  outline: 2px solid #78f39f;
  outline-offset: -2px;
}
#slots .slot.locked .ok {
  display: inline;
}
