/* 화면은 판을 위한 액자다. 눈은 구슬에 가 있어야 한다. */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #070912;
  color: #dfe6ff;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#hud { padding: 10px 14px 6px; flex: 0 0 auto; }
#hud .row { display: flex; align-items: center; gap: 8px; }
/* 곡 이름이 곧 곡 고르는 자리다. 제목을 따로 두면 같은 말이 두 번 적힌다. */
#pick {
  font-weight: 700; font-size: 17px; letter-spacing: -0.2px;
  color: #eaf1ff; background: transparent; border: 0; padding: 4px 2px;
  -webkit-appearance: none; appearance: none; max-width: 62%;
}
.tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.tools button, .tools select {
  background: rgba(255,255,255,0.08);
  color: #dfe6ff;
  border: 0; border-radius: 9px;
  padding: 6px 10px; font-size: 14px;
  -webkit-appearance: none; appearance: none;
}
.tools button:active { background: rgba(255,255,255,0.2); }
.tools select { max-width: 130px; }

/* 목표 멜로디. 지나간 것은 밝고, 지금 칠 것은 노랗게 뛴다. */
#score { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; min-height: 30px; }
#score b {
  display: inline-block; min-width: 30px; text-align: center;
  padding: 4px 6px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(223,230,255,0.35);
  font-weight: 600; font-size: 14px;
}
#score b.done { background: rgba(150,200,255,0.22); color: #eaf2ff; }
/* 지금 판에 떠 있는 마디 — 나머지는 아직 올라오지 않았다 */
#score b.here { background: rgba(255,225,140,0.16); color: rgba(255,235,190,0.75); }
#score b.now {
  background: rgba(255,225,140,0.9); color: #2a2000;
  animation: beat 1s ease-in-out infinite;
}
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

#stage { flex: 1 1 auto; position: relative; min-height: 0; }
#cv { display: block; width: 100%; height: 100%; touch-action: none; }

#foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 12px; min-height: 34px;
}
#balls { letter-spacing: 3px; color: #9fc4ff; font-size: 13px; }
#say { color: rgba(223,230,255,0.7); font-size: 13px; }

#hint {
  position: absolute; left: 0; right: 0; bottom: 54px;
  margin: 0; text-align: center; font-size: 13px;
  color: rgba(255,240,200,0.9);
  pointer-events: none;
}
