html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #eaf4ff;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

canvas {
  display: block;
  touch-action: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  background: rgba(29, 53, 87, 0.35);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(88vw, 340px);
  box-sizing: border-box;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(29, 53, 87, 0.25);
  text-align: center;
}

.modal-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: #1d3557;
}

.nm-score {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #e63946;
}

#name-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 20px; /* 16px 이상이어야 아이폰에서 확대되지 않음 */
  font-weight: 700;
  text-align: center;
  border: 2px solid #b9d3f5;
  border-radius: 12px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

#name-input:focus {
  border-color: #2f6fdb;
}

.nm-error {
  min-height: 20px;
  margin: 8px 0 6px;
  font-size: 14px;
  color: #e63946;
}

.nm-buttons {
  display: flex;
  gap: 10px;
}

.nm-buttons button {
  flex: 1;
  padding: 12px 0;
  font-size: 17px;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  background: #2f6fdb;
  color: #ffffff;
  cursor: pointer;
}

.nm-buttons button.secondary {
  background: #e7eef9;
  color: #45628a;
}

.nm-buttons button:disabled {
  opacity: 0.6;
}
