* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #fff0f8 0%, #f3e9ff 50%, #e6f7ff 100%);
  color: #4a3b5c;
}

header {
  padding: 14px 16px 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 126, 182, 0.2);
  box-shadow: 0 4px 16px rgba(180, 120, 220, 0.12);
}

h1 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(90deg, #ff7eb6, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  justify-content: center;
}

nav button {
  flex: 0 0 auto;
  border: 2px solid #ffd6ea;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: #fff;
  color: #6b5a7e;
  box-shadow: 0 2px 6px rgba(255, 126, 182, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

nav button:hover {
  transform: translateY(-2px);
}

nav button.active {
  background: linear-gradient(135deg, #ff7eb6, #a78bfa);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 126, 182, 0.4);
}

#scene {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

#scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

#hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(120, 90, 160, 0.15);
  text-align: center;
  color: #6b5a7e;
  font-weight: 600;
  pointer-events: none;
}
