* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #1a120d;
  color: #3a2618;
  font-family: "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  overflow: hidden;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 손 인식용 영상. 화면에는 게임 안 작은 창으로만 보여준다 */
#video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 12, 8, 0.55);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.overlay.hidden { display: none; }

.card {
  width: min(620px, 100%);
  background: #fff8ec;
  border-radius: 22px;
  padding: 30px 34px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.5px;
  color: #c0392b;
}

.sub {
  margin: 8px 0 20px;
  font-size: 17px;
  line-height: 1.5;
  color: #5a3d28;
}

.howto {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.howto li {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f6e7cf;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.4;
}
.howto b {
  flex: 0 0 82px;
  font-size: 17px;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
button {
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  cursor: pointer;
  background: #ead8bb;
  color: #3a2618;
  transition: transform 0.08s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: progress; }
button.primary {
  flex: 1;
  background: #c0392b;
  color: #fff;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #b0412f;
  line-height: 1.5;
}

.note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #8a6a50;
}
